mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-06-06 07:28:53 +00:00
rtspsrc: use profile to set rtcp caps
Use the negotiated profile to set x-rtcp or x-srtcp caps
This commit is contained in:
parent
a7b55d7687
commit
2b59828e0b
1 changed files with 10 additions and 2 deletions
|
@ -3220,7 +3220,11 @@ gst_rtspsrc_stream_configure_mcast (GstRTSPSrc * src, GstRTSPStream * stream,
|
||||||
if (stream->udpsrc[1] == NULL)
|
if (stream->udpsrc[1] == NULL)
|
||||||
goto no_element;
|
goto no_element;
|
||||||
|
|
||||||
caps = gst_caps_new_empty_simple ("application/x-rtcp");
|
if (stream->profile == GST_RTSP_PROFILE_SAVP ||
|
||||||
|
stream->profile == GST_RTSP_PROFILE_SAVPF)
|
||||||
|
caps = gst_caps_new_empty_simple ("application/x-srtcp");
|
||||||
|
else
|
||||||
|
caps = gst_caps_new_empty_simple ("application/x-rtcp");
|
||||||
g_object_set (stream->udpsrc[1], "caps", caps, NULL);
|
g_object_set (stream->udpsrc[1], "caps", caps, NULL);
|
||||||
gst_caps_unref (caps);
|
gst_caps_unref (caps);
|
||||||
|
|
||||||
|
@ -3306,7 +3310,11 @@ gst_rtspsrc_stream_configure_udp (GstRTSPSrc * src, GstRTSPStream * stream,
|
||||||
gst_element_set_locked_state (stream->udpsrc[1], TRUE);
|
gst_element_set_locked_state (stream->udpsrc[1], TRUE);
|
||||||
gst_bin_add (GST_BIN_CAST (src), stream->udpsrc[1]);
|
gst_bin_add (GST_BIN_CAST (src), stream->udpsrc[1]);
|
||||||
|
|
||||||
caps = gst_caps_new_empty_simple ("application/x-rtcp");
|
if (stream->profile == GST_RTSP_PROFILE_SAVP ||
|
||||||
|
stream->profile == GST_RTSP_PROFILE_SAVPF)
|
||||||
|
caps = gst_caps_new_empty_simple ("application/x-srtcp");
|
||||||
|
else
|
||||||
|
caps = gst_caps_new_empty_simple ("application/x-rtcp");
|
||||||
g_object_set (stream->udpsrc[1], "caps", caps, NULL);
|
g_object_set (stream->udpsrc[1], "caps", caps, NULL);
|
||||||
gst_caps_unref (caps);
|
gst_caps_unref (caps);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue