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. ui->graphicsView Error: "Internal data stream error."

ui->graphicsView Error: "Internal data stream error."

Scheduled Pinned Locked Moved Solved General and Desktop
8 Posts 3 Posters 1.4k Views
  • 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.
  • H Offline
    H Offline
    hndery
    wrote on 16 Nov 2019, 18:07 last edited by
    #1

    i use graphicsView to get video stream that codes work fine!! but if i use tab widget or stacked widget when i click another tab i take Error: "Internal data stream error." and stream closed.

    if i used qvideowidget i never take an error everything works fine!!! but i dont want to use videowidget!!

    i hope u will understand my english

    whats the problem for graphicView??

            QMediaPlayer *player1 = new QMediaPlayer;
            QGraphicsVideoItem *item = new QGraphicsVideoItem;
            QGraphicsScene *scene = new QGraphicsScene(this);
         
            QSizeF size(280,160);
            item->setSize(size);
         
            ui->graphicsView->setScene(scene);
         
            scene->addItem(item);
         
            const QUrl url1 =QUrl("http://xxx.xx.x.xx:80/mjpg/video.mjpg");
            const QNetworkRequest requsetRstp1(url1);
         
            player1->setMedia(requsetRstp1);
            player1->setVideoOutput(item);
            player1->play();
    

    AND THIS IS THE WORKING CODE WITH NO PROBLEM BUT I DONT WANT TO USE

            QVideoWidget *vw1 = new QVideoWidget;
            QMediaPlayer *player1 = new QMediaPlayer;
         
         
            ui->gridLayout->addWidget(vw1,0,0);
            player1->setVideoOutput(vw1);
         
            const QUrl url1 =QUrl("http://XX.XXX.XX.XX:8084/mjpg/video.mjpg");
            const QNetworkRequest requsetRstp1(url1);
            player1->setMedia(requsetRstp1);
            player1->play();
    

    thanks.

    1 Reply Last reply
    0
    • S Offline
      S Offline
      SGaist
      Lifetime Qt Champion
      wrote on 16 Nov 2019, 19:39 last edited by
      #2

      Hi and welcome to devnet,

      What version of Qt are you using ?
      On what platform ?

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0
      • H Offline
        H Offline
        hndery
        wrote on 17 Nov 2019, 13:03 last edited by
        #3

        @SGaist said in ui->graphicsView Error: "Internal data stream error.":

        What version of Qt

        5.13.1
        kubuntu 19.10

        1 Reply Last reply
        0
        • M Offline
          M Offline
          mrjj
          Lifetime Qt Champion
          wrote on 17 Nov 2019, 13:49 last edited by
          #4

          Hi
          You get the error when you put the graphicsView into a stacked or tabbed and switch "page" ?
          Is that correctly understood ?

          1 Reply Last reply
          0
          • H Offline
            H Offline
            hndery
            wrote on 17 Nov 2019, 14:10 last edited by
            #5

            graphicsView working fine but when i click another page i take the error.
            if i use videowidget i dont take an error when i swiching pages .But i want to use graphicsview not videowidget

            1 Reply Last reply
            0
            • H Offline
              H Offline
              hndery
              wrote on 17 Nov 2019, 14:55 last edited by
              #6

              its a simple i do it for explane...
              1.png
              first video is videowidget and the second video is graphicsview okay.. when i swich another page and turn back ...
              2.png
              second one graphicview stoped but video widget still running..
              and the code simple u can copy paste url will work for u too...

              //player 1 videowidget
                  QVideoWidget *vw1 = new QVideoWidget;
                  QMediaPlayer *player1 = new QMediaPlayer;
                  ui->gridLayout->addWidget(vw1,0,0);
                  player1->setVideoOutput(vw1);
                  const QUrl url1 =QUrl("http://131.95.3.162:80/mjpg/video.mjpg");
                  const QNetworkRequest requsetRstp1(url1);
                  player1->setMedia(requsetRstp1);
                  player1->play();
              //player 2 graphicview
                  QMediaPlayer *player2 = new QMediaPlayer;
                  QGraphicsVideoItem *item = new QGraphicsVideoItem;
                  QGraphicsScene *scene = new QGraphicsScene(this);
              
              
                  ui->graphicsView->setScene(scene);
                  scene->addItem(item);
              
                  const QUrl url2 =QUrl("http://131.95.3.162:80/mjpg/video.mjpg");
                  const QNetworkRequest requsetRstp2(url2);
              
                  player2->setMedia(requsetRstp2);
                  player2->setVideoOutput(item);
                  player2->play();
              
              
              
              
              1 Reply Last reply
              0
              • M Offline
                M Offline
                mrjj
                Lifetime Qt Champion
                wrote on 17 Nov 2019, 16:10 last edited by
                #7

                Hi
                Good with the test code. And the video worked! :)
                Took some seconds then it showed.
                However, i could not get any errors on Windows 10 using stackedwidget.
                So i think it gstreamer / linux related.

                Also from the error PaintEngive: should no longer be called it really seems like something goes bad internally.

                1 Reply Last reply
                1
                • H Offline
                  H Offline
                  hndery
                  wrote on 17 Nov 2019, 17:36 last edited by
                  #8

                  thanks alot :)

                  1 Reply Last reply
                  0

                  1/8

                  16 Nov 2019, 18:07

                  • Login

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