diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/check/elements/asfmux.c | 12 | ||||
-rw-r--r-- | tests/check/elements/autoconvert.c | 4 | ||||
-rw-r--r-- | tests/check/elements/mplex.c | 4 | ||||
-rw-r--r-- | tests/check/elements/qtmux.c | 8 | ||||
-rw-r--r-- | tests/check/elements/selector.c | 10 | ||||
-rw-r--r-- | tests/examples/camerabin/gst-camera.c | 12 | ||||
-rw-r--r-- | tests/examples/camerabin/gst-camera.h | 3 | ||||
-rw-r--r-- | tests/examples/scaletempo/demo-gui.c | 2 | ||||
-rw-r--r-- | tests/examples/scaletempo/demo-main.c | 17 |
9 files changed, 35 insertions, 37 deletions
diff --git a/tests/check/elements/asfmux.c b/tests/check/elements/asfmux.c index 40834e9ff..6c3dab511 100644 --- a/tests/check/elements/asfmux.c +++ b/tests/check/elements/asfmux.c @@ -57,7 +57,7 @@ static GstStaticPadTemplate srcaudiotemplate = GST_STATIC_PAD_TEMPLATE ("src", static GstPad * setup_src_pad (GstElement * element, - GstStaticPadTemplate * template, GstCaps * caps, gchar * sinkname) + GstStaticPadTemplate * template, GstCaps * caps, const gchar * sinkname) { GstPad *srcpad, *sinkpad; @@ -86,7 +86,7 @@ setup_src_pad (GstElement * element, } static void -teardown_src_pad (GstElement * element, gchar * sinkname) +teardown_src_pad (GstElement * element, const gchar * sinkname) { GstPad *srcpad, *sinkpad; gchar *padname; @@ -122,7 +122,7 @@ teardown_src_pad (GstElement * element, gchar * sinkname) } static GstElement * -setup_asfmux (GstStaticPadTemplate * srctemplate, gchar * sinkname) +setup_asfmux (GstStaticPadTemplate * srctemplate, const gchar * sinkname) { GstElement *asfmux; @@ -137,7 +137,7 @@ setup_asfmux (GstStaticPadTemplate * srctemplate, gchar * sinkname) } static void -cleanup_asfmux (GstElement * asfmux, gchar * sinkname) +cleanup_asfmux (GstElement * asfmux, const gchar * sinkname) { GST_DEBUG ("cleanup_asfmux"); gst_element_set_state (asfmux, GST_STATE_NULL); @@ -149,8 +149,8 @@ cleanup_asfmux (GstElement * asfmux, gchar * sinkname) } static void -check_asfmux_pad (GstStaticPadTemplate * srctemplate, gchar * src_caps_string, - gchar * sinkname) +check_asfmux_pad (GstStaticPadTemplate * srctemplate, + const gchar * src_caps_string, const gchar * sinkname) { GstElement *asfmux; GstBuffer *inbuffer; diff --git a/tests/check/elements/autoconvert.c b/tests/check/elements/autoconvert.c index 83813bd9f..c36247f70 100644 --- a/tests/check/elements/autoconvert.c +++ b/tests/check/elements/autoconvert.c @@ -62,7 +62,7 @@ teardown (void) static void set_autoconvert_factories (GstElement * autoconvert) { - gchar *desired_features[] = { "testelement1", "testelement2" }; + const gchar *desired_features[] = { "testelement1", "testelement2" }; GstElementFactory *feature; GList *factories = NULL; gint i; @@ -167,7 +167,7 @@ autoconvert_suite (void) /* Implementation of the test elements */ static void -configure_test_element (GstBin * bin, gchar * capsfilter) +configure_test_element (GstBin * bin, const gchar * capsfilter) { GstElement *filter; GstElement *identity; diff --git a/tests/check/elements/mplex.c b/tests/check/elements/mplex.c index 0b62e247e..356de173f 100644 --- a/tests/check/elements/mplex.c +++ b/tests/check/elements/mplex.c @@ -118,7 +118,7 @@ test_sink_event (GstPad * pad, GstEvent * event) /* setup and teardown needs some special handling for muxer */ static GstPad * setup_src_pad (GstElement * element, - GstStaticPadTemplate * template, GstCaps * caps, gchar * sinkname) + GstStaticPadTemplate * template, GstCaps * caps, const gchar * sinkname) { GstPad *srcpad, *sinkpad; @@ -146,7 +146,7 @@ setup_src_pad (GstElement * element, } static void -teardown_src_pad (GstElement * element, gchar * sinkname) +teardown_src_pad (GstElement * element, const gchar * sinkname) { GstPad *srcpad, *sinkpad; gchar *padname; diff --git a/tests/check/elements/qtmux.c b/tests/check/elements/qtmux.c index 0c0581812..c5d6d1c35 100644 --- a/tests/check/elements/qtmux.c +++ b/tests/check/elements/qtmux.c @@ -58,7 +58,7 @@ static GstStaticPadTemplate srcaudiotemplate = GST_STATIC_PAD_TEMPLATE ("src", /* setup and teardown needs some special handling for muxer */ static GstPad * setup_src_pad (GstElement * element, - GstStaticPadTemplate * template, GstCaps * caps, gchar * sinkname) + GstStaticPadTemplate * template, GstCaps * caps, const gchar * sinkname) { GstPad *srcpad, *sinkpad; @@ -111,7 +111,7 @@ teardown_src_pad (GstPad * srcpad) } static GstElement * -setup_qtmux (GstStaticPadTemplate * srctemplate, gchar * sinkname) +setup_qtmux (GstStaticPadTemplate * srctemplate, const gchar * sinkname) { GstElement *qtmux; @@ -126,7 +126,7 @@ setup_qtmux (GstStaticPadTemplate * srctemplate, gchar * sinkname) } static void -cleanup_qtmux (GstElement * qtmux, gchar * sinkname) +cleanup_qtmux (GstElement * qtmux, const gchar * sinkname) { GST_DEBUG ("cleanup_qtmux"); gst_element_set_state (qtmux, GST_STATE_NULL); @@ -139,7 +139,7 @@ cleanup_qtmux (GstElement * qtmux, gchar * sinkname) } static void -check_qtmux_pad (GstStaticPadTemplate * srctemplate, gchar * sinkname) +check_qtmux_pad (GstStaticPadTemplate * srctemplate, const gchar * sinkname) { GstElement *qtmux; GstBuffer *inbuffer, *outbuffer; diff --git a/tests/check/elements/selector.c b/tests/check/elements/selector.c index e9449c030..56d2840ec 100644 --- a/tests/check/elements/selector.c +++ b/tests/check/elements/selector.c @@ -38,7 +38,7 @@ static gboolean probe_cb (GstPad * pad, GstMiniObject * obj, gpointer user_data) { gint count = 0; - gchar *count_type = NULL; + const gchar *count_type = NULL; GST_LOG_OBJECT (pad, "got data"); @@ -184,17 +184,15 @@ count_output_buffers (GList * output_pads, gint expected_buffers) static void selector_set_active_pad (GstElement * elem, GstPad * selpad) { - gchar *padname = ""; + gchar *padname = NULL; if (selpad) { padname = gst_pad_get_name (selpad); } g_object_set (G_OBJECT (elem), "active-pad", selpad, NULL); - GST_DEBUG_OBJECT (elem, "activated selector pad: %s", padname); - if (selpad) { - g_free (padname); - } + GST_DEBUG_OBJECT (elem, "activated selector pad: %s", GST_STR_NULL (padname)); + g_free (padname); } /* Push buffers and switch for each selector pad */ diff --git a/tests/examples/camerabin/gst-camera.c b/tests/examples/camerabin/gst-camera.c index 52c72c6b3..3082a0ff5 100644 --- a/tests/examples/camerabin/gst-camera.c +++ b/tests/examples/camerabin/gst-camera.c @@ -127,8 +127,8 @@ static guint32 num_vids = 0; static gint max_fr_n = 0; static gint max_fr_d = 0; -static gchar *video_post; -static gchar *image_post; +static const gchar *video_post; +static const gchar *image_post; static GList *video_caps_list = NULL; @@ -139,7 +139,7 @@ static gchar *iso_speed_labels[] = { "auto", "100", "200", "400" }; static struct { - gchar *label; + const gchar *label; gint width; gint height; } image_resolution_label_map[] = { @@ -920,8 +920,8 @@ on_radiobuttonVideoCapture_toggled (GtkToggleButton * togglebutton, } } -void -on_rbBntVidEff_toggled (GtkToggleButton * togglebutton, gchar * effect) +static void +on_rbBntVidEff_toggled (GtkToggleButton * togglebutton, const gchar * effect) { if (gtk_toggle_button_get_active (togglebutton)) { /* lets also use those effects to image */ @@ -1601,7 +1601,7 @@ static gboolean ui_create (void) { GError *error = NULL; - gchar *uifile = DEFAULT_UI_FILE; + const gchar *uifile = DEFAULT_UI_FILE; if (!g_file_test (uifile, G_FILE_TEST_EXISTS)) { uifile = SHARED_UI_FILE; diff --git a/tests/examples/camerabin/gst-camera.h b/tests/examples/camerabin/gst-camera.h index b027ecd23..f1d88446c 100644 --- a/tests/examples/camerabin/gst-camera.h +++ b/tests/examples/camerabin/gst-camera.h @@ -55,9 +55,6 @@ on_radiobuttonVideoCapture_toggled (GtkToggleButton * togglebutton, gpointer user_data); void -on_rbBntVidEff_toggled (GtkToggleButton * togglebutton, gchar * effect); - -void on_rbBntVidEffNone_toggled (GtkToggleButton * togglebutton, gpointer data); void diff --git a/tests/examples/scaletempo/demo-gui.c b/tests/examples/scaletempo/demo-gui.c index 5ff976064..9d5779052 100644 --- a/tests/examples/scaletempo/demo-gui.c +++ b/tests/examples/scaletempo/demo-gui.c @@ -411,7 +411,7 @@ demo_gui_do_playlist_next (GtkAction * action, gpointer data) static void demo_gui_do_about_dialog (GtkAction * action, gpointer data) { - static gchar *authors[] = + static const gchar *authors[] = { "Rov Juvano <rovjuvano@users.sourceforge.net>", NULL }; gtk_show_about_dialog (NULL, diff --git a/tests/examples/scaletempo/demo-main.c b/tests/examples/scaletempo/demo-main.c index 0902d7b26..6ddcde71d 100644 --- a/tests/examples/scaletempo/demo-main.c +++ b/tests/examples/scaletempo/demo-main.c @@ -26,10 +26,15 @@ extern GOptionGroup *gtk_get_option_group (gboolean); extern GOptionGroup *gst_init_get_option_group (void); static void -handle_error_message (DemoPlayer * player, const gchar * msg, gpointer data) +handle_player_error (DemoPlayer * player, const gchar * msg, gpointer unused) { - const gchar *format = (const gchar *) data; - g_print (format, msg); + g_print ("PLAYER ERROR: %s\n", msg); +} + +static void +handle_gui_error (DemoPlayer * player, const gchar * msg, gpointer unused) +{ + g_print ("GUI ERROR: %s\n", msg); } static void @@ -71,10 +76,8 @@ main (int argc, char *argv[]) gui = g_object_new (DEMO_TYPE_GUI, NULL); player = g_object_new (DEMO_TYPE_PLAYER, NULL); - g_signal_connect (player, "error", G_CALLBACK (handle_error_message), - "PLAYER ERROR: %s\n"); - g_signal_connect (gui, "error", G_CALLBACK (handle_error_message), - "GUI ERROR: %s\n"); + g_signal_connect (player, "error", G_CALLBACK (handle_player_error), NULL); + g_signal_connect (gui, "error", G_CALLBACK (handle_gui_error), NULL); demo_gui_set_player (gui, player); loop = g_main_loop_new (NULL, FALSE); |