I have a pipeline with an inputselector, output of the inputselector going
to an rtmpsink. To avoid data stream errors I flush the pipeline each time
a new stream is selected as active. Here is my code to flush:
gboolean ret = FALSE;
GstEvent *flush_start, *flush_stop;
ret = gst_element_send_event(GST_ELEMENT(self->pipeline), flush_start);
NSLog(@"failed to send flush-start event");
ret = gst_element_send_event(GST_ELEMENT(self->pipeline), flush_stop);
NSLog(@"failed to send flush-stop event");
The trouble is, the longer the time between switching active streams, the
more of a pause there is when it is changed. It seems as if the flushing
takes a long time in these cases. 1.) how would I go about verifying this?
2.) what can be done to avoid this issue?