diff options
author | Nicola Murino <nicola.murino@gmail.com> | 2016-12-21 17:43:58 +0100 |
---|---|---|
committer | Tim-Philipp Müller <tim@centricular.com> | 2016-12-21 16:58:42 +0000 |
commit | 8fe478c8a7746cd2c63f20d23e97e26e1a0e6192 (patch) | |
tree | 8be7973868b41d2074bce497856afe2df01c690b | |
parent | 38265ee1a50b2288dd38a4a9edf8b5e8b01d624c (diff) | |
download | gstreamer-plugins-good-8fe478c8a7746cd2c63f20d23e97e26e1a0e6192.tar.gz |
matroskamux: adjust unit test to modified behaviour
Now matroskamux mark all packets of audio-only streams as keyframes so
in test_block_group after pushing the test audio data 4 buffers are produced
and not more 2. The last buffer is the original data and must match with what
pushed. The remaining ones are matroskamux headers
https://bugzilla.gnome.org/show_bug.cgi?id=754696
-rw-r--r-- | tests/check/elements/matroskamux.c | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/tests/check/elements/matroskamux.c b/tests/check/elements/matroskamux.c index 455c2865c..7772d8f21 100644 --- a/tests/check/elements/matroskamux.c +++ b/tests/check/elements/matroskamux.c @@ -311,11 +311,14 @@ GST_START_TEST (test_block_group) GstCaps *caps; int num_buffers; int i; - guint8 data0[] = { 0xa0, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, - 0xa1, 0x85, - 0x81, 0x00, 0x01, 0x00 + guint8 data0[] = { 0x1f, 0x43, 0xb6, 0x75, 0x01, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xe7, 0x81, 0x01 }; - guint8 data1[] = { 0x42 }; + guint8 data1[] = { 0xab, 0x81, 0x1f }; + guint8 data2[] = { 0xa0, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x07, 0xa1, 0x85, 0x81, 0x00, 0x00, 0x00 + }; + guint8 data3[] = { 0x42 }; matroskamux = setup_matroskamux (&srcac3template); @@ -353,7 +356,7 @@ GST_START_TEST (test_block_group) fail_unless (gst_pad_push (mysrcpad, inbuffer) == GST_FLOW_OK); num_buffers = g_list_length (buffers); - fail_unless (num_buffers >= 2); + fail_unless (num_buffers >= 4); for (i = 0; i < num_buffers; ++i) { outbuffer = GST_BUFFER (buffers->data); @@ -367,6 +370,12 @@ GST_START_TEST (test_block_group) case 1: check_buffer_data (outbuffer, data1, sizeof (data1)); break; + case 2: + check_buffer_data (outbuffer, data2, sizeof (data2)); + break; + case 3: + check_buffer_data (outbuffer, data3, sizeof (data3)); + break; default: break; } |