How to connect on-receiving-rtcp signal in rtpsession?

Philippe Lalevée lalevee at emse.fr
Thu Dec 27 14:49:53 UTC 2018


Hello,
Thanks Sebastian for your reply.

On 27/12/2018 at 10:23, Sebastian Dröge wrote :
> You can get the rtpsession object from the "internal-session" property
> on the rtpsession element.
Is that piece of code correct to associate a callback with the signal?

    static gboolean on_sending_rtcp_cb(GstElement *bin, guint sessid,
    GstBuffer *buffer, gboolean early,
                                        GstElement *what_is_it)
    GstElement *rtpbin;
    GObject *session;
    RTPSession *rtpsession;
    ...
    g_signal_emit_by_name(rtpbin, "get-internal-session", 0, &session);
    g_object_get(session, "internal-session", &rtpsession);
    g_signal_connect(rtpsession, "on-sending-rtcp",
    G_CALLBACK(on_sending_rtcp_cb), NULL);
    ...

Else could you give (me) an example of how to do that?
Best regards
Philippe

-- 
*Philippe Lalevée*, Mines Saint-Etienne
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20181227/321ef1ad/attachment.html>


More information about the gstreamer-devel mailing list