mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-11 18:05:37 +00:00
session: give caps to session
Let the session parse the caps and update its SSRC when needed.
This commit is contained in:
parent
c06482a2cb
commit
0e53e9109e
2 changed files with 8 additions and 6 deletions
|
@ -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:
|
|||
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);
|
||||
|
|
Loading…
Reference in a new issue