summaryrefslogtreecommitdiffstats
path: root/gst/rtp/gstrtpmpadepay.c
diff options
context:
space:
mode:
authorWim Taymans <wim.taymans@gmail.com>2005-09-06 15:50:58 +0000
committerWim Taymans <wim.taymans@gmail.com>2005-09-06 15:50:58 +0000
commit98039503e90d89459a599cb3dc41955ff81482a6 (patch)
treeb8d3423ee9a01c48a4d16dc6b9b7594421800cba /gst/rtp/gstrtpmpadepay.c
parenta0fc3846597e209c141cbc348c052fa2feb90e23 (diff)
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.
Diffstat (limited to 'gst/rtp/gstrtpmpadepay.c')
-rw-r--r--gst/rtp/gstrtpmpadepay.c13
1 files changed, 11 insertions, 2 deletions
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 <wim@fluendo.com>"
};
@@ -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);
}