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::MediaObject does not implements DVD in Windows

Phonon::MediaObject does not implements DVD in Windows

Scheduled Pinned Locked Moved General and Desktop
6 Posts 3 Posters 2.9k 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.
  • C Offline
    C Offline
    cibi3d
    wrote on last edited by
    #1

    Hi, I'm creating a custom mediaplayer using Qt under Windows 7. I'm using VS 2008 and Qt 4.7.1 precompiled for it. Also, I'm using Phonon to play the video from either a file or a DVD.

    The application does it well if the source is a file, but it fails to reproduce DVDs, giving me a "Not implemented" error if I try to set the source of the MediaObject to Phonon::Dvd.

    I've read that DirectShow is the backend, and I've also recompiled Phonon to be sure it uses the DirectX SDK (June 2010) and the Windows SDK v7.0 I have installed.

    Do you have any idea what's going on here? or is DVD playing simply not supported under Windows? I've been looking around the web but there nothing related to it.

    I attach the related code:
    @
    //The constructor of the widget containning the mediaplayer
    Player::Player(QWidget *parent, Qt::WFlags flags)
    : QWidget(parent, flags)
    {
    ui.setupUi(this);

    _player_video = new Phonon::VideoWidget(this);
    _player_audio = new Phonon::AudioOutput(Phonon::VideoCategory, this);
    ui.playerLayout->addWidget(_player_video);

    _media_object = new Phonon::MediaObject(this);

    Phonon::createPath(_media_object, _player_audio);
    Phonon::createPath(_media_object, _player_video);

    connect(ui.playBtn, SIGNAL(clicked()), this, SLOT(play()));
    }

    // This method is called when a disc is selected
    void Player::set_dvd(const QString &drive)
    {
    Phonon::MediaSource src(Phonon::Dvd, drive);

    _media_object->setCurrentSource(src);
    if (_media_object->errorType() != Phonon::NoError)
    cout << "Phonon::MediaObject error: " << _media_object->errorString().toUtf8().data() << endl;
    }

    // This method is called whne a file is selected
    void Player::set_file(const QString &file)
    {
    Phonon::MediaSource src(file);

    _media_object->setCurrentSource(src);
    if (_media_object->errorType() != Phonon::NoError)
    cout << "Phonon::MediaObject error: " << _media_object->errorString().toUtf8().data() << endl;
    }

    // The play/pause button
    void Player::play()
    {
    if (_media_object->state() == Phonon::PlayingState) {
    _media_object->pause();
    ui.playBtn->setText(tr("Play"));
    } else {
    if (_media_object->currentTime() == _media_object->totalTime())
    _media_object->seek(0);
    _media_object->play();
    ui.playBtn->setText(tr("Pause"));
    }
    }
    @

    In the declaration of the Player class there are the following private attributes:
    @
    Ui::player ui;

    Phonon::VideoWidget *_player_video;
    Phonon::AudioOutput *_player_audio;

    Phonon::MediaObject *_media_object;
    @

    Thanks a lot for your help!

    1 Reply Last reply
    0
    • C Offline
      C Offline
      cibi3d
      wrote on last edited by
      #2

      Sorry about the @<span class="smiley">@ it is done by the server.

      1 Reply Last reply
      0
      • M Offline
        M Offline
        mgran
        wrote on last edited by
        #3

        [quote author="cibi3d" date="1295974955"]Sorry about the @<span class="smiley">@ it is done by the server.[/quote]

        This bug has been fixed in dev, it will be in the next roll out.

        Project Manager - Qt Development Frameworks

        1 Reply Last reply
        0
        • C Offline
          C Offline
          cibi3d
          wrote on last edited by
          #4

          Then I'll have to wait until 4.7.2? Well... I'll try to continue the development under Linux or MacOS X until then.

          Thanks a lot!

          1 Reply Last reply
          0
          • G Offline
            G Offline
            giesbert
            wrote on last edited by
            #5

            [quote author="mariusg" date="1296001852"][quote author="cibi3d" date="1295974955"]Sorry about the @<span class="smiley">@ it is done by the server.[/quote]

            This bug has been fixed in dev, it will be in the next roll out.

            [/quote]

            He was talking on the smiles, not on the DVD topic....

            Nokia Certified Qt Specialist.
            Programming Is Like Sex: One mistake and you have to support it for the rest of your life. (Michael Sinz)

            1 Reply Last reply
            0
            • C Offline
              C Offline
              cibi3d
              wrote on last edited by
              #6

              Ups!... I didn't realize about the reply text... :D

              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