multiple input files with input selector
Sebastian Dröge
sebastian at centricular.com
Tue Nov 8 12:55:28 UTC 2016
On Tue, 2016-11-08 at 02:15 -0800, userAr wrote:
> Hi,
>
> I read about the input-selector and I guess it what my application needs:
>
> I have n audio files, they should be played in a roll (file_1, file_2,
> file_3,... file_n) without any noticeable delay.
>
> the pipeline is- filesrc location=file_1.mp3 ! decodebin ! audioconvert !
> autoaudiosink
>
> at the beginning, the bus got the EOS and the action was:
>
> gst_element_set_state(pipeline, GST_STATE_READY);
> g_object_set(G_OBJECT(fileSrc), "location", "file_2.mp3", NULL);
> gst_element_set_state(pipeline, GST_STATE_PLAYING);
> g_main_loop_run(loop);
>
> which worked, but with delay of ~0.3 sec and its not good enough .
>
> so I though of using the input-selector, but I understand from this pot:
>
> http://gstreamer-devel.966125.n4.nabble.com/Using-input-selector-td4664707.html
>
> that "the switch is not simultaneous—even though I'm switching the audio
> selector first, the audio switch is late by half a second"
>
> so my question is, if there is some method to switch between inputs (#n
> fileSrc) to one output- the rest of the pipeline, with unnoticeable delay.
You would have to reduce buffering everywhere for that, or do the
switching at the soundserver or driver level.
Each audiosink has a buffer, and if you put the input-selector after
the decoder then that will be where the delay comes from in your
pipeline.
--
Sebastian Dröge, Centricular Ltd · http://www.centricular.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 931 bytes
Desc: This is a digitally signed message part
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20161108/b75bd69d/attachment.sig>
More information about the gstreamer-devel
mailing list