Getting error from DirectShow Renderer on MSYS MINGW64
-
wrote on 10 Apr 2024, 19:25 last edited by
I have a program that uses the following code to play video:
m_player = new QMediaPlayer(this, QMediaPlayer::VideoSurface); QString filePath = QApplication::applicationDirPath() + "/avi/Face3.avi"; qDebug() << filePath; m_surface = new VideoWidgetSurface(this); connect(m_surface, SIGNAL(aviImage(QImage)), this, SLOT(newAVIImage(QImage))); m_player->setVideoOutput(m_surface); m_player->setMedia(QUrl::fromLocalFile(filePath)); qDebug() << QMediaPlayer::hasSupport("video/mp4");//avi"); m_player->play();
Note that the first qDebug() returns the correct absolute path for the avi file, while the second one returns 1 for both avi and mp4.
When running the same code but using windows api instead of Qt, it runs fine.
Also, I tried Qt on Windows instead of MSYS2 using the mingw command window and got the same problem., so it seems to be a problem for Qt on windows and not an MSYS problem. -
wrote on 14 Apr 2024, 19:28 last edited by
Well, it was the newAVIImage slot the instigator of this error. It used glTexImade2D for all frames images. You should instead use glTexImage2d for the first frame, then use glTexSubImage2D for the subsequent frames. It seems like a memory problem that takes a while to reset.
-
wrote on 10 Apr 2024, 19:51 last edited by
I forgot to mention that the version that uses the windows API does use the vfw32 library for handling avi files.
-
I have a program that uses the following code to play video:
m_player = new QMediaPlayer(this, QMediaPlayer::VideoSurface); QString filePath = QApplication::applicationDirPath() + "/avi/Face3.avi"; qDebug() << filePath; m_surface = new VideoWidgetSurface(this); connect(m_surface, SIGNAL(aviImage(QImage)), this, SLOT(newAVIImage(QImage))); m_player->setVideoOutput(m_surface); m_player->setMedia(QUrl::fromLocalFile(filePath)); qDebug() << QMediaPlayer::hasSupport("video/mp4");//avi"); m_player->play();
Note that the first qDebug() returns the correct absolute path for the avi file, while the second one returns 1 for both avi and mp4.
When running the same code but using windows api instead of Qt, it runs fine.
Also, I tried Qt on Windows instead of MSYS2 using the mingw command window and got the same problem., so it seems to be a problem for Qt on windows and not an MSYS problem.wrote on 11 Apr 2024, 19:49 last edited by ChrisW67 4 Nov 2024, 19:57@sueyllam "Getting error from DirectShow Renderer on MSYS MINGW64"
Care to share what that warning is and what actually happens?
What Qt version?
What is VideoWidgetSurface?When running the same code but using windows api instead of Qt, it runs fine.
So, not the same code then.
-
@sueyllam "Getting error from DirectShow Renderer on MSYS MINGW64"
Care to share what that warning is and what actually happens?
What Qt version?
What is VideoWidgetSurface?When running the same code but using windows api instead of Qt, it runs fine.
So, not the same code then.
wrote on 12 Apr 2024, 12:49 last edited by@ChrisW67 Well it seems the error has to do with the settings of the environment. I am using Qt5.15 and I tried the examples supplied with the Qt opensource distribution and the same thing happens with a different surface. however after a day and a half of trials and rebooting things seem to work fine. then a little bit after some work the error seems to resurface. try the videowidget and videographicsitem examples that came with qt to make sure it is not your code but somehow something triggers the environment to produce this error. It seems DirectShow is flaky. MS is planning to replace it gradually.
-
wrote on 14 Apr 2024, 19:28 last edited by
Well, it was the newAVIImage slot the instigator of this error. It used glTexImade2D for all frames images. You should instead use glTexImage2d for the first frame, then use glTexSubImage2D for the subsequent frames. It seems like a memory problem that takes a while to reset.
-
1/5