Pausing and resuming an audio pipeline

Lee Matthews lma at spaceapplications.com
Fri May 23 00:21:03 PDT 2014


Hi,

I record audio to a file using gstreamer on an android phone. I use the following pipeline : openslessrc ! audioconvert ! opusenc ! oggmux ! filesink

I wish to be able to pause and resume the recording, so I change the state of the pipeline to GST_STATE_PAUSED when I wish to pause it and GST_STATE_PLAYING when I wish to resume recording.

The pause seems to work ok, on resume however the recording seems to be distorted from the beginning of the resume until the end of the recording. Is this normal ?

I thought about trying to solve the problem another way by using output-selector and routing the audio to a fakesink whilst I wish to pause the recording and then route the stream back to filesink on a resume record. But I cannot get output-selector to work, either on a PC or on Android.

Everytime I run  gst_element_get_request_pad(), ie g_sel_src1 = gst_element_get_request_pad(pipeline_audio_file.selector, "src%d"); it returns NULL.

Thanks.
Lee






More information about the gstreamer-devel mailing list