summaryrefslogtreecommitdiffstats
path: root/gst/rtsp/gstrtpdec.c
diff options
context:
space:
mode:
authorWim Taymans <wim.taymans@gmail.com>2006-10-04 17:24:40 +0000
committerWim Taymans <wim.taymans@gmail.com>2006-10-04 17:24:40 +0000
commit63c87f18994eb446e2d84d38c7be3dc81232de7d (patch)
tree6fd484a2c931e99e23fd96583a302cc48bb2b0f4 /gst/rtsp/gstrtpdec.c
parentc85684e2d83ffabe661bdd8aaea1309fa9915a16 (diff)
gst/rtsp/: Factor out extension in separate module.
Original commit message from CVS: * gst/rtsp/Makefile.am: * gst/rtsp/gstrtpdec.c: (gst_rtpdec_getcaps), (gst_rtpdec_chain_rtp), (gst_rtpdec_chain_rtcp): * gst/rtsp/gstrtspsrc.c: (gst_rtspsrc_init), (gst_rtspsrc_finalize), (gst_rtspsrc_create_stream), (gst_rtspsrc_parse_rtpmap), (gst_rtspsrc_stream_configure_transport), (gst_rtspsrc_send), (gst_rtspsrc_parse_methods), (gst_rtspsrc_open), (gst_rtspsrc_play), (gst_rtspsrc_handle_message): * gst/rtsp/gstrtspsrc.h: * gst/rtsp/rtspdefs.c: (rtsp_strresult): * gst/rtsp/rtspdefs.h: * gst/rtsp/rtspext.h: * gst/rtsp/rtspextwms.c: (rtsp_ext_wms_parse_sdp), (rtsp_ext_wms_get_context): * gst/rtsp/rtspextwms.h: * gst/rtsp/rtsptransport.c: (rtsp_transport_init), (parse_mode), (rtsp_transport_parse): * gst/rtsp/rtsptransport.h: Factor out extension in separate module. Fix getcaps to filter against the padtemplate. Use Content-Base if the server gives one. Rework the transport parsing a bit for future extensions. Added some Real Header field definitions.
Diffstat (limited to 'gst/rtsp/gstrtpdec.c')
-rw-r--r--gst/rtsp/gstrtpdec.c25
1 files changed, 21 insertions, 4 deletions
diff --git a/gst/rtsp/gstrtpdec.c b/gst/rtsp/gstrtpdec.c
index 728a1381..a4ea0d46 100644
--- a/gst/rtsp/gstrtpdec.c
+++ b/gst/rtsp/gstrtpdec.c
@@ -222,6 +222,7 @@ gst_rtpdec_getcaps (GstPad * pad)
GstRTPDec *src;
GstPad *other;
GstCaps *caps;
+ const GstCaps *templ;
src = GST_RTPDEC (GST_PAD_PARENT (pad));
@@ -229,8 +230,20 @@ gst_rtpdec_getcaps (GstPad * pad)
caps = gst_pad_peer_get_caps (other);
- if (caps == NULL)
- caps = gst_caps_copy (gst_pad_get_pad_template_caps (pad));
+ templ = gst_pad_get_pad_template_caps (pad);
+ if (caps == NULL) {
+ GST_DEBUG_OBJECT (src, "copy template");
+ caps = gst_caps_copy (templ);
+ } else {
+ GstCaps *intersect;
+
+ GST_DEBUG_OBJECT (src, "intersect with template");
+
+ intersect = gst_caps_intersect (caps, templ);
+ gst_caps_unref (caps);
+
+ caps = intersect;
+ }
return caps;
}
@@ -242,14 +255,18 @@ gst_rtpdec_chain_rtp (GstPad * pad, GstBuffer * buffer)
src = GST_RTPDEC (GST_PAD_PARENT (pad));
- GST_DEBUG ("got rtp packet");
+ GST_DEBUG_OBJECT (src, "got rtp packet");
return gst_pad_push (src->src_rtp, buffer);
}
static GstFlowReturn
gst_rtpdec_chain_rtcp (GstPad * pad, GstBuffer * buffer)
{
- GST_DEBUG ("got rtcp packet");
+ GstRTPDec *src;
+
+ src = GST_RTPDEC (GST_PAD_PARENT (pad));
+
+ GST_DEBUG_OBJECT (src, "got rtcp packet");
gst_buffer_unref (buffer);
return GST_FLOW_OK;