rtspsrc: use profile to set rtcp caps

Use the negotiated profile to set x-rtcp or x-srtcp caps
This commit is contained in:
Wim Taymans 2014-03-24 15:35:09 +01:00
parent a7b55d7687
commit 2b59828e0b

View file

@ -3220,7 +3220,11 @@ gst_rtspsrc_stream_configure_mcast (GstRTSPSrc * src, GstRTSPStream * stream,
if (stream->udpsrc[1] == NULL)
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);
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_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);
gst_caps_unref (caps);