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. Phonon, how to switch between different audio streams in one media file?
Forum Updated to NodeBB v4.3 + New Features

Phonon, how to switch between different audio streams in one media file?

Scheduled Pinned Locked Moved General and Desktop
4 Posts 3 Posters 2.3k 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.
  • T Offline
    T Offline
    T-Mark
    wrote on last edited by
    #1

    Hi everyone!
    Does anybody knows, how to switch between different audio streams if my media file has more than one?
    Because by default, if I use Phonon::VideoPlayer, it plays the last stream that media file contents.
    I've tried to play aroud the Phonon::MediaController but had no result...
    As I understood somehow I need to get QList Phonon::AudioChannelDescription from Phonon::MediaController but when I call
    availableAudioChannels it comes empty.

    @
    Phonon::MediaController * contr = new Phonon::MediaController(videoPlayer->mediaObject());
    qDebug() << contr->availableAudioChannels().isEmpty(); // returns true
    @

    1 Reply Last reply
    0
    • S Offline
      S Offline
      stemd
      wrote on last edited by
      #2

      I can't find availableAudioChannels() method on http://doc.qt.nokia.com/ site, but I can find this:

      "Warning: The Phonon::MediaController class is not yet supported by Qt backends.":http://doc.qt.nokia.com/5.0-snapshot/phonon-mediacontroller.html (in Qt 5.0 documentation)

      and this:

      http://qt.gitorious.org/qt/qt/blobs/4.7/src/3rdparty/phonon/phonon/mediacontroller.h
      http://qt.gitorious.org/qt/qt/blobs/4.7/src/3rdparty/phonon/phonon/mediacontroller.cpp

      If everything is as it should be (backend is properly coupled with Phonon, backend can play multiple streams, you have latest Qt libs with latest Phonon) then it should work (if it compiles fine and is working, who cares what is written in doc :).

      Which platform, which backend, which Qt version?

      1 Reply Last reply
      0
      • T Offline
        T Offline
        T-Mark
        wrote on last edited by
        #3

        bq. Which platform, which backend, which Qt version? bq.

        Widows, Phonon::VideoPlayer , Qt 4.7.4. It compiles fine, but not working right. I mean it's always palys the last stream in the list. For example if I play the same media in another palyer (Media Player Classic) and if I go to the audio settings, it gives me to choose from audio streams but Phonon::VideoPlayer by default palys the last one and I as i sad i even cant get that list...

        1 Reply Last reply
        0
        • A Offline
          A Offline
          ashl1future
          wrote on last edited by
          #4

          What backend do you use? VLC?
          I think, it's good to use availableAudioChannelsChanged() signal of MediaController. I have got the result of streaming but using compiled on my own phonon (latest Git) and phonon-vlc (latest Git too) on linux amd64.

          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