Emit a signal to an element

ivan-perez ivan at encore-lab.com
Thu Jan 26 09:59:52 UTC 2017


Hello, good morning

I have a pipeline written into a C program which redirects a video stream
from stdin to multiple UDP clients. I want those clients to be added or
removed dynamically, so it's not possible to define at compile time which of
them and how many there will be. This is my pipeline (if I add a fixed
clients parameter it works fine):

    fdsrc name=origin \
    !
video/x-h264,width=320,height=240,framerate=30/1,profile=baseline,stream-   
format=avc,alignment=au \
    ! h264parse \
    ! rtph264pay \
        config-interval=1 \
        pt=96 \
    ! multiudpsink name=dest \
         sync=false

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,



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


More information about the gstreamer-devel mailing list