Hi Experts,
We have a cam video source and a mic audio source. The pipeline has two branches, one for recording by Ridgerun prerecrod element but recording to file only on motion detection. The other branch is the live streaming (Webrtc) upon user’s requests. So the live streaming can start/stop at any time so as the filesink.
We have encountered a problem which blocks the video source (not calling the fill function any more) on certain case.
The file recording runs fine all the time regardless the live streaming is on or not.
The live streaming is working on its own without problem, i.e. if there is no motion detected, it can start/stop many times OK.
But as long as the live is started once, even it is stopped, if there is a motion detected (save to file regardless it is finished or not), next time starting the live streaming again will cause the video src to stall (after building the webrtc branch), i.e. not calling the overrided fill function any more. If no motion is ever detected, it is OK.
The simplified pipeline (omitted the audio tee):
mycamsrc ! h264parse ! tee name=t ! queue ! prerecord ! mux ! filesink
When live is connected it becomes:
mycamsrc ! h264parse ! tee name=t ! queue ! prerecord ! mux ! filesink t. ! queue ! rtph264pay ! webrtcbin
When adding/removing the live webrtc branch, we set a block probe on tee sink pad and release it after the branch is built and synced with parent.
We also set up a block probe on either the queue before the prerecord or on tee when the prerecord swithcing to debuffering /buffering, i.e. to save to file or stop saving. And release it after the switching.
The debug GST_DEBUG=basesrc:5,task:9 doesn’t print anything related to the video src once it happens. Sounds like the srcpad task being destroyed? We can’t see the state changed to either PAUSE or STOP.
Please help!
Many thanks