[gst-cvs] gst-plugins-good: tests: fix rtpjpegpay test

Wim Taymans wtay at kemper.freedesktop.org
Thu Sep 9 09:49:08 PDT 2010


Module: gst-plugins-good
Branch: master
Commit: 5a5c0d6911d1fe87020f8fac0ab415f73464ea76
URL:    http://cgit.freedesktop.org/gstreamer/gst-plugins-good/commit/?id=5a5c0d6911d1fe87020f8fac0ab415f73464ea76

Author: Wim Taymans <wim.taymans at collabora.co.uk>
Date:   Thu Sep  9 18:47:56 2010 +0200

tests: fix rtpjpegpay test

Make the data we send to the jpeg payloader be a valid jpeg file because the
payloader now expects this.

---

 tests/check/elements/rtp-payloading.c |   32 +++++++++++++++++++++++---------
 1 files changed, 23 insertions(+), 9 deletions(-)

diff --git a/tests/check/elements/rtp-payloading.c b/tests/check/elements/rtp-payloading.c
index 3d20f9b..245f332 100644
--- a/tests/check/elements/rtp-payloading.c
+++ b/tests/check/elements/rtp-payloading.c
@@ -714,13 +714,20 @@ GST_START_TEST (rtp_vorbis)
 GST_END_TEST;
 static char rtp_jpeg_frame_data[] =
     { /* SOF */ 0xFF, 0xC0, 0x00, 0x11, 0x08, 0x00, 0x08, 0x00, 0x08,
-  0x03, 0x00, 0x21, 0x08, 0x00, 0x11, 0x08, 0x00, 0x11, 0x08,
-  /* DQT */ 0xFF, 0xDB, 0x00, 0x11, 0x08, 0x00, 0x08, 0x00, 0x08,
-  0x03, 0x00, 0x21, 0x08, 0x00, 0x11, 0x08, 0x00, 0x11, 0x08,
+  0x03, 0x00, 0x21, 0x08, 0x01, 0x11, 0x08, 0x02, 0x11, 0x08,
+  /* DQT */ 0xFF, 0xDB, 0x00, 0x43, 0x08,
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
   /* DATA */ 0x00, 0x00, 0x00, 0x00, 0x00
 };
 
-static int rtp_jpeg_frame_data_size = 42;
+static int rtp_jpeg_frame_data_size = sizeof (rtp_jpeg_frame_data);
 
 static int rtp_jpeg_frame_count = 1;
 
@@ -734,17 +741,24 @@ GST_START_TEST (rtp_jpeg)
 GST_END_TEST;
 static char rtp_jpeg_list_frame_data[] =
     { /* SOF */ 0xFF, 0xC0, 0x00, 0x11, 0x08, 0x00, 0x08, 0x00, 0x08,
-  0x03, 0x00, 0x21, 0x08, 0x00, 0x11, 0x08, 0x00, 0x11, 0x08,
-  /* DQT */ 0xFF, 0xDB, 0x00, 0x11, 0x08, 0x00, 0x08, 0x00, 0x08,
-  0x03, 0x00, 0x21, 0x08, 0x00, 0x11, 0x08, 0x00, 0x11, 0x08,
+  0x03, 0x00, 0x21, 0x08, 0x01, 0x11, 0x08, 0x02, 0x11, 0x08,
+  /* DQT */ 0xFF, 0xDB, 0x00, 0x43, 0x08,
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
   /* DATA */ 0x00, 0x00, 0x00, 0x00, 0x00
 };
 
-static int rtp_jpeg_list_frame_data_size = 42;
+static int rtp_jpeg_list_frame_data_size = sizeof (rtp_jpeg_list_frame_data);
 
 static int rtp_jpeg_list_frame_count = 1;
 
-static int rtp_jpeg_list_bytes_sent = 1 * 42;
+static int rtp_jpeg_list_bytes_sent = 1 * sizeof (rtp_jpeg_list_frame_data);
 
 GST_START_TEST (rtp_jpeg_list)
 {





More information about the Gstreamer-commits mailing list