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

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

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

Philippe Lalevée
Hello,
Maybe it's a trivial question...
I see "on-receiving-rtcp" and "on-sending-rtcp" signals in the rtpsession source code (lines 283 and 376), but not when I execute "gst-inspect-1.0 rtpsession", or when I try to use it in
       g_signal_connect(send_rtpbin, "on-sending-rtcp", G_CALLBACK(on_sending_rtcp_cb), NULL);
    g_signal_connect(recv_rtpbin, "on-receiving-rtcp", G_CALLBACK(on_receiving_rtcp_cb), NULL);

Could you give some tips to use these signals?
Thanks in advance
Philippe

Context: Ubuntu 18.10 and GStreamer 1.14.4
--
Philippe Lalevée


_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

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

Sebastian Dröge-3
On Wed, 2018-12-26 at 16:58 +0100, Philippe Lalevée wrote:

> Hello,
> Maybe it's a trivial question...
> I see "on-receiving-rtcp" and "on-sending-rtcp" signals in the
> rtpsession source code (lines 283 and 376), but not when I execute
> "gst-inspect-1.0 rtpsession", or when I try to use it in
> >        g_signal_connect(send_rtpbin, "on-sending-rtcp",
> > G_CALLBACK(on_sending_rtcp_cb), NULL);
> >     g_signal_connect(recv_rtpbin, "on-receiving-rtcp",
> > G_CALLBACK(on_receiving_rtcp_cb), NULL);
>  
> Could you give some tips to use these signals?
They are signals on the rtpsession object, not the GStreamer element.
That's why you don't see them in gst-inspect-1.0 for example.

You can get the rtpsession object from the "internal-session" property
on the rtpsession element.

--
Sebastian Dröge, Centricular Ltd · https://www.centricular.com


_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel

signature.asc (981 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

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

Philippe Lalevée
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

_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

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

Philippe Lalevée
Hello,
While awaiting the response of Sebastian, please help me ;-)
because I could not get the rtpsession object from the "internal-session" property on the rtpsession element, I tried to intercept RTCP packets by setting a callback to sinks connected with RTCP streams, using:
gst_pad_add_probe(srcpad, GST_PAD_PROBE_TYPE_BUFFER, (GstPadProbeCallback) rtcp_probe_cb, NULL, NULL);
Is it the same as intercepting "on-{sending|receiving}-rtcp" signals?

Thanks in advance,
Philippe

Le 27/12/2018 à 15:49, Philippe Lalevée a écrit :
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

--
Philippe Lalevée
Directeur du campus GCP - Directeur du CMP
Tél. : 26715 (04 42 61 67 15)

_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

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

Philippe Lalevée
Hello,
I finally managed to connect "on-receiving-rtcp" and "on-sending-rtcp" signals.  The problem was that the files gstrtpsession.h, rtpsession.h, rtpsource.h and rtpstats.h are not present after installation of the package "libgstreamer-plugins-good1.0-dev" under Ubuntu.  I had to install gst-plugins-good-1.14.4 sources to get these files.  I point out that 'make install' of gst-plugins-good does not install them.  Is there another way to do?

On Jan 09, 2016; 3:36am, Steven Presser sent a message titled "Can't get EOS using RTP/RTCP" on this list
(https://lists.freedesktop.org/archives/gstreamer-devel/2016-January/056048.html). As I have the same problem, I would like to know if it has been solved.

Happy New Year to all
Philippe

Le 31/12/2018 à 17:21, Philippe Lalevée a écrit :
Hello,
While awaiting the response of Sebastian, please help me ;-)
because I could not get the rtpsession object from the "internal-session" property on the rtpsession element, I tried to intercept RTCP packets by setting a callback to sinks connected with RTCP streams, using:
gst_pad_add_probe(srcpad, GST_PAD_PROBE_TYPE_BUFFER, (GstPadProbeCallback) rtcp_probe_cb, NULL, NULL);
Is it the same as intercepting "on-{sending|receiving}-rtcp" signals?

Thanks in advance,
Philippe

Le 27/12/2018 à 15:49, Philippe Lalevée a écrit :
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

--
Philippe Lalevée
Directeur du campus GCP - Directeur du CMP
Tél. : 26715 (04 42 61 67 15)

--
Philippe Lalevée
Directeur du campus GCP - Directeur du CMP
Tél. : 26715 (04 42 61 67 15)

_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel