Commit 20111b55 authored by Sebastian Dröge's avatar Sebastian Dröge
Browse files

tests/check/elements/: Don't use declarations after statements.

Original commit message from CVS:
* tests/check/elements/cmmldec.c: (GST_START_TEST):
* tests/check/elements/rtp-payloading.c: (rtp_pipeline_create),
(rtp_pipeline_run):
* tests/check/elements/souphttpsrc.c: (souphttpsrc_suite):
Don't use declarations after statements.
parent 173741c1
2008-07-14 Sebastian Dröge <slomo@circular-chaos.org>
* tests/check/elements/cmmldec.c: (GST_START_TEST):
* tests/check/elements/rtp-payloading.c: (rtp_pipeline_create),
(rtp_pipeline_run):
* tests/check/elements/souphttpsrc.c: (souphttpsrc_suite):
Don't use declarations after statements.
2008-07-14 Mark Nauwelaerts <mark.nauwelaerts@collabora.co.uk> 2008-07-14 Mark Nauwelaerts <mark.nauwelaerts@collabora.co.uk>
   
* ext/jpeg/gstjpegdec.c: * ext/jpeg/gstjpegdec.c:
......
...@@ -87,12 +87,19 @@ G_STMT_START { \ ...@@ -87,12 +87,19 @@ G_STMT_START { \
} G_STMT_END; } G_STMT_END;
static GstElement *cmmldec; static GstElement *cmmldec;
static GstBus *bus; static GstBus *bus;
static GstFlowReturn flow; static GstFlowReturn flow;
GList *buffers; GList *buffers;
static GList *current_buf; static GList *current_buf;
static gint64 granulerate; static gint64 granulerate;
static guint8 granuleshift; static guint8 granuleshift;
static GstPad *srcpad, *sinkpad; static GstPad *srcpad, *sinkpad;
static GstStaticPadTemplate sinktemplate = GST_STATIC_PAD_TEMPLATE ("sink", static GstStaticPadTemplate sinktemplate = GST_STATIC_PAD_TEMPLATE ("sink",
...@@ -111,6 +118,7 @@ static GstBuffer * ...@@ -111,6 +118,7 @@ static GstBuffer *
buffer_new (const gchar * buffer_data, guint size) buffer_new (const gchar * buffer_data, guint size)
{ {
GstBuffer *buffer; GstBuffer *buffer;
GstCaps *caps; GstCaps *caps;
buffer = gst_buffer_new_and_alloc (size); buffer = gst_buffer_new_and_alloc (size);
...@@ -205,8 +213,11 @@ static GObject * ...@@ -205,8 +213,11 @@ static GObject *
cmml_tag_message_pop (GstBus * bus, const gchar * tag) cmml_tag_message_pop (GstBus * bus, const gchar * tag)
{ {
GstMessage *message; GstMessage *message;
GstTagList *taglist; GstTagList *taglist;
const GValue *value; const GValue *value;
GObject *obj; GObject *obj;
message = gst_bus_poll (bus, GST_MESSAGE_TAG, 0); message = gst_bus_poll (bus, GST_MESSAGE_TAG, 0);
...@@ -232,7 +243,9 @@ static void ...@@ -232,7 +243,9 @@ static void
check_headers () check_headers ()
{ {
GObject *head_tag; GObject *head_tag;
gchar *title, *base; gchar *title, *base;
GValueArray *meta; GValueArray *meta;
/* push the ident header */ /* push the ident header */
...@@ -276,7 +289,9 @@ push_clip_full (const gchar * name, const gchar * track, const gchar * template, ...@@ -276,7 +289,9 @@ push_clip_full (const gchar * name, const gchar * track, const gchar * template,
GstClockTime prev, GstClockTime start) GstClockTime prev, GstClockTime start)
{ {
gchar *clip; gchar *clip;
gint64 keyindex, keyoffset, granulepos; gint64 keyindex, keyoffset, granulepos;
GstFlowReturn res; GstFlowReturn res;
if (track == NULL) if (track == NULL)
...@@ -328,7 +343,9 @@ check_output_clip (const gchar * name, const gchar * track, ...@@ -328,7 +343,9 @@ check_output_clip (const gchar * name, const gchar * track,
GST_START_TEST (test_dec) GST_START_TEST (test_dec)
{ {
GstClockTime clip1_start = 1 * GST_SECOND + 234 * GST_MSECOND; GstClockTime clip1_start = 1 * GST_SECOND + 234 * GST_MSECOND;
GstClockTime clip2_start = clip1_start; GstClockTime clip2_start = clip1_start;
GstClockTime clip3_start = GstClockTime clip3_start =
((100 * 3600) + (59 * 60) + 59) * GST_SECOND + 678 * GST_MSECOND; ((100 * 3600) + (59 * 60) + 59) * GST_SECOND + 678 * GST_MSECOND;
...@@ -374,13 +391,21 @@ GST_END_TEST; ...@@ -374,13 +391,21 @@ GST_END_TEST;
GST_START_TEST (test_tags) GST_START_TEST (test_tags)
{ {
GObject *tag; GObject *tag;
gboolean empty; gboolean empty;
gchar *id, *track; gchar *id, *track;
gint64 start_time, end_time; gint64 start_time, end_time;
gchar *anchor_href, *anchor_text; gchar *anchor_href, *anchor_text;
gchar *img_src, *img_alt; gchar *img_src, *img_alt;
gchar *desc; gchar *desc;
GValueArray *meta; GValueArray *meta;
GstClockTime clip1_start; GstClockTime clip1_start;
check_headers (); check_headers ();
...@@ -427,19 +452,25 @@ GST_END_TEST; ...@@ -427,19 +452,25 @@ GST_END_TEST;
GST_START_TEST (test_wait_clip_end) GST_START_TEST (test_wait_clip_end)
{ {
GObject *tag; GObject *tag;
gchar *id;
GstClockTime end_time = 0;
g_object_set (cmmldec, "wait-clip-end-time", TRUE, NULL); gchar *id;
check_headers (); GstClockTime end_time = 0;
GstClockTime clip1_start = 1 * GST_SECOND + 234 * GST_MSECOND; GstClockTime clip1_start = 1 * GST_SECOND + 234 * GST_MSECOND;
GstClockTime clip2_start = 2 * GST_SECOND + 234 * GST_MSECOND; GstClockTime clip2_start = 2 * GST_SECOND + 234 * GST_MSECOND;
GstClockTime clip3_start = 3 * GST_SECOND + 234 * GST_MSECOND; GstClockTime clip3_start = 3 * GST_SECOND + 234 * GST_MSECOND;
GstClockTime clip3_end = 4 * GST_SECOND + 234 * GST_MSECOND; GstClockTime clip3_end = 4 * GST_SECOND + 234 * GST_MSECOND;
GstClockTime clip4_start = 5 * GST_SECOND + 234 * GST_MSECOND; GstClockTime clip4_start = 5 * GST_SECOND + 234 * GST_MSECOND;
g_object_set (cmmldec, "wait-clip-end-time", TRUE, NULL);
check_headers ();
flow = push_clip ("clip-1", "default", 0, clip1_start); flow = push_clip ("clip-1", "default", 0, clip1_start);
fail_unless_equals_flow_return (flow, GST_FLOW_OK); fail_unless_equals_flow_return (flow, GST_FLOW_OK);
/* no tag has been posted yet */ /* no tag has been posted yet */
...@@ -521,8 +552,11 @@ GST_END_TEST; ...@@ -521,8 +552,11 @@ GST_END_TEST;
GST_START_TEST (test_sink_query_convert) GST_START_TEST (test_sink_query_convert)
{ {
guint64 keyindex, keyoffset, granulepos; guint64 keyindex, keyoffset, granulepos;
GstClockTime index_time, offset_time; GstClockTime index_time, offset_time;
GstFormat dstfmt = GST_FORMAT_TIME; GstFormat dstfmt = GST_FORMAT_TIME;
gint64 dstval; gint64 dstval;
/* send headers to set the granulerate */ /* send headers to set the granulerate */
...@@ -550,6 +584,7 @@ Suite * ...@@ -550,6 +584,7 @@ Suite *
cmmldec_suite () cmmldec_suite ()
{ {
Suite *s = suite_create ("cmmldec"); Suite *s = suite_create ("cmmldec");
TCase *tc_general = tcase_create ("general"); TCase *tc_general = tcase_create ("general");
suite_add_tcase (s, tc_general); suite_add_tcase (s, tc_general);
......
...@@ -54,7 +54,9 @@ rtp_bus_callback (GstBus * bus, GstMessage * message, gpointer data) ...@@ -54,7 +54,9 @@ rtp_bus_callback (GstBus * bus, GstMessage * message, gpointer data)
case GST_MESSAGE_ERROR: case GST_MESSAGE_ERROR:
{ {
GError *err; GError *err;
gchar *debug; gchar *debug;
gchar *element_name; gchar *element_name;
element_name = (message->src) ? gst_object_get_name (message->src) : NULL; element_name = (message->src) ? gst_object_get_name (message->src) : NULL;
...@@ -104,13 +106,17 @@ rtp_pipeline_create (const char *frame_data, int frame_data_size, ...@@ -104,13 +106,17 @@ rtp_pipeline_create (const char *frame_data, int frame_data_size,
{ {
gchar *pipeline_name; gchar *pipeline_name;
rtp_pipeline *p;
GstCaps *caps;
/* Check parameters. */ /* Check parameters. */
if (!frame_data || !pay || !depay) { if (!frame_data || !pay || !depay) {
return NULL; return NULL;
} }
/* Allocate memory for the RTP pipeline. */ /* Allocate memory for the RTP pipeline. */
rtp_pipeline *p = (rtp_pipeline *) malloc (sizeof (rtp_pipeline)); p = (rtp_pipeline *) malloc (sizeof (rtp_pipeline));
p->frame_data = frame_data; p->frame_data = frame_data;
p->frame_data_size = frame_data_size; p->frame_data_size = frame_data_size;
...@@ -159,7 +165,7 @@ rtp_pipeline_create (const char *frame_data, int frame_data_size, ...@@ -159,7 +165,7 @@ rtp_pipeline_create (const char *frame_data, int frame_data_size,
g_object_set (p->fdsrc, "num-buffers", p->frame_count * LOOP_COUNT, NULL); g_object_set (p->fdsrc, "num-buffers", p->frame_count * LOOP_COUNT, NULL);
/* Set caps filters. */ /* Set caps filters. */
GstCaps *caps = gst_caps_from_string (filtercaps); caps = gst_caps_from_string (filtercaps);
g_object_set (p->capsfilter, "caps", caps, NULL); g_object_set (p->capsfilter, "caps", caps, NULL);
gst_caps_unref (caps); gst_caps_unref (caps);
...@@ -217,6 +223,10 @@ rtp_pipeline_run (rtp_pipeline * p) ...@@ -217,6 +223,10 @@ rtp_pipeline_run (rtp_pipeline * p)
{ {
GMainLoop *mainloop = NULL; GMainLoop *mainloop = NULL;
GstBus *bus;
gint i;
/* Check parameters. */ /* Check parameters. */
if (p == NULL) { if (p == NULL) {
return; return;
...@@ -229,7 +239,7 @@ rtp_pipeline_run (rtp_pipeline * p) ...@@ -229,7 +239,7 @@ rtp_pipeline_run (rtp_pipeline * p)
} }
/* Add bus callback. */ /* Add bus callback. */
GstBus *bus = gst_pipeline_get_bus (GST_PIPELINE (p->pipeline)); bus = gst_pipeline_get_bus (GST_PIPELINE (p->pipeline));
gst_bus_add_watch (bus, rtp_bus_callback, (gpointer) mainloop); gst_bus_add_watch (bus, rtp_bus_callback, (gpointer) mainloop);
gst_object_unref (bus); gst_object_unref (bus);
...@@ -239,10 +249,9 @@ rtp_pipeline_run (rtp_pipeline * p) ...@@ -239,10 +249,9 @@ rtp_pipeline_run (rtp_pipeline * p)
/* TODO: Writing may need some changes... */ /* TODO: Writing may need some changes... */
int i = 0; for (i = 0; i < LOOP_COUNT; i++) {
for (; i < LOOP_COUNT; i++) {
const char *frame_data_pointer = p->frame_data; const char *frame_data_pointer = p->frame_data;
int frame_count = p->frame_count; int frame_count = p->frame_count;
/* Write in to the pipe. */ /* Write in to the pipe. */
...@@ -296,7 +305,9 @@ static char rtp_ilbc_frame_data[] = ...@@ -296,7 +305,9 @@ static char rtp_ilbc_frame_data[] =
{ 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
}; };
static int rtp_ilbc_frame_data_size = 20; static int rtp_ilbc_frame_data_size = 20;
static int rtp_ilbc_frame_count = 1; static int rtp_ilbc_frame_count = 1;
GST_START_TEST (rtp_ilbc) GST_START_TEST (rtp_ilbc)
...@@ -311,7 +322,9 @@ static char rtp_gsm_frame_data[] = ...@@ -311,7 +322,9 @@ static char rtp_gsm_frame_data[] =
{ 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
}; };
static int rtp_gsm_frame_data_size = 20; static int rtp_gsm_frame_data_size = 20;
static int rtp_gsm_frame_count = 1; static int rtp_gsm_frame_count = 1;
GST_START_TEST (rtp_gsm) GST_START_TEST (rtp_gsm)
...@@ -327,7 +340,9 @@ static char rtp_amr_frame_data[] = ...@@ -327,7 +340,9 @@ static char rtp_amr_frame_data[] =
0x7a, 0x37, 0x16, 0x41, 0x41, 0xc0, 0x00, 0x0d, 0xcd, 0x12, 0xed, 0x7a, 0x37, 0x16, 0x41, 0x41, 0xc0, 0x00, 0x0d, 0xcd, 0x12, 0xed,
0xad, 0x80, 0x00, 0x00, 0x11, 0x31, 0x00, 0x00, 0x0d, 0xa0 0xad, 0x80, 0x00, 0x00, 0x11, 0x31, 0x00, 0x00, 0x0d, 0xa0
}; };
static int rtp_amr_frame_data_size = 32; static int rtp_amr_frame_data_size = 32;
static int rtp_amr_frame_count = 1; static int rtp_amr_frame_count = 1;
GST_START_TEST (rtp_amr) GST_START_TEST (rtp_amr)
...@@ -342,7 +357,9 @@ static char rtp_pcma_frame_data[] = ...@@ -342,7 +357,9 @@ static char rtp_pcma_frame_data[] =
{ 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
}; };
static int rtp_pcma_frame_data_size = 20; static int rtp_pcma_frame_data_size = 20;
static int rtp_pcma_frame_count = 1; static int rtp_pcma_frame_count = 1;
GST_START_TEST (rtp_pcma) GST_START_TEST (rtp_pcma)
...@@ -357,7 +374,9 @@ static char rtp_pcmu_frame_data[] = ...@@ -357,7 +374,9 @@ static char rtp_pcmu_frame_data[] =
{ 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
}; };
static int rtp_pcmu_frame_data_size = 20; static int rtp_pcmu_frame_data_size = 20;
static int rtp_pcmu_frame_count = 1; static int rtp_pcmu_frame_count = 1;
GST_START_TEST (rtp_pcmu) GST_START_TEST (rtp_pcmu)
...@@ -372,7 +391,9 @@ static char rtp_mpa_frame_data[] = ...@@ -372,7 +391,9 @@ static char rtp_mpa_frame_data[] =
{ 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
}; };
static int rtp_mpa_frame_data_size = 20; static int rtp_mpa_frame_data_size = 20;
static int rtp_mpa_frame_count = 1; static int rtp_mpa_frame_count = 1;
GST_START_TEST (rtp_mpa) GST_START_TEST (rtp_mpa)
...@@ -386,7 +407,9 @@ static char rtp_h263_frame_data[] = ...@@ -386,7 +407,9 @@ static char rtp_h263_frame_data[] =
{ 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
}; };
static int rtp_h263_frame_data_size = 20; static int rtp_h263_frame_data_size = 20;
static int rtp_h263_frame_count = 1; static int rtp_h263_frame_count = 1;
GST_START_TEST (rtp_h263) GST_START_TEST (rtp_h263)
...@@ -401,7 +424,9 @@ static char rtp_h263p_frame_data[] = ...@@ -401,7 +424,9 @@ static char rtp_h263p_frame_data[] =
{ 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
}; };
static int rtp_h263p_frame_data_size = 20; static int rtp_h263p_frame_data_size = 20;
static int rtp_h263p_frame_count = 1; static int rtp_h263p_frame_count = 1;
GST_START_TEST (rtp_h263p) GST_START_TEST (rtp_h263p)
...@@ -416,7 +441,9 @@ static char rtp_h264_frame_data[] = ...@@ -416,7 +441,9 @@ static char rtp_h264_frame_data[] =
{ 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
}; };
static int rtp_h264_frame_data_size = 20; static int rtp_h264_frame_data_size = 20;
static int rtp_h264_frame_count = 1; static int rtp_h264_frame_count = 1;
GST_START_TEST (rtp_h264) GST_START_TEST (rtp_h264)
...@@ -430,7 +457,9 @@ static char rtp_L16_frame_data[] = ...@@ -430,7 +457,9 @@ static char rtp_L16_frame_data[] =
{ 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
}; };
static int rtp_L16_frame_data_size = 20; static int rtp_L16_frame_data_size = 20;
static int rtp_L16_frame_count = 1; static int rtp_L16_frame_count = 1;
GST_START_TEST (rtp_L16) GST_START_TEST (rtp_L16)
...@@ -446,7 +475,9 @@ static char rtp_mp2t_frame_data[] = ...@@ -446,7 +475,9 @@ static char rtp_mp2t_frame_data[] =
{ 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
}; };
static int rtp_mp2t_frame_data_size = 20; static int rtp_mp2t_frame_data_size = 20;
static int rtp_mp2t_frame_count = 1; static int rtp_mp2t_frame_count = 1;
GST_START_TEST (rtp_mp2t) GST_START_TEST (rtp_mp2t)
...@@ -461,7 +492,9 @@ static char rtp_mp4v_frame_data[] = ...@@ -461,7 +492,9 @@ static char rtp_mp4v_frame_data[] =
{ 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
}; };
static int rtp_mp4v_frame_data_size = 20; static int rtp_mp4v_frame_data_size = 20;
static int rtp_mp4v_frame_count = 1; static int rtp_mp4v_frame_count = 1;
GST_START_TEST (rtp_mp4v) GST_START_TEST (rtp_mp4v)
...@@ -476,7 +509,9 @@ static char rtp_mp4g_frame_data[] = ...@@ -476,7 +509,9 @@ static char rtp_mp4g_frame_data[] =
{ 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
}; };
static int rtp_mp4g_frame_data_size = 20; static int rtp_mp4g_frame_data_size = 20;
static int rtp_mp4g_frame_count = 1; static int rtp_mp4g_frame_count = 1;
GST_START_TEST (rtp_mp4g) GST_START_TEST (rtp_mp4g)
...@@ -492,7 +527,9 @@ static char rtp_theora_frame_data[] = ...@@ -492,7 +527,9 @@ static char rtp_theora_frame_data[] =
{ 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
}; };
static int rtp_theora_frame_data_size = 20; static int rtp_theora_frame_data_size = 20;
static int rtp_theora_frame_count = 1; static int rtp_theora_frame_count = 1;
GST_START_TEST (rtp_theora) GST_START_TEST (rtp_theora)
...@@ -507,7 +544,9 @@ static char rtp_vorbis_frame_data[] = ...@@ -507,7 +544,9 @@ static char rtp_vorbis_frame_data[] =
{ 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
}; };
static int rtp_vorbis_frame_data_size = 20; static int rtp_vorbis_frame_data_size = 20;
static int rtp_vorbis_frame_count = 1; static int rtp_vorbis_frame_count = 1;
GST_START_TEST (rtp_vorbis) GST_START_TEST (rtp_vorbis)
...@@ -527,6 +566,7 @@ static Suite * ...@@ -527,6 +566,7 @@ static Suite *
rtp_payloading_suite () rtp_payloading_suite ()
{ {
Suite *s = suite_create ("rtp_data_test"); Suite *s = suite_create ("rtp_data_test");
TCase *tc_chain = tcase_create ("linear"); TCase *tc_chain = tcase_create ("linear");
/* Set timeout to 60 seconds. */ /* Set timeout to 60 seconds. */
......
...@@ -31,7 +31,9 @@ ...@@ -31,7 +31,9 @@
#include <gst/check/gstcheck.h> #include <gst/check/gstcheck.h>
static int http_port = 0, https_port = 0; static int http_port = 0, https_port = 0;
gboolean redirect = TRUE; gboolean redirect = TRUE;
static const char **cookies = NULL; static const char **cookies = NULL;
static int run_server (int *http_port, int *https_port); static int run_server (int *http_port, int *https_port);
...@@ -50,11 +52,17 @@ int ...@@ -50,11 +52,17 @@ int
run_test (const char *format, ...) run_test (const char *format, ...)
{ {
GstStateChangeReturn ret; GstStateChangeReturn ret;
GstElement *pipe, *src, *sink; GstElement *pipe, *src, *sink;
GstBuffer *buf = NULL; GstBuffer *buf = NULL;
GstMessage *msg; GstMessage *msg;
gchar *url; gchar *url;
va_list args; va_list args;
int rc = -1; int rc = -1;