Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-36708

QGpahicsVideoItem plays video not QVideoWidget

    XMLWordPrintable

Details

    • Bug
    • Resolution: Cannot Reproduce
    • P2: Important
    • None
    • 5.2.0, 5.2.1
    • Multimedia
    • None
    • Fedora 20 x86_64

    Description

      Hi,

      I've tested the two ways to play a video with qtmultimedia : the first with QGraphicsVideoItem and the second with QVideoWidget. As said in the summary, QGraphicsVideoItem plays my video (audio and video) but i can't play the same video in the same environment with QVideoWidget. Instead, i got the "internal data flow error" message (for QVideoWidget).

      I've installed all the Gstreamer plugins (yum install gstreamer*, to be sure that i'm not missing anything). But i'm not suspecting to be a plugin or codec cause because QGraphicsVideoItem plays fine unless QVideoWidget needs more plugins than QGraphicsVideoItem.

      Here are the 2 examples :

      QGraphicsVideoItem example : (works)

      QGraphicsView * graphicsView = new QGraphicsView;
      QMediaPlayer * player = new QMediaPlayer;

      QGraphicsScene * scene = new QGraphicsScene;
      graphicsView->setScene(scene);

      QGraphicsVideoItem *item = new QGraphicsVideoItem;
      player->setVideoOutput(item);
      graphicsView->scene()->addItem(item);
      graphicsView->show();

      player->setMedia(QUrl::fromLocalFile("/home/user/video.mpg"));
      player->play();

      QVideoWidget example : (doesn’t work, got “Internal data stream error”)

      QMediaPlayer * player = new QMediaPlayer;
      player->setMedia(QUrl::fromLocalFile("/home/user/video.mpg"));

      QVideoWidget * videoWidget = new QVideoWidget;
      videoWidget->show();
      player->setVideoOutput(videoWidget);

      player->play();

      Regards.

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            valentyn.doroshchuk Valentyn Doroshchuk
            hisoft TD
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes