summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim-Philipp Müller <tim@centricular.com>2020-03-12 16:55:44 +0000
committerTim-Philipp Müller <tim@centricular.com>2020-03-13 14:39:36 +0000
commit023628d455b8ae67c81d3bcb3a73bc39882ebe19 (patch)
treefd3737bc6812d4fe60cf94b117e6c7787f679ab8
parent88df7aba22ee9013ab355da1b2ba02df935f80ab (diff)
tests: rtp-payloading: add minimal vp8/vp9 rtp payloading/depayloading test
-rw-r--r--tests/check/elements/rtp-payloading.c52
1 files changed, 52 insertions, 0 deletions
diff --git a/tests/check/elements/rtp-payloading.c b/tests/check/elements/rtp-payloading.c
index d16801196..6d34947e3 100644
--- a/tests/check/elements/rtp-payloading.c
+++ b/tests/check/elements/rtp-payloading.c
@@ -1293,6 +1293,56 @@ GST_START_TEST (rtp_vorbis)
}
GST_END_TEST;
+
+/* videotestsrc pattern=red ! video/x-raw,width=160,height=120 ! vp8enc */
+#define VP8_CAPS "video/x-vp8, profile=(string)0, " \
+ "streamheader=(buffer)4f5650383001010000a000780000010000010000001e00000001, " \
+ "width=(int)160, height=(int)120, framerate=(fraction)30/1"
+
+static const guint8 rtp_vp8_frame_data[] = {
+ 0x30, 0x07, 0x00, 0x9d, 0x01, 0x2a, 0xa0, 0x00,
+ 0x78, 0x00, 0x00, 0x47, 0x08, 0x85, 0x85, 0x88,
+ 0x85, 0x84, 0x88, 0x02, 0x02, 0x02, 0x75, 0xaa,
+ 0x03, 0xf8, 0x03, 0xfa, 0x02, 0x06, 0xc3, 0xef,
+ 0x05, 0x10, 0x9c, 0x52, 0xd2, 0xa1, 0x38, 0xa5,
+ 0xa5, 0x42, 0x71, 0x4b, 0x4a, 0x84, 0xe2, 0x96,
+ 0x95, 0x09, 0xc5, 0x2d, 0x2a, 0x13, 0x8a, 0x5a,
+ 0x54, 0x27, 0x14, 0xb4, 0xa8, 0x4e, 0x29, 0x69,
+ 0x50, 0x9b, 0x00, 0xfe, 0xfd, 0x6e, 0xf3, 0xff,
+ 0xe3, 0x99, 0x37, 0x30, 0xc4, 0xff, 0x8e, 0x6d,
+ 0xff, 0xf1, 0x61, 0x3c, 0x0e, 0x28, 0xc8, 0xff,
+ 0xf1, 0x51, 0x00
+};
+
+GST_START_TEST (rtp_vp8)
+{
+ rtp_pipeline_test (rtp_vp8_frame_data, sizeof (rtp_vp8_frame_data), 1,
+ VP8_CAPS, "rtpvp8pay", "rtpvp8depay", 0, 0, FALSE);
+}
+
+GST_END_TEST;
+
+/* videotestsrc pattern=red ! video/x-raw,width=160,height=120 ! vp9enc */
+#define VP9_CAPS "video/x-vp9, profile=(string)0, " \
+ "width=(int)160, height=(int)120, framerate=(fraction)30/1"
+
+static const guint8 rtp_vp9_frame_data[] = {
+ 0x82, 0x49, 0x83, 0x42, 0x00, 0x09, 0xf0, 0x07,
+ 0x76, 0x00, 0x38, 0x24, 0x1c, 0x18, 0x42, 0x00,
+ 0x00, 0x30, 0x60, 0x00, 0x00, 0x67, 0x3f, 0xff,
+ 0xfe, 0x69, 0x95, 0xff, 0xff, 0xff, 0xfe, 0x99,
+ 0x6b, 0xff, 0xff, 0xff, 0xff, 0x62, 0x98, 0x1d,
+ 0x45, 0x4c, 0x90, 0xc4, 0x70
+};
+
+GST_START_TEST (rtp_vp9)
+{
+ rtp_pipeline_test (rtp_vp9_frame_data, sizeof (rtp_vp9_frame_data), 1,
+ VP9_CAPS, "rtpvp9pay", "rtpvp9depay", 0, 0, FALSE);
+}
+
+GST_END_TEST;
+
static const guint8 rtp_jpeg_frame_data[] =
{ /* SOF */ 0xFF, 0xC0, 0x00, 0x11, 0x08, 0x00, 0x08, 0x00, 0x08,
0x03, 0x00, 0x21, 0x08, 0x01, 0x11, 0x08, 0x02, 0x11, 0x08,
@@ -1661,6 +1711,8 @@ rtp_payloading_suite (void)
tcase_add_test (tc_chain, rtp_mp4g);
tcase_add_test (tc_chain, rtp_theora);
tcase_add_test (tc_chain, rtp_vorbis);
+ tcase_add_test (tc_chain, rtp_vp8);
+ tcase_add_test (tc_chain, rtp_vp9);
tcase_add_test (tc_chain, rtp_jpeg);
tcase_add_test (tc_chain, rtp_jpeg_width_greater_than_2040);
tcase_add_test (tc_chain, rtp_jpeg_height_greater_than_2040);