Gstreamer pipeline slows when run in Qt Quick application.
-
I am using a gstreamer pipeline to provide the output from a MIPI camera to a Qt Quick application for display. The processor is an i.MX8M Plus running a Yocto distribution. The Qt version is 5.15.3.
I can launch the pipeline as follows at the command line:gst-launch-1.0 v4l2src device=/dev/video0 ! video/x-raw,width=1920,height=1080,framerate=30/1 ! waylandsink
The video runs correctly for as long as I have run it (many minutes).
I have tried multiple methods to display the pipeline in the application such as:
MediaPlayer {
id: mediaplayer
source: "gst-pipeline: v4l2src name=videosrc device=/dev/video0 ! queue ! video/x-raw,format=YUY2,width=1920,height=1080,framerate=30/1 ! qtvideosink"
autoPlay: true
}VideoOutput {
id: videooutput
anchors.left: parent.left
anchors.top: parent.top
source: mediaplayer
}Or using GstAppSink to pull the frames out and display them using a QAbstractVideoSurface.
In all cases, the pipeline slows down significantly within one minute. Any suggestions on how best to debug this issue will be appreciated.
-
I am using a gstreamer pipeline to provide the output from a MIPI camera to a Qt Quick application for display. The processor is an i.MX8M Plus running a Yocto distribution. The Qt version is 5.15.3.
I can launch the pipeline as follows at the command line:gst-launch-1.0 v4l2src device=/dev/video0 ! video/x-raw,width=1920,height=1080,framerate=30/1 ! waylandsink
The video runs correctly for as long as I have run it (many minutes).
I have tried multiple methods to display the pipeline in the application such as:
MediaPlayer {
id: mediaplayer
source: "gst-pipeline: v4l2src name=videosrc device=/dev/video0 ! queue ! video/x-raw,format=YUY2,width=1920,height=1080,framerate=30/1 ! qtvideosink"
autoPlay: true
}VideoOutput {
id: videooutput
anchors.left: parent.left
anchors.top: parent.top
source: mediaplayer
}Or using GstAppSink to pull the frames out and display them using a QAbstractVideoSurface.
In all cases, the pipeline slows down significantly within one minute. Any suggestions on how best to debug this issue will be appreciated.
I have looked at timing and the problem does not appear to be related to Gstreamer. The appsink callback continues to be called at a constant rate even after the display update rate has fallen. The signals and slots which bring the QVideoFrame to the QAbstractVideoSurface also continue to run at a constant rate. So, something is slowing downstream of presenting the frame to the QAbstractVideoSurface. Any thoughts?