Multiple ogg vorbis audio files to single tcpserversink

bomba jhonata.poma at gmail.com
Mon Jun 13 14:16:31 UTC 2016


splitfilesrc -> oggdemux -> vorbisdec -> audiorate -> audioresample ->
audioconvert -> sink

I'm listening on pad-added signals from oggdemux and dynamically link them
against vorbisdec:


static void
on_oggdemux_pad_added (GstElement * element, GstPad * pad, STREAM_INFO *
data)
{
        gchar *dynamic_pad_name;
        dynamic_pad_name = gst_pad_get_name (pad);
        g_print ("\n\nDEBUG:: on_oggdemux_pad_added : %s\n\n",
dynamic_pad_name);
        gst_element_link_pads (data->oggdemux, dynamic_pad_name,
data->vorbisdec, "sink");
        g_free (dynamic_pad_name);
}

[..]

g_signal_connect (si.oggdemux, "pad-added", G_CALLBACK
(on_oggdemux_pad_added), &si);

[..]

gst_bin_add_many (GST_BIN (si.pipeline), si.splitfilesrc, si.oggdemux,
si.vorbisdec, 
si.audiorate, si.audioresample, si.audioconvert, si.sink, NULL);

gst_element_link_many (si.splitfilesrc, si.oggdemux, NULL);
gst_element_link_many (si.vorbisdec, si.audiorate, si.audioresample,
si.audioconvert, si.sink, NULL);

[..]


I can play the first file, then I receive EOS and the program terminates:

~ GST_DEBUG=3 ./fragment-stream test/*.ogg

0:00:00.028728478  2617      0x17e8e70 WARN                 basesrc
gstbasesrc.c:3486:gst_base_src_start_complete:<Splitfiles> pad not activated
yet

Running...

0:00:00.029459270  2617      0x17ab8a0 WARN                oggdemux
gstoggdemux.c:3318:gst_ogg_demux_do_seek:<'':src_6921e04d> Locking on ts
0:00:00.448435374

DEBUG:: on_oggdemux_pad_added : src_6921e04d

0:00:00.884464145  2617 0x7f4ac0007010 WARN                   pulse
pulsesink.c:702:gst_pulsering_stream_underflow_cb:<sink-actual-sink-pulse>
Got underflow

End of stream
Returned, stopping playback
Deleting pipeline


Do I have to handle EOS for every single sample?



--
View this message in context: http://gstreamer-devel.966125.n4.nabble.com/Multiple-ogg-vorbis-audio-files-to-single-tcpserversink-tp4677997p4678009.html
Sent from the GStreamer-devel mailing list archive at Nabble.com.


More information about the gstreamer-devel mailing list