Unplug Microphone when Recording

codemonkeyboris bzheng at deeptrekker.com
Mon Jun 24 15:49:24 UTC 2019


Hi forum,

I have a USB microphone and I am trying to implement a feature of preventing
corrupted recording if user unplug the microphone in the middle of audio
recording. My pipleline looks like the following :

video queue ..............................................................
mp4mux  --> filesink
alsasrc --> queue --> audioconvert --> avenc_ac3 ------/ 

It looks like the bus is always the first one catching the error:
      Error recording from audio device. The device has been disconnected.

I am trying to add a blocking probe on avenc_ac3 and clean up the audio
queue following the dynamic pipleline manipulation tutorial, basically,
setting audio elements to NULL, unlink them and remove them from the
pipeline.

Currently, I always end up with an not playable file. Is there anything I
can do to safely shutdown the pipeline and have a playable file or even keep
recording the video but the audio line?

Thank you very much.



--
Sent from: http://gstreamer-devel.966125.n4.nabble.com/


More information about the gstreamer-devel mailing list