Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. How to play audio in qt multimedia? I very tired!

How to play audio in qt multimedia? I very tired!

Scheduled Pinned Locked Moved General and Desktop
2 Posts 1 Posters 817 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    Akullllla
    wrote on last edited by
    #1

    I try to force work a qt multimedia at 2 days, but it not work. My program has that simple code

    @QUrl url;

    QString s = "http://host.net/some.mp3";
    
    url.setUrl(s);
    
    QMediaPlayer audio_player;
    
    audio_player.setMedia(QMediaContent(url));
    
    audio_player.play();@
    

    I try install Ubuntu 12.04, 14.04, 14.10, Debian 7.8, Debian Jessie, Fedora 21 and Qt 4.8.0, Qt 5.0.2, 5.3.2, Qt 5.4.0, bot on all it this code don't work! Always in output show this message:

    @GLib-GObject-WARNING **: invalid cast from WebKitWebSrc' to GstBaseSrc'

    ** CRITICAL **: gst_base_src_is_live: assertion `GST_IS_BASE_SRC (src)' failed@

    I install ubuntu-restricted-extras, ffmpeg, gstreamer devel and other many libraries, but it still not work.

    How to make it work?

    1 Reply Last reply
    0
    • A Offline
      A Offline
      Akullllla
      wrote on last edited by
      #2

      Haha, I won this! I rewrite the program by using QtWebEngine instead of Qt Webkit.

      1 Reply Last reply
      0

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved