GStreamer Pause/Resume functions do not call unlock and unlock_stop in derived classes
Describe your issue
I downloaded the pleorasrc gstreamer plugin from here: https://github.com/joshdoe/gst-plugins-vision/blob/master/sys/pleora. This plugin is based off of the gstreamer plugin template from here: https://gitlab.freedesktop.org/gstreamer/gst-template/-/commits/master?ref_type=heads and commit c363a310 (Oct. 15th 2019)
The plugin implements a GstPushSrc derived class with the following functions being overridden: gstbasesrc_class->start = GST_DEBUG_FUNCPTR (gst_pleorasrc_start); gstbasesrc_class->stop = GST_DEBUG_FUNCPTR (gst_pleorasrc_stop); gstbasesrc_class->get_caps = GST_DEBUG_FUNCPTR (gst_pleorasrc_get_caps); gstbasesrc_class->set_caps = GST_DEBUG_FUNCPTR (gst_pleorasrc_set_caps); gstbasesrc_class->unlock = GST_DEBUG_FUNCPTR (gst_pleorasrc_unlock); gstbasesrc_class->unlock_stop = GST_DEBUG_FUNCPTR (gst_pleorasrc_unlock_stop);
I have a Qt GUI with two buttons (Start/Stop) and (Pause/Resume). The GUI loads the pipeline using gst_parse_launch("pleorasrc timeout=10000 name=daycam ! filesink location="""pleorasrc.dat"""")
Expected Behavior
Using gstreamer 1.12.4: When I press the Start Button: the gstreamer framework calls:
- gst_pleorasrc_start followed by gst_pleorasrc_unlock_stop. If the pipeline starts, the Start button text becomes Stop. When I press the Stop Button, the gstreamer framework calls :
- gst_pleorasrc_unlock followed by gst_pleorasrc_unlock_stop followed by gst_pleorasrc_stop If I press pause, once the pipeline begins, the framework calls :
- gst_pleorasrc_unlock If I press resume, once the pipeline has been paused, framework calls:
- gst_pleorasrc_unlock_stop.
Problematic Behavior
However for gstreamer versions beyond 1.12.4: Pause DOES NOT invoke gst_pleorasrc_unlock Resume DOES NOT invoke gst_pleorasrc_unlock_stop
The most recent version I tried was 1.22.1
I am using Windows 10 Enterprise, Laptop.
The issue is consistently reproducible on multiple laptops.
I am attaching two log files: Both the log files were generated under the following scenario:
- Press Start on the GUI
- After ~10 seconds press "Pause" button on the GUI
- After ~10 seconds press "Resume button on the GUI
- After ~ 10 seconds press "Stop" button on the GUI
In Pleorasrc-1.12.4.log you see "Pausing" and "Resuming" ~ 10 seconds apart in the middle of the file and then at the very end when I press "Stop". In Pleorasrc-1.22.1.log you only see "Pausing" and "Resuming" keywords at the very end when I press "Stop".pleorasrc-1.12.4.log