0x00, 0x00, 0x00, 0x01, 0x68, 0xeb, 0xec, 0xb2
};
+/* SEI buffering_period() message */
+static guint8 h264_sei_buffering_period[] = {
+ 0x00, 0x00, 0x00, 0x01, 0x06, 0x00, 0x01, 0xc0
+};
+
/* combines to this codec-data */
static guint8 h264_avc_codec_data[] = {
0x01, 0x4d, 0x40, 0x15, 0xff, 0xe1, 0x00, 0x17,
if (vdata->discard) {
/* check separate header NALs */
gint i = vdata->buffer_counter;
+ guint ofs;
- fail_unless (i <= 1);
- fail_unless (gst_buffer_get_size (buffer) == ctx_headers[i].size);
- fail_unless (gst_buffer_memcmp (buffer, 0, ctx_headers[i].data,
+ /* SEI with start code prefix with 2 0-bytes */
+ ofs = i == 1;
+
+ fail_unless (i <= 2);
+ fail_unless (gst_buffer_get_size (buffer) == ctx_headers[i].size - ofs);
+ fail_unless (gst_buffer_memcmp (buffer, 0, ctx_headers[i].data + ofs,
gst_buffer_get_size (buffer)) == 0);
} else {
GstMapInfo map;
guint8 *data = map.data;
fail_unless (map.size == vdata->data_to_verify_size +
- ctx_headers[0].size + ctx_headers[1].size);
+ ctx_headers[0].size + ctx_headers[1].size + ctx_headers[2].size);
fail_unless (GST_READ_UINT32_BE (data) == ctx_headers[0].size - 4);
fail_unless (memcmp (data + 4, ctx_headers[0].data + 4,
ctx_headers[0].size - 4) == 0);
fail_unless (memcmp (data + 4, ctx_headers[1].data + 4,
ctx_headers[1].size - 4) == 0);
data += ctx_headers[1].size;
+ fail_unless (GST_READ_UINT32_BE (data) == ctx_headers[2].size - 4);
+ fail_unless (memcmp (data + 4, ctx_headers[2].data + 4,
+ ctx_headers[2].size - 4) == 0);
+ data += ctx_headers[2].size;
fail_unless (GST_READ_UINT32_BE (data) == vdata->data_to_verify_size - 4);
fail_unless (memcmp (data + 4, vdata->data_to_verify + 4,
vdata->data_to_verify_size - 4) == 0);
ctx_src_template = &srctemplate;
ctx_headers[0].data = h264_sps;
ctx_headers[0].size = sizeof (h264_sps);
- ctx_headers[1].data = h264_pps;
- ctx_headers[1].size = sizeof (h264_pps);
+ ctx_headers[1].data = h264_sei_buffering_period;
+ ctx_headers[1].size = sizeof (h264_sei_buffering_period);
+ ctx_headers[2].data = h264_pps;
+ ctx_headers[2].size = sizeof (h264_pps);
ctx_verify_buffer = verify_buffer;
/* discard initial sps/pps buffers */
- ctx_discard = 2;
+ ctx_discard = 3;
/* no timing info to parse */
ctx_no_metadata = TRUE;
ctx_codec_data = FALSE;
/* no more config headers */
ctx_headers[0].data = NULL;
ctx_headers[1].data = NULL;
+ ctx_headers[2].data = NULL;
ctx_headers[0].size = 0;
ctx_headers[1].size = 0;
+ ctx_headers[2].size = 0;
/* and need adapter buffer check */
ctx_verify_buffer = verify_buffer_packetized;