AW: Gstrtpbin - one RtpSession, several "on-new-ssrc" calls

Matthias Dodt MDodt at xion-medical.com
Mon Sep 19 08:32:06 PDT 2011


Hi Oliver!

Thanks for your reply. I like the second option more (I was already using the first one) because the GstMessages might be processed with some delay and since I only get the GstStructure I cant tell to which session it belongs- (or at least I don't know how to):

...
case GST_MESSAGE_ELEMENT:{
				if (gst_structure_has_name (msg->structure, "application/x-rtp-source-sdes")){
					const gchar* name=0;
					const gchar* cname=0;
					name = gst_structure_get_string(msg->structure,"name");
					cname = gst_structure_get_string(msg->structure,"cname"); 
...

(This works fine, but I don't know which session this message belongs to).

Now that I use the "on-new-sdes" callback I should be able to do that:

on_ssrc_sdes(GstElement *gstrtpbin,guint sessionid,guint ssrc,gpointer data)
{
	GObject *rtpsession, *rtpsource;
	GstStructure *sessionInfo;
	...
	g_signal_emit_by_name(rtpbin, "get-internal-session", sessionid,&rtpsession);
	g_signal_emit_by_name(rtpsession, "get-source-by-ssrc", ssrc,&rtpsource);
	g_object_get(rtpsource, "stats", &sessionInfo, NULL);
	const gchar* name=gst_structure_get_name (sessionInfo);
	const gchar* client=gst_structure_get_string(sessionInfo,"cname");
...

The only problem is that this "GstStructure" does not contain any "cname", while the message send on the GstBus has. But instead it contains a bunch of other information...:

gst_structure_to_string(sessionInfo); - Output:

application/x-rtp-source-stats, ssrc=(uint)1096463363, internal=(boolean)false, validated=(boolean)true, received-bye=(boolean)false, is-csrc=(boolean)false, is-sender=(boolean)true, seqnum-base=(int)-1, clock-rate=(int)44100, rtp-from=(string)192.168.115.34:65201, rtcp-from=(string)192.168.115.34:65202, octets-received=(guint64)247808, packets-received=(guint64)242, bitrate=(guint64)586604, packets-lost=(int)0, jitter=(uint)3161, have-sr=(boolean)true, sr-ntptime=(guint64)15141624471614630320, sr-rtptime=(uint)3060205931, sr-octet-count=(uint)239616, sr-packet-count=(uint)234, have-rb=(boolean)false, rb-fractionlost=(uint)0, rb-packetslost=(int)0, rb-exthighestseq=(uint)0, rb-jitter=(uint)0, rb-lsr=(uint)0, rb-dlsr=(uint)0, rb-round-trip=(uint)0;

But there's no cname. Why is that?

Thanks

mat

-----Ursprüngliche Nachricht-----
Von: gstreamer-devel-bounces+mdodt=xion-medical.com at lists.freedesktop.org [mailto:gstreamer-devel-bounces+mdodt=xion-medical.com at lists.freedesktop.org] Im Auftrag von Olivier Crête
Gesendet: 17 September 2011 19:15
An: gstreamer-devel at lists.freedesktop.org
Betreff: Re: Gstrtpbin - one RtpSession, several "on-new-ssrc" calls

On Sat, 2011-09-17 at 09:48 +0200, Marco Ballesio wrote:
> Hi,
> 
> On 9/15/11, Matthias Dodt <MDodt at xion-medical.com> wrote:
> > Hey guys!
> >
> > Is there an implementation to access the specific sdes-GstStructure 
> > for each ssrc announced by the "on-new-ssrc" signal?
> 
> what about the "sdes" property in gstrtpbin?

That's the one you send, the ones you receive are sent to you in the "application/x-rtp-source-sdes" GstMessage of type GST_MESSAGE_ELEMENT.

The other option is to use the "get-internal-session" action signal on gstrtpbin to extract the rtpsession and the use the "get-source-by-ssrc"
action signal on the session to get the rtpsource.. And on the rtpsource, there is a property called "sdes" that contains the content of the SDES.


--
Olivier Crête
olivier.crete at collabora.com


More information about the gstreamer-devel mailing list