Results 1 to 2 of 2

Thread: Phonon - videoPlayer Error

  1. #1
    Join Date
    Jul 2010
    Location
    Russia, Moscow/Krasnodar
    Posts
    5
    Thanks
    1
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Exclamation Phonon - videoPlayer Error

    Hello, $username!

    I'm using Phonon::videoPlayer from Windows+Qt 4.6 in my music player project as core of it.

    The bug is that some mp3-files cannot be opened and Phonon::videoPlayerInstance->mediaObject()->errorString() is:
    the operation cannot be performed because the pins are not connected ($80040209)
    I tried to pick out the plot of error-generating code, so its something like this:
    Qt Code:
    1. Tester::Tester(QApplication *starter = 0)
    2. {
    3. this->starter = starter;
    4.  
    5. core.mediaObject()->setTickInterval(1000);
    6. sources.clear();
    7.  
    8. connect(core.mediaObject(), SIGNAL(stateChanged(Phonon::State, Phonon::State)),
    9. this, SLOT(stateChanged(Phonon::State, Phonon::State)));
    10.  
    11. QStringList list = QFileDialog::getOpenFileNames(0,"Phonon Test",".",tr("audios (*.mp3 *.wma *.ogg *.wave *.midi)"));
    12.  
    13. for (int i = 0; i < list.size(); i++){
    14. Phonon::MediaSource source(list.at(i));
    15. sources.insert(i,source);
    16. }
    17. core.mediaObject()->setCurrentSource(sources.at(0));
    18.  
    19. core.play();
    20. }
    21.  
    22. void Tester::stateChanged(Phonon::State newstate, Phonon::State oldstate)
    23. {
    24. if (newstate == Phonon::ErrorState) {
    25. QMessageBox::warning(0, "Phonon Mediaplayer",
    26. core.mediaObject()->errorString(),
    27. QMessageBox::Close);
    28. if (core.mediaObject()->errorType() == Phonon::FatalError) {
    29. starter->exit();
    30. } else {
    31. core.mediaObject()->stop();
    32. }
    33. }
    34. }
    To copy to clipboard, switch view to plain text mode 

    As you see, its just clean code with no extraordinary using of Qt.

    Anybody knows, is it problem of Windows sound libraries or something else?

  2. #2
    Join Date
    Jul 2010
    Location
    Russia, Moscow/Krasnodar
    Posts
    5
    Thanks
    1
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Phonon - videoPlayer Error

    Up, pls :-)

Similar Threads

  1. Phonon::VideoPlayer
    By dano_labrosse in forum Newbie
    Replies: 6
    Last Post: 1st February 2012, 06:33
  2. Phonon crashes application when creating a VideoPlayer
    By core2000 in forum Qt Programming
    Replies: 0
    Last Post: 29th September 2009, 08:58
  3. Phonon error with dshow.h
    By aamer4yu in forum Installation and Deployment
    Replies: 7
    Last Post: 21st February 2009, 18:50
  4. phonon VideoPlayer refresh
    By rbp in forum Qt Programming
    Replies: 6
    Last Post: 14th November 2008, 01:56
  5. phonon VideoPlayer seek
    By rbp in forum Qt Programming
    Replies: 4
    Last Post: 31st October 2008, 04:53

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.