Commit 0e53e910 authored by Wim Taymans's avatar Wim Taymans
Browse files

session: give caps to session

Let the session parse the caps and update its SSRC when needed.
parent c06482a2
......@@ -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;
......@@ -2440,11 +2440,19 @@ ignore:
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_source_update_caps (sess->source, caps);
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment