mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-24 01:00:37 +00:00
rtpsession: Track RTX ssrc caps
This is needed so that we can generate SR for RTX stream correctly (the clock rate is required). https://bugzilla.gnome.org/show_bug.cgi?id=747394
This commit is contained in:
parent
17c6532b75
commit
26bec72e52
2 changed files with 17 additions and 0 deletions
|
@ -606,9 +606,17 @@ gst_rtp_rtx_send_sink_event (GstPad * pad, GstObject * parent, GstEvent * event)
|
|||
data = gst_rtp_rtx_send_get_ssrc_data (rtx, ssrc);
|
||||
gst_structure_get_int (s, "clock-rate", &data->clock_rate);
|
||||
|
||||
/* The session might need to know the RTX ssrc */
|
||||
caps = gst_caps_copy (caps);
|
||||
gst_caps_set_simple (caps, "rtx-ssrc", G_TYPE_UINT, data->rtx_ssrc, NULL);
|
||||
|
||||
GST_DEBUG_OBJECT (rtx, "got clock-rate from caps: %d for ssrc: %u",
|
||||
data->clock_rate, ssrc);
|
||||
GST_OBJECT_UNLOCK (rtx);
|
||||
|
||||
gst_event_unref (event);
|
||||
event = gst_event_new_caps (caps);
|
||||
gst_caps_unref (caps);
|
||||
break;
|
||||
}
|
||||
default:
|
||||
|
|
|
@ -2701,6 +2701,15 @@ rtp_session_update_send_caps (RTPSession * sess, GstCaps * caps)
|
|||
rtp_source_update_caps (source, caps);
|
||||
g_object_unref (source);
|
||||
}
|
||||
|
||||
if (gst_structure_get_uint (s, "rtx-ssrc", &ssrc)) {
|
||||
source =
|
||||
obtain_internal_source (sess, ssrc, &created, GST_CLOCK_TIME_NONE);
|
||||
if (source) {
|
||||
rtp_source_update_caps (source, caps);
|
||||
g_object_unref (source);
|
||||
}
|
||||
}
|
||||
RTP_SESSION_UNLOCK (sess);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue