From 98039503e90d89459a599cb3dc41955ff81482a6 Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Tue, 6 Sep 2005 15:50:58 +0000 Subject: gst/rtp/: Added mpeg4 video payload encoder/decoder. Original commit message from CVS: * gst/rtp/Makefile.am: * gst/rtp/gstrtp.c: (plugin_init): * gst/rtp/gstrtpmp4vdec.c: (gst_rtpmp4vdec_get_type), (gst_rtpmp4vdec_base_init), (gst_rtpmp4vdec_class_init), (gst_rtpmp4vdec_init), (gst_rtpmp4vdec_setcaps), (gst_rtpmp4vdec_chain), (gst_rtpmp4vdec_set_property), (gst_rtpmp4vdec_get_property), (gst_rtpmp4vdec_change_state), (gst_rtpmp4vdec_plugin_init): * gst/rtp/gstrtpmp4vdec.h: * gst/rtp/gstrtpmp4venc.c: (gst_rtpmp4venc_get_type), (gst_rtpmp4venc_base_init), (gst_rtpmp4venc_class_init), (gst_rtpmp4venc_init), (gst_rtpmp4venc_setcaps), (gst_rtpmp4venc_flush), (gst_rtpmp4venc_chain), (gst_rtpmp4venc_set_property), (gst_rtpmp4venc_get_property), (gst_rtpmp4venc_change_state), (gst_rtpmp4venc_plugin_init): * gst/rtp/gstrtpmp4venc.h: * gst/rtp/gstrtpmpadec.c: (gst_rtpmpadec_chain): * gst/rtp/gstrtpmpaenc.c: (gst_rtpmpaenc_flush): Added mpeg4 video payload encoder/decoder. Added some docs in mpa payloader. --- gst/rtp/gstrtpmpadepay.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'gst/rtp/gstrtpmpadepay.c') diff --git a/gst/rtp/gstrtpmpadepay.c b/gst/rtp/gstrtpmpadepay.c index d969100c..50576a3b 100644 --- a/gst/rtp/gstrtpmpadepay.c +++ b/gst/rtp/gstrtpmpadepay.c @@ -25,7 +25,7 @@ static GstElementDetails gst_rtp_mpadec_details = { "RTP packet parser", "Codec/Parser/Network", - "Extracts MPEG audio from RTP packets", + "Extracts MPEG audio from RTP packets (RFC 2038)", "Wim Taymans " }; @@ -171,7 +171,14 @@ gst_rtpmpadec_chain (GstPad * pad, GstBuffer * buf) frag_offset = (payload[2] << 8) | payload[3]; - /* strip off header */ + /* strip off header + * + * 0 1 2 3 + * 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 + * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + * | MBZ | Frag_offset | + * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + */ payload_len -= 4; payload += 4; @@ -188,6 +195,8 @@ gst_rtpmpadec_chain (GstPad * pad, GstBuffer * buf) gst_buffer_unref (buf); + /* FIXME, we can push half mpeg frames when they are split over multiple + * RTP packets */ ret = gst_pad_push (rtpmpadec->srcpad, outbuf); } -- cgit