From: Wim Taymans Date: Thu, 25 Jul 2013 23:24:07 +0000 (+0200) Subject: session: give caps to session X-Git-Tag: 1.19.3~509^2~5548 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=0e53e9109e667a0a03e5a961b97a7230799d715c;p=platform%2Fupstream%2Fgstreamer.git session: give caps to session Let the session parse the caps and update its SSRC when needed. --- diff --git a/gst/rtpmanager/gstrtpsession.c b/gst/rtpmanager/gstrtpsession.c index b971fd3..65b4b11 100644 --- a/gst/rtpmanager/gstrtpsession.c +++ b/gst/rtpmanager/gstrtpsession.c @@ -1883,15 +1883,9 @@ gst_rtp_session_setcaps_send_rtp (GstPad * pad, GstRtpSession * rtpsession, GstCaps * caps) { GstRtpSessionPrivate *priv; - GstStructure *s = gst_caps_get_structure (caps, 0); - guint ssrc; priv = rtpsession->priv; - if (gst_structure_get_uint (s, "ssrc", &ssrc)) { - GST_DEBUG_OBJECT (rtpsession, "setting internal SSRC to %08x", ssrc); - rtp_session_set_internal_ssrc (priv->session, ssrc); - } rtp_session_update_send_caps (priv->session, caps); return TRUE; diff --git a/gst/rtpmanager/rtpsession.c b/gst/rtpmanager/rtpsession.c index 29bf7b6..14edc55 100644 --- a/gst/rtpmanager/rtpsession.c +++ b/gst/rtpmanager/rtpsession.c @@ -2440,11 +2440,19 @@ ignore: void rtp_session_update_send_caps (RTPSession * sess, GstCaps * caps) { + GstStructure *s; + guint ssrc; + g_return_if_fail (RTP_IS_SESSION (sess)); g_return_if_fail (GST_IS_CAPS (caps)); GST_LOG ("received caps %" GST_PTR_FORMAT, caps); + s = gst_caps_get_structure (caps, 0); + + if (gst_structure_get_uint (s, "ssrc", &ssrc)) + rtp_session_set_internal_ssrc (sess, ssrc); + RTP_SESSION_LOCK (sess); rtp_source_update_caps (sess->source, caps); RTP_SESSION_UNLOCK (sess);