Emit a signal to an element

ivan-perez ivan at encore-lab.com
Thu Jan 26 12:05:50 UTC 2017


Tim Müller wrote
> On Thu, 2017-01-26 at 01:59 -0800, ivan-perez wrote:
> 
> Hi,
> 
>> According to the GStreamer docs, I can achieve it by sending a signal
>> in order to add or remove clients dynamically. In this case, it
>> should be the add signal -
>> https://gstreamer.freedesktop.org/data/doc/gstreamer/head/gst-plugins
>> -good-plugins/html/gst-plugins-good-plugins-
>> multiudpsink.html#GstMultiUDPSink-add
>> 
>> But I can't find any information about sending a signal to an element
>> (in this case, to the multiudpsink element). It's easy to get the
>> reference to my element:
>> 
>>     GstElement *sink = gst_bin_get_by_name(GST_BIN(pipeline),
>> "dest");
>>     /* TODO: send a signal to add a client */
>>     g_object_unref(sink);
>> 
>> But now how can I emit a signal to that element?
>> 
>> Thanks in advance! Kind regards,
> 
> Here are some examples:
> https://cgit.freedesktop.org/gstreamer/gst-plugins-good/tree/tests/chec
> k/elements/udpsink.c#n158
> 
> Cheers
>  -Tim
> 
> 
> -- 
> Tim Müller, Centricular Ltd - http://www.centricular.com
> 
> _______________________________________________
> gstreamer-devel mailing list

> gstreamer-devel at .freedesktop

> https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel

Thank you very much, Tim.

Those examples allowed me to get fixed my problem. It was as simple as
`g_signal_emit_by_name(upd_sink, "add", client_ip, client_port, NULL);`

Thanks again!



--
View this message in context: http://gstreamer-devel.966125.n4.nabble.com/Emit-a-signal-to-an-element-tp4681639p4681641.html
Sent from the GStreamer-devel mailing list archive at Nabble.com.


More information about the gstreamer-devel mailing list