Is there any way to set/get multiple audio-sink and video-sink in playbin?
HoonHee Lee
hoonh83.lee at gmail.com
Thu Jan 16 00:06:31 PST 2014
I want to set multiple audio-sink and video-sink using below code in playbin
on Gst-v1.0.
=> g_object_set (playbin, "audio-sink", "fakesink|fakesink", NULL);
When I used gst-launch-1.0 audio-sink="fakesink|fakesink", It was possible.
Because when I tried to use g_value_object_get (object) in get_property func
in playbin,
this object had one pipeline(bin) that contains 2 fakesink elements.
But, I think that gst-launch and g_object_set is different with processing
logic.
Thus, I Implemented new element such as gstplaysinkcontainer in my local
that contains video and audio sink reference in array type.
Below is an example code.
--------------------------------------------------------------------------------------------
GstElement *container;
GstElement *fakesink1, *fakesink2;
GValue v1 = { 0, };
GValue v2 = { 0, };
GValueArray *va;
GValueArray *result;
container = gst_element_factory_make ("playsinkcontainer", NULL);
fakesink1 = gst_element_factory_make ("fakesink", NULL);
fakesink2 = gst_element_factory_make ("fakesink", NULL);
va = g_value_array_new (2);
g_value_init (&v1, GST_TYPE_ELEMENT);
g_value_set_object (&v1, fakesink1);
g_value_array_append (va, &v1);
g_value_unset (&v1);
g_value_init (&v2, GST_TYPE_ELEMENT);
g_value_set_object (&v2, fakesink2);
g_value_array_append (va, &v2);
g_value_unset (&v2);
g_object_set (G_OBJECT (container), "video-sinks", va, NULL);
g_object_set (playbin, "video-sink", container, NULL);
---------------------------------------------------------------------------------------
IMHO, above approach works fine.
But, What I want to do is that get the best approach for that.
Could you tell me that how can I set/get multiple audio and video sink using
"audio/video-sink" properties?
--
View this message in context: http://gstreamer-devel.966125.n4.nabble.com/Is-there-any-way-to-set-get-multiple-audio-sink-and-video-sink-in-playbin-tp4664706.html
Sent from the GStreamer-devel mailing list archive at Nabble.com.
More information about the gstreamer-devel
mailing list