From d983342dbd1d15bc918cdf5d3216d1d5c731c9d4 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Sebastian=20Dr=C3=B6ge?= Date: Sat, 10 Jul 2010 15:32:29 +0200 Subject: [PATCH] [MOVED FROM BAD 2/6] vp8enc: Also check the output caps in the unit test --- tests/check/elements/vp8enc.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/tests/check/elements/vp8enc.c b/tests/check/elements/vp8enc.c index c9c6b00..426f650 100644 --- a/tests/check/elements/vp8enc.c +++ b/tests/check/elements/vp8enc.c @@ -95,6 +95,7 @@ GST_START_TEST (test_encode_simple) GstBuffer *buffer; gint i; GList *l; + GstCaps *outcaps; vp8enc = setup_vp8enc @@ -122,6 +123,10 @@ GST_START_TEST (test_encode_simple) /* All buffers must be there now */ fail_unless_equals_int (g_list_length (buffers), 20); + outcaps = + gst_caps_from_string + ("video/x-vp8,width=(int)320,height=(int)240,framerate=(fraction)25/1"); + for (l = buffers, i = 0; l; l = l->next, i++) { buffer = l->data; @@ -132,10 +137,13 @@ GST_START_TEST (test_encode_simple) gst_util_uint64_scale (i, GST_SECOND, 25)); fail_unless_equals_uint64 (GST_BUFFER_DURATION (buffer), gst_util_uint64_scale (1, GST_SECOND, 25)); + + fail_unless (gst_caps_can_intersect (GST_BUFFER_CAPS (buffer), outcaps)); } - cleanup_vp8enc (vp8enc); + gst_caps_unref (outcaps); + cleanup_vp8enc (vp8enc); } GST_END_TEST; -- 2.7.4