From: Robert Krakora Date: Wed, 3 Aug 2011 08:09:42 +0000 (+0200) Subject: rtpjpegpay: Add support for H.264 payload in MJPEG container X-Git-Tag: RELEASE-0.11.1~7^2~361 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=f7893b8721832cdcbfd80b9fdb78143637c7d4ae;p=platform%2Fupstream%2Fgst-plugins-good.git rtpjpegpay: Add support for H.264 payload in MJPEG container See http://www.quickcamteam.net/uvc-h264/USB_Video_Payload_H.264_0.87.pdf Fixes bug #655530. --- diff --git a/gst/rtp/gstrtpjpegpay.c b/gst/rtp/gstrtpjpegpay.c index f223847..33e026b 100644 --- a/gst/rtp/gstrtpjpegpay.c +++ b/gst/rtp/gstrtpjpegpay.c @@ -89,6 +89,7 @@ typedef enum _RtpJpegMarker RtpJpegMarker; * @JPEG_MARKER_SOS: Start of Scan marker * @JPEG_MARKER_EOI: End of Image marker * @JPEG_MARKER_DRI: Define Restart Interval marker + * @JPEG_MARKER_H264: H264 marker * * Identifers for markers in JPEG header */ @@ -103,7 +104,8 @@ enum _RtpJpegMarker JPEG_MARKER_DHT = 0xC4, JPEG_MARKER_SOS = 0xDA, JPEG_MARKER_EOI = 0xD9, - JPEG_MARKER_DRI = 0xDD + JPEG_MARKER_DRI = 0xDD, + JPEG_MARKER_H264 = 0xE4 }; #define DEFAULT_JPEG_QUANT 255 @@ -590,7 +592,7 @@ gst_rtp_jpeg_pay_scan_marker (const guint8 * data, guint size, guint * offset) guint8 marker; marker = data[*offset]; - GST_LOG ("found %02x marker at offset %u", marker, *offset); + GST_LOG ("found 0x%02x marker at offset %u", marker, *offset); (*offset)++; return marker; } @@ -644,6 +646,7 @@ gst_rtp_jpeg_pay_handle_buffer (GstBaseRTPPayload * basepayload, case JPEG_MARKER_JFIF: case JPEG_MARKER_CMT: case JPEG_MARKER_DHT: + case JPEG_MARKER_H264: GST_LOG_OBJECT (pay, "skipping marker"); offset += gst_rtp_jpeg_pay_header_size (data, offset); break;