diff options
author | Wim Taymans <wim.taymans@gmail.com> | 2007-08-20 16:52:03 +0000 |
---|---|---|
committer | Wim Taymans <wim.taymans@gmail.com> | 2007-08-20 16:52:03 +0000 |
commit | 7d92376d3b9217c21731aa3c6d0966aded892e1f (patch) | |
tree | 9c41a3e81c1dcff59afe798c29da510c99f623d0 /gst/rtp/gstrtph263ppay.c | |
parent | 45ac408d0abed030eaf8f84af031c0de86e5f5b0 (diff) |
gst/rtp/: Added an H263 depayloader. Fixes #369392.
Original commit message from CVS:
* gst/rtp/Makefile.am:
* gst/rtp/gstrtp.c: (plugin_init):
* gst/rtp/gstrtph263depay.c: (gst_rtp_h263_depay_base_init),
(gst_rtp_h263_depay_class_init), (gst_rtp_h263_depay_init),
(gst_rtp_h263_depay_finalize), (gst_rtp_h263_depay_setcaps),
(gst_rtp_h263_depay_process), (gst_rtp_h263_depay_set_property),
(gst_rtp_h263_depay_get_property),
(gst_rtp_h263_depay_change_state),
(gst_rtp_h263_depay_plugin_init):
* gst/rtp/gstrtph263depay.h:
Added an H263 depayloader. Fixes #369392.
* gst/rtp/gstrtph263pdepay.c: (gst_rtp_h263p_depay_setcaps),
(gst_rtp_h263p_depay_process):
* gst/rtp/gstrtph263ppay.c: (gst_fragmentation_mode_get_type),
(gst_rtp_h263p_pay_class_init), (gst_rtp_h263p_pay_flush):
Make the H263+ pay/depayloader support H263-1998 and H263-2000
payloads.
Also alow plain H263 on the h263p payloaders. Fixes #465040.
Diffstat (limited to 'gst/rtp/gstrtph263ppay.c')
-rw-r--r-- | gst/rtp/gstrtph263ppay.c | 24 |
1 files changed, 15 insertions, 9 deletions
diff --git a/gst/rtp/gstrtph263ppay.c b/gst/rtp/gstrtph263ppay.c index 7deffeff..d5d188aa 100644 --- a/gst/rtp/gstrtph263ppay.c +++ b/gst/rtp/gstrtph263ppay.c @@ -61,25 +61,28 @@ GST_DEBUG_CATEGORY_STATIC (rtph263ppay_debug); static const GstElementDetails gst_rtp_h263ppay_details = GST_ELEMENT_DETAILS ("RTP packet payloader", "Codec/Payloader/Network", - "Payload-encodes H263+ video in RTP packets (RFC 2429)", + "Payload-encodes H263/+/++ video in RTP packets (RFC 4629)", "Wim Taymans <wim@fluendo.com>"); static GstStaticPadTemplate gst_rtp_h263p_pay_sink_template = GST_STATIC_PAD_TEMPLATE ("sink", GST_PAD_SINK, GST_PAD_ALWAYS, - GST_STATIC_CAPS ("video/x-h263, " - "variant = (string) \"itu\", " "h263version = (string) \"h263p\"") + GST_STATIC_CAPS ("video/x-h263, " "variant = (string) \"itu\" ") ); static GstStaticPadTemplate gst_rtp_h263p_pay_src_template = -GST_STATIC_PAD_TEMPLATE ("src", + GST_STATIC_PAD_TEMPLATE ("src", GST_PAD_SRC, GST_PAD_ALWAYS, GST_STATIC_CAPS ("application/x-rtp, " "media = (string) \"video\", " "payload = (int) " GST_RTP_PAYLOAD_DYNAMIC_STRING ", " - "clock-rate = (int) 90000, " "encoding-name = (string) \"H263-1998\"") + "clock-rate = (int) 90000, " "encoding-name = (string) \"H263-1998\"; " + "application/x-rtp, " + "media = (string) \"video\", " + "payload = (int) " GST_RTP_PAYLOAD_DYNAMIC_STRING ", " + "clock-rate = (int) 90000, " "encoding-name = (string) \"H263-2000\"") ); static void gst_rtp_h263p_pay_class_init (GstRtpH263PPayClass * klass); @@ -165,7 +168,7 @@ gst_rtp_h263p_pay_class_init (GstRtpH263PPayClass * klass) DEFAULT_FRAGMENTATION_MODE, G_PARAM_READWRITE)); GST_DEBUG_CATEGORY_INIT (rtph263ppay_debug, "rtph263ppay", - 0, "rtph263ppay (RFC 2429)"); + 0, "rtph263ppay (RFC 4629)"); } @@ -250,16 +253,16 @@ gst_rtp_h263p_pay_flush (GstRtpH263PPay * rtph263ppay) return GST_FLOW_OK; fragmented = FALSE; - /* This algorithm assumes the H263+ encoder sends complete frames in each + /* This algorithm assumes the H263/+/++ encoder sends complete frames in each * buffer */ /* With Fragmentation Mode at GST_FRAGMENTATION_MODE_NORMAL: * This algorithm implements the Follow-on packets method for packetization. * This assumes low packet loss network. * With Fragmentation Mode at GST_FRAGMENTATION_MODE_SYNC: * This algorithm separates large frames at synchronisation points (Segments) - * (See RFC 2429 section 6). It would be interesting to have a property such as network + * (See RFC 4629 section 6). It would be interesting to have a property such as network * quality to select between both packetization methods */ - /* TODO Add VRC supprt (See RFC 2429 section 4.2) */ + /* TODO Add VRC supprt (See RFC 4629 section 5.2) */ while (avail > 0) { guint towrite; @@ -278,12 +281,15 @@ gst_rtp_h263p_pay_flush (GstRtpH263PPay * rtph263ppay) parse_data = gst_adapter_peek (rtph263ppay->adapter, avail); /* Check if we have a gob or eos , eossbs */ + /* FIXME EOS and EOSSBS packets should never contain any gobs and vice-versa */ if (avail >= 3 && *parse_data == 0 && *(parse_data + 1) == 0 && *(parse_data + 2) >= 0x80) { GST_DEBUG_OBJECT (rtph263ppay, " Found GOB header"); found_gob = TRUE; } /* Find next and cut the packet accordingly */ + /* TODO we should get as many gobs as possible until MTU is reached, this + * code seems to just get one GOB per packet */ while (parsed_len + 2 < avail) { if (parse_data[parsed_len] == 0 && parse_data[parsed_len + 1] == 0 && parse_data[parsed_len + 2] >= 0x80) { |