Unable to change video playback speed run-time QMediaplayer QAbstractVideoSurace
-
In what kind of circonstances ?
-
Can you see any particular changes in the video frame you receive when that happens ?
-
@SGaist ,
The video frame is not displayed at all. As present function is not called. So, I do not see any change in videoframe.
I am not sure why I am facing many problems with above implementation. I have observed few other problems.-
If I stop video or reload second video I get read access violation at
pixmap->setPixmap(QPixmap::fromImage(img)); -
I am unable to play video at 4x speed. audio and video is not synced at all. Seems like audio gets played at 4x speed and frames get piled up and are being displayed at its own speed.
I have implemented QAbstractVideoSurface to modify frames on the fly using different OpenCV functions. Currently, I am facing many problems just at the basic implementation. Is there any other better way to achieve the goal ?
-
-
- Did you check the stack trace to see what is happening ?
Are you sure yourpixmap
is value ?
Are creating a new VideoFrameGrabber in between ? - What kind of processing are you applying ? These can be time consuming and thus slow down the video pipeline.
- Did you check the stack trace to see what is happening ?
-
@SGaist ,
- I tried debug problem through stack trace.
The read access violation is for QScrollBar::wheelEvent function of file Qt5Widgetsd.
I tried disabling QGraphicsView and pixmap event filter by setEnabled(false). But, it did not help.
I am not creating new VideoFrameGrabber in between. Also, there is no problem in QImage as i am able to save image. - Currently, I am not applying any processing. Just converting QVideoFrame To QImage
- I tried debug problem through stack trace.
-
Where do you have scrollbars in your application ?
What is the input format ? -
@SGaist
After lot of digging and modying code, I feel the problem is not with the scrollbars. After I stop the media, QGraphicsView *view seems to be deleted and that is why i get access violation error. However, I wonder if resources are deallocated when QAbstractVideoSurface::stop is called?
If so, what is the better way of implementing the functionality ? -
It should not...
Can you show the stack trace of the crash ?
-
@SGaist
Stack trace of the crash did help me with the error. Thanks a lot...
However, one error still remains. Present function of the QAbstractVideoSurface is not called sometimes. And this behaviour is very random as of now. -
What was it ?