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. ASSERT: “m_surface” when playing video
Forum Updated to NodeBB v4.3 + New Features

ASSERT: “m_surface” when playing video

Scheduled Pinned Locked Moved General and Desktop
15 Posts 2 Posters 3.7k 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.
  • M Offline
    M Offline
    matuQt
    wrote on last edited by
    #3

    in the Button click event

    1 Reply Last reply
    0
    • M Offline
      M Offline
      matuQt
      wrote on last edited by
      #4

      this is my code
      @#include "mainwindow.h"
      #include "ui_mainwindow.h"
      #include <QDebug>

      MainWindow::MainWindow(QWidget *parent) :
      QMainWindow(parent),
      ui(new Ui::MainWindow)
      {
      ui->setupUi(this);
      i = 0;
      scene = new QGraphicsScene;
      ui->graphicsView->setScene(scene);
      // setWindowFlags(Qt::FramelessWindowHint);
      }

      MainWindow::~MainWindow()
      {
      delete ui;
      }

      void MainWindow::resizeEvent(QResizeEvent *)
      {

      }

      void MainWindow::mousePressEvent(QMouseEvent *)
      {

      }

      void MainWindow::on_pushButton_clicked()
      {
      resize(1080,400);
      QStringList list;
      list <<QString("D:/files/3240/mov/1.mov") << QString("D:/files/3240/videos/newmov/1.mov")<<
      QString("D:/files/3240/videos/3.mov")<< QString("D:/files/3240/videos/4.mov")
      <<QString("D:/files/3240/videos/5.mov");
      mp.setVideoOutput(&v);
      mp.setMedia(QUrl::fromLocalFile(list.at(i%5)));
      mp.play();
      mp.setVolume(0);
      scene->addItem(&v);
      //v->setSize(QSize(width(),height()));
      i++;
      }
      @

      1 Reply Last reply
      0
      • SGaistS Offline
        SGaistS Offline
        SGaist
        Lifetime Qt Champion
        wrote on last edited by
        #5

        What is w ?

        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
        • M Offline
          M Offline
          matuQt
          wrote on last edited by
          #6

          w? didn't exist any w in this code. but if your mean is v.
          v is QGraphicsVideoItem and mp is QMediaPlayer

          1 Reply Last reply
          0
          • SGaistS Offline
            SGaistS Offline
            SGaist
            Lifetime Qt Champion
            wrote on last edited by
            #7

            What happens if you start playing only after adding v to the scene ?

            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
            • M Offline
              M Offline
              matuQt
              wrote on last edited by
              #8

              at this time it show me the mention assert error

              1 Reply Last reply
              0
              • SGaistS Offline
                SGaistS Offline
                SGaist
                Lifetime Qt Champion
                wrote on last edited by
                #9

                Since Qt 5.4 has been released, can you check if you still encounter this problem ?

                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
                • M Offline
                  M Offline
                  matuQt
                  wrote on last edited by
                  #10

                  yes , i don't have any idea to solve it

                  1 Reply Last reply
                  0
                  • SGaistS Offline
                    SGaistS Offline
                    SGaist
                    Lifetime Qt Champion
                    wrote on last edited by
                    #11

                    Yes you will test or yes you still have this problem ?

                    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
                    • M Offline
                      M Offline
                      matuQt
                      wrote on last edited by
                      #12

                      both, i tested Qt5.4 and the error exist in Qt 5.4

                      1 Reply Last reply
                      0
                      • SGaistS Offline
                        SGaistS Offline
                        SGaist
                        Lifetime Qt Champion
                        wrote on last edited by
                        #13

                        Where's the assert located this time ?

                        Did you install the latest driver for your graphic card ?

                        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
                        • M Offline
                          M Offline
                          matuQt
                          wrote on last edited by
                          #14

                          i update my graphic card again and the assert error does exist yet :( . what should i do to solve it?

                          1 Reply Last reply
                          0
                          • SGaistS Offline
                            SGaistS Offline
                            SGaist
                            Lifetime Qt Champion
                            wrote on last edited by
                            #15

                            @
                            mp.setVideoOutput(&v);
                            scene->addItem(&v);
                            @

                            I'd move that in the constructor, there's no need to do that again each time.

                            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

                            • Login

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