Issues handling bin's
Bernhard Graaf
bernhard.graaf at gmx.de
Sat Sep 28 08:11:59 PDT 2013
Hi,
I've a small issue to handling bin in my C-Source.
If I use a pipe like this:
tv_pipe = gst_pipeline_new ("TV-Stream");
if(!tv_pipe) g_printerr("TV-Stream-Pipeline not created\n");
tv_source = gst_element_factory_make ("tcpclientsrc", "tv-source");
if(!tv_source) g_printerr("TV-Source not created\n");
tv_mux = gst_element_factory_make ("tsdemux", "tv-mux");
if(!tv_mux) g_printerr("TV-Mux not created\n");
tv_v_queue = gst_element_factory_make ("queue", "tv-v-queue");
if(!tv_v_queue) g_printerr("TV-Video-Queue not created\n");
tv_v_parse = gst_element_factory_make ("mpegvideoparse", "Video-Parse");
if(!tv_v_parse) g_printerr("Video-Parse not created\n");
tv_v_dec = gst_element_factory_make ("mpeg2dec", "tv-v-dec");
if(!tv_v_dec) g_printerr("TV-Video-Dec not created\n");
tv_v_sink = gst_element_factory_make ("xvimagesink", "tv-v-sink");
if(!tv_v_sink) g_printerr("TV-Video-Sink not created\n");
tv_a_queue = gst_element_factory_make ("queue", "tv-a-queue");
if(!tv_a_queue) g_printerr("TV-Audio-Queue not created\n");
tv_a_parse = gst_element_factory_make ("mpegaudioparse", "Audio-Parse");
if(!tv_a_parse) g_printerr("Audio-Parse not created\n");
tv_a_dec = gst_element_factory_make ("mad", "tv-a-dec");
if(!tv_a_dec) g_printerr("TV-Audio-Dec not created\n");
tv_a_sink = gst_element_factory_make ("pulsesink", "tv-a-sink");
if(!tv_a_sink) g_printerr("TV-Audio-Sink not created\n");
tv_bus = gst_pipeline_get_bus (GST_PIPELINE (tv_pipe));
gst_bus_add_watch (tv_bus, tv_bus_call, NULL);
gst_bus_set_sync_handler (tv_bus, (GstBusSyncHandler) bus_sync_handler,
NULL, NULL);
gst_object_unref (tv_bus);
gst_bin_add_many (GST_BIN (tv_pipe), tv_source, tv_mux, tv_v_queue,
tv_v_parse, tv_v_dec, tv_v_sink, tv_a_queue, tv_a_parse, tv_a_dec,
tv_a_sink, NULL);
gst_element_link (tv_source, tv_mux);
gst_element_link_many (tv_v_queue, tv_v_parse, tv_v_dec, tv_v_sink, NULL);
gst_element_link_many (tv_a_queue, tv_a_parse, tv_a_dec, tv_a_sink, NULL);
g_signal_connect (tv_mux, "pad-added", G_CALLBACK (tv_mux_pad_added),
tv_v_queue);
return 1;
}
There it's working fine.
But if I change it to:
(Beginning the same)
..
sdh_bin = gst_bin_new("sdh_bin");
if(!sdh_bin) g_printerr("sdh_bin not created\n");
gst_bin_add_many (GST_BIN (sdh_bin), tv_v_queue, tv_v_parse, tv_v_dec,
tv_v_sink, NULL);
gst_bin_add_many (GST_BIN (tv_pipe), tv_source, tv_mux, sdh_bin,
tv_a_queue, tv_a_parse, tv_a_dec, tv_a_sink, NULL);
..
(Rest the same)
It doesn't work (no audio/video).
Do I have some misunderstandings? I've read the documentation regarding
'bin's'.
Thanks' for helping
Bernhard
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20130928/059e3817/attachment-0001.html>
More information about the gstreamer-devel
mailing list