From: <sl...@ke...> - 2008-07-14 17:15:46
|
CVS Root: /cvs/gstreamer Module: gst-plugins-good Changes by: slomo Date: Mon Jul 14 2008 17:15:56 UTC Log message: * 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. Modified files: . : ChangeLog tests/check/elements: cmmldec.c rtp-payloading.c souphttpsrc.c Links: http://freedesktop.org/cgi-bin/viewcvs.cgi/gstreamer/gst-plugins-good/ChangeLog.diff?r1=1.3601&r2=1.3602 http://freedesktop.org/cgi-bin/viewcvs.cgi/gstreamer/gst-plugins-good/tests/check/elements/cmmldec.c.diff?r1=1.8&r2=1.9 http://freedesktop.org/cgi-bin/viewcvs.cgi/gstreamer/gst-plugins-good/tests/check/elements/rtp-payloading.c.diff?r1=1.3&r2=1.4 http://freedesktop.org/cgi-bin/viewcvs.cgi/gstreamer/gst-plugins-good/tests/check/elements/souphttpsrc.c.diff?r1=1.6&r2=1.7 ====Begin Diffs==== Index: ChangeLog =================================================================== RCS file: /cvs/gstreamer/gst-plugins-good/ChangeLog,v retrieving revision 1.3601 retrieving revision 1.3602 diff -u -d -r1.3601 -r1.3602 --- ChangeLog 14 Jul 2008 16:28:24 -0000 1.3601 +++ ChangeLog 14 Jul 2008 17:15:40 -0000 1.3602 @@ -1,3 +1,11 @@ +2008-07-14 Sebastian Dröge <sl...@ci...> + + * 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 <mar...@co...> * ext/jpeg/gstjpegdec.c: Index: cmmldec.c RCS file: /cvs/gstreamer/gst-plugins-good/tests/check/elements/cmmldec.c,v retrieving revision 1.8 retrieving revision 1.9 diff -u -d -r1.8 -r1.9 --- cmmldec.c 22 Dec 2006 10:15:23 -0000 1.8 +++ cmmldec.c 14 Jul 2008 17:15:42 -0000 1.9 @@ -87,12 +87,19 @@ } G_STMT_END; static GstElement *cmmldec; static GstBus *bus; static GstFlowReturn flow; GList *buffers; static GList *current_buf; static gint64 granulerate; static guint8 granuleshift; static GstPad *srcpad, *sinkpad; static GstStaticPadTemplate sinktemplate = GST_STATIC_PAD_TEMPLATE ("sink", @@ -111,6 +118,7 @@ buffer_new (const gchar * buffer_data, guint size) { GstBuffer *buffer; GstCaps *caps; buffer = gst_buffer_new_and_alloc (size); @@ -205,8 +213,11 @@ cmml_tag_message_pop (GstBus * bus, const gchar * tag) GstMessage *message; GstTagList *taglist; const GValue *value; GObject *obj; message = gst_bus_poll (bus, GST_MESSAGE_TAG, 0); @@ -232,7 +243,9 @@ check_headers () GObject *head_tag; gchar *title, *base; GValueArray *meta; /* push the ident header */ @@ -276,7 +289,9 @@ GstClockTime prev, GstClockTime start) gchar *clip; gint64 keyindex, keyoffset, granulepos; GstFlowReturn res; if (track == NULL) @@ -328,7 +343,9 @@ GST_START_TEST (test_dec) GstClockTime clip1_start = 1 * GST_SECOND + 234 * GST_MSECOND; GstClockTime clip2_start = clip1_start; GstClockTime clip3_start = ((100 * 3600) + (59 * 60) + 59) * GST_SECOND + 678 * GST_MSECOND; @@ -374,13 +391,21 @@ GST_START_TEST (test_tags) GObject *tag; gboolean empty; gchar *id, *track; gint64 start_time, end_time; gchar *anchor_href, *anchor_text; gchar *img_src, *img_alt; gchar *desc; GstClockTime clip1_start; check_headers (); @@ -427,19 +452,25 @@ GST_START_TEST (test_wait_clip_end) - 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 clip2_start = 2 * GST_SECOND + 234 * GST_MSECOND; GstClockTime clip3_start = 3 * GST_SECOND + 234 * GST_MSECOND; GstClockTime clip3_end = 4 * 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); fail_unless_equals_flow_return (flow, GST_FLOW_OK); /* no tag has been posted yet */ @@ -521,8 +552,11 @@ GST_START_TEST (test_sink_query_convert) guint64 keyindex, keyoffset, granulepos; GstClockTime index_time, offset_time; GstFormat dstfmt = GST_FORMAT_TIME; gint64 dstval; /* send headers to set the granulerate */ @@ -550,6 +584,7 @@ cmmldec_suite () Suite *s = suite_create ("cmmldec"); TCase *tc_general = tcase_create ("general"); suite_add_tcase (s, tc_general); Index: rtp-payloading.c RCS file: /cvs/gstreamer/gst-plugins-good/tests/check/elements/rtp-payloading.c,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- rtp-payloading.c 12 Feb 2008 23:38:19 -0000 1.3 +++ rtp-payloading.c 14 Jul 2008 17:15:42 -0000 1.4 @@ -54,7 +54,9 @@ case GST_MESSAGE_ERROR: { GError *err; gchar *debug; gchar *element_name; element_name = (message->src) ? gst_object_get_name (message->src) : NULL; @@ -104,13 +106,17 @@ gchar *pipeline_name; + rtp_pipeline *p; + GstCaps *caps; /* Check parameters. */ if (!frame_data || !pay || !depay) { return NULL; } /* 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_size = frame_data_size; @@ -159,7 +165,7 @@ g_object_set (p->fdsrc, "num-buffers", p->frame_count * LOOP_COUNT, NULL); /* Set caps filters. */ - GstCaps *caps = gst_caps_from_string (filtercaps); + caps = gst_caps_from_string (filtercaps); g_object_set (p->capsfilter, "caps", caps, NULL); gst_caps_unref (caps); @@ -217,6 +223,10 @@ GMainLoop *mainloop = NULL; + GstBus *bus; + gint i; if (p == NULL) { return; @@ -229,7 +239,7 @@ /* 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_object_unref (bus); @@ -239,10 +249,9 @@ /* TODO: Writing may need some changes... */ - int i = 0; - - for (; i < LOOP_COUNT; i++) { + for (i = 0; i < LOOP_COUNT; i++) { const char *frame_data_pointer = p->frame_data; int frame_count = p->frame_count; /* Write in to the pipe. */ @@ -296,7 +305,9 @@ { 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_count = 1; GST_START_TEST (rtp_ilbc) @@ -311,7 +322,9 @@ static int rtp_gsm_frame_data_size = 20; static int rtp_gsm_frame_count = 1; GST_START_TEST (rtp_gsm) @@ -327,7 +340,9 @@ 0x7a, 0x37, 0x16, 0x41, 0x41, 0xc0, 0x00, 0x0d, 0xcd, 0x12, 0xed, 0xad, 0x80, 0x00, 0x00, 0x11, 0x31, 0x00, 0x00, 0x0d, 0xa0 static int rtp_amr_frame_data_size = 32; static int rtp_amr_frame_count = 1; GST_START_TEST (rtp_amr) @@ -342,7 +357,9 @@ static int rtp_pcma_frame_data_size = 20; static int rtp_pcma_frame_count = 1; GST_START_TEST (rtp_pcma) @@ -357,7 +374,9 @@ static int rtp_pcmu_frame_data_size = 20; static int rtp_pcmu_frame_count = 1; GST_START_TEST (rtp_pcmu) @@ -372,7 +391,9 @@ static int rtp_mpa_frame_data_size = 20; static int rtp_mpa_frame_count = 1; GST_START_TEST (rtp_mpa) @@ -386,7 +407,9 @@ static int rtp_h263_frame_data_size = 20; static int rtp_h263_frame_count = 1; GST_START_TEST (rtp_h263) @@ -401,7 +424,9 @@ static int rtp_h263p_frame_data_size = 20; static int rtp_h263p_frame_count = 1; GST_START_TEST (rtp_h263p) @@ -416,7 +441,9 @@ static int rtp_h264_frame_data_size = 20; static int rtp_h264_frame_count = 1; GST_START_TEST (rtp_h264) @@ -430,7 +457,9 @@ static int rtp_L16_frame_data_size = 20; static int rtp_L16_frame_count = 1; GST_START_TEST (rtp_L16) @@ -446,7 +475,9 @@ static int rtp_mp2t_frame_data_size = 20; static int rtp_mp2t_frame_count = 1; GST_START_TEST (rtp_mp2t) @@ -461,7 +492,9 @@ static int rtp_mp4v_frame_data_size = 20; static int rtp_mp4v_frame_count = 1; GST_START_TEST (rtp_mp4v) @@ -476,7 +509,9 @@ static int rtp_mp4g_frame_data_size = 20; static int rtp_mp4g_frame_count = 1; GST_START_TEST (rtp_mp4g) @@ -492,7 +527,9 @@ static int rtp_theora_frame_data_size = 20; static int rtp_theora_frame_count = 1; GST_START_TEST (rtp_theora) @@ -507,7 +544,9 @@ static int rtp_vorbis_frame_data_size = 20; static int rtp_vorbis_frame_count = 1; GST_START_TEST (rtp_vorbis) @@ -527,6 +566,7 @@ rtp_payloading_suite () Suite *s = suite_create ("rtp_data_test"); TCase *tc_chain = tcase_create ("linear"); /* Set timeout to 60 seconds. */ Index: souphttpsrc.c RCS file: /cvs/gstreamer/gst-plugins-good/tests/check/elements/souphttpsrc.c,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- souphttpsrc.c 17 Apr 2008 22:32:16 -0000 1.6 +++ souphttpsrc.c 14 Jul 2008 17:15:42 -0000 1.7 @@ -31,7 +31,9 @@ #include <gst/check/gstcheck.h> static int http_port = 0, https_port = 0; gboolean redirect = TRUE; static const char **cookies = NULL; static int run_server (int *http_port, int *https_port); @@ -50,11 +52,17 @@ run_test (const char *format, ...) GstStateChangeReturn ret; GstElement *pipe, *src, *sink; GstBuffer *buf = NULL; GstMessage *msg; gchar *url; va_list args; int rc = -1; pipe = gst_pipeline_new (NULL); @@ -97,6 +105,7 @@ GST_MESSAGE_EOS | GST_MESSAGE_ERROR, -1); if (GST_MESSAGE_TYPE (msg) == GST_MESSAGE_ERROR) { gchar *debug = NULL; GError *err = NULL; gst_message_parse_error (msg, &err, &debug); @@ -222,6 +231,7 @@ GST_START_TEST (test_icy_stream) @@ -301,12 +311,16 @@ static Suite * souphttpsrc_suite (void) + Suite *s; + TCase *tc_chain, *tc_internet; g_type_init (); g_thread_init (NULL); - Suite *s = suite_create ("souphttpsrc"); - TCase *tc_chain = tcase_create ("general"); - TCase *tc_internet = tcase_create ("internet"); + s = suite_create ("souphttpsrc"); + tc_chain = tcase_create ("general"); + tc_internet = tcase_create ("internet"); suite_add_tcase (s, tc_chain); run_server (&http_port, &https_port); @@ -331,7 +345,9 @@ do_get (SoupMessage * msg, const char *path) char *uri; int buflen = 4096; SoupKnownStatusCode status = SOUP_STATUS_OK; uri = soup_uri_to_string (soup_message_get_uri (msg), FALSE); @@ -413,10 +429,15 @@ run_server (int *http_port, int *https_port) SoupServer *server, *ssl_server; int port = SOUP_ADDRESS_ANY_PORT; int ssl_port = SOUP_ADDRESS_ANY_PORT; const char *ssl_cert_file = G_STRINGIFY (CHECKDATA_DIR) "/test-cert.pem"; const char *ssl_key_file = G_STRINGIFY (CHECKDATA_DIR) "/test-key.pem"; static int server_running = 0; if (server_running) |