H264 GStreamer pipeline streaming into QVideoWidget periodically freezes when another background thread is started
-
I have added a QVideoWidget into my application. I run a basic pipeline with Gstreamer from my camera into a QVideoWidget. I have been following this thread and it works well on its own. Now, in addition to my camera running, I need to run a procedure, which would run on a worker thread. For that I am using QThread in a way that is recommended here. Many of the times, whenever I try to run a background worker thread, the H264 stream periodically freezes every few seconds. I believe it might have to do something with the worker thread running, but I am not sure, as I tried multiple ways of implementing worker thread and I still get the same issue. In any other case, the stream runs fine, without interruption, at desireable FPS, resource usage very small. I am running Linux Mint 20.2.
-
Hi,
What does your other thread do ?
How does it do it ? -
@SGaist Controlling some peripherals, such stepper motor and going through a device calibration procedure.
I have sorted out the issue by adding queue inside of my GStreamer pipeline, however, I am still wondering why would this happen when the QThread worker is running...