diff options
-rw-r--r-- | tests/check/elements/gdpdepay.c | 16 | ||||
-rw-r--r-- | tests/check/elements/gdppay.c | 27 | ||||
-rw-r--r-- | tests/check/pipelines/streamheader.c | 6 |
3 files changed, 23 insertions, 26 deletions
diff --git a/tests/check/elements/gdpdepay.c b/tests/check/elements/gdpdepay.c index 119f1cdff..703e0ade8 100644 --- a/tests/check/elements/gdpdepay.c +++ b/tests/check/elements/gdpdepay.c @@ -25,12 +25,10 @@ #include <gst/check/gstcheck.h> #include <gst/dataprotocol/dataprotocol.h> -gboolean have_eos = FALSE; - /* For ease of programming we use globals to keep refs for our floating * src and sink pads we create; otherwise we always have to do get_pad, * get_peer, and then remove references in every test function */ -GstPad *mysrcpad, *mysinkpad, *myshsinkpad; +static GstPad *mysrcpad, *mysinkpad, *myshsinkpad; #define AUDIO_CAPS_TEMPLATE_STRING \ "audio/x-raw-int, " \ @@ -63,8 +61,8 @@ static GstStaticPadTemplate srctemplate = GST_STATIC_PAD_TEMPLATE ("src", ); /* takes over reference for outcaps */ -GstElement * -setup_gdpdepay () +static GstElement * +setup_gdpdepay (void) { GstElement *gdpdepay; @@ -78,7 +76,7 @@ setup_gdpdepay () return gdpdepay; } -void +static void cleanup_gdpdepay (GstElement * gdpdepay) { GST_DEBUG ("cleanup_gdpdepay"); @@ -266,8 +264,8 @@ static GstStaticPadTemplate shsinktemplate = GST_STATIC_PAD_TEMPLATE ("sink", GST_STATIC_CAPS ("application/x-gst-test-streamheader") ); -GstElement * -setup_gdpdepay_streamheader () +static GstElement * +setup_gdpdepay_streamheader (void) { GstElement *gdpdepay; @@ -402,7 +400,7 @@ GST_END_TEST; #endif /* ifndef HAVE_CPU_PPC64 */ -Suite * +static Suite * gdpdepay_suite (void) { Suite *s = suite_create ("gdpdepay"); diff --git a/tests/check/elements/gdppay.c b/tests/check/elements/gdppay.c index 80f386fe8..267b266dc 100644 --- a/tests/check/elements/gdppay.c +++ b/tests/check/elements/gdppay.c @@ -24,12 +24,10 @@ #include <gst/check/gstcheck.h> #include <gst/dataprotocol/dataprotocol.h> -gboolean have_eos = FALSE; - /* For ease of programming we use globals to keep refs for our floating * src and sink pads we create; otherwise we always have to do get_pad, * get_peer, and then remove references in every test function */ -GstPad *mysrcpad, *myshsrcpad, *mysinkpad; +static GstPad *mysrcpad, *myshsrcpad, *mysinkpad; #define AUDIO_CAPS_TEMPLATE_STRING \ "audio/x-raw-int, " \ @@ -62,8 +60,8 @@ static GstStaticPadTemplate srctemplate = GST_STATIC_PAD_TEMPLATE ("src", ); /* takes over reference for outcaps */ -GstElement * -setup_gdppay () +static GstElement * +setup_gdppay (void) { GstElement *gdppay; @@ -77,7 +75,7 @@ setup_gdppay () return gdppay; } -void +static void cleanup_gdppay (GstElement * gdppay) { GST_DEBUG ("cleanup_gdppay"); @@ -204,7 +202,7 @@ GST_START_TEST (test_audio) g_list_free (buffers); buffers = NULL; ASSERT_OBJECT_REFCOUNT (gdppay, "gdppay", 1); - gst_object_unref (gdppay); + cleanup_gdppay (gdppay); } GST_END_TEST; @@ -216,8 +214,8 @@ static GstStaticPadTemplate shsrctemplate = GST_STATIC_PAD_TEMPLATE ("src", ); -GstElement * -setup_gdppay_streamheader () +static GstElement * +setup_gdppay_streamheader (void) { GstElement *gdppay; @@ -378,7 +376,7 @@ GST_START_TEST (test_streamheader) g_list_free (buffers); buffers = NULL; ASSERT_OBJECT_REFCOUNT (gdppay, "gdppay", 1); - gst_object_unref (gdppay); + cleanup_gdppay (gdppay); } GST_END_TEST; @@ -411,7 +409,7 @@ GST_START_TEST (test_first_no_caps) g_list_free (buffers); buffers = NULL; ASSERT_OBJECT_REFCOUNT (gdppay, "gdppay", 1); - gst_object_unref (gdppay); + cleanup_gdppay (gdppay); } GST_END_TEST; @@ -434,6 +432,7 @@ GST_START_TEST (test_first_no_new_segment) inbuffer = gst_buffer_new_and_alloc (4); caps = gst_caps_from_string (AUDIO_CAPS_STRING); gst_buffer_set_caps (inbuffer, caps); + gst_caps_unref (caps); ASSERT_BUFFER_REFCOUNT (inbuffer, "inbuffer", 1); @@ -452,7 +451,7 @@ GST_START_TEST (test_first_no_new_segment) g_list_free (buffers); buffers = NULL; ASSERT_OBJECT_REFCOUNT (gdppay, "gdppay", 1); - gst_object_unref (gdppay); + cleanup_gdppay (gdppay); } GST_END_TEST; @@ -542,13 +541,13 @@ GST_START_TEST (test_crc) g_list_free (buffers); buffers = NULL; ASSERT_OBJECT_REFCOUNT (gdppay, "gdppay", 1); - gst_object_unref (gdppay); + cleanup_gdppay (gdppay); } GST_END_TEST; -Suite * +static Suite * gdppay_suite (void) { Suite *s = suite_create ("gdppay"); diff --git a/tests/check/pipelines/streamheader.c b/tests/check/pipelines/streamheader.c index d58148204..ebd86e460 100644 --- a/tests/check/pipelines/streamheader.c +++ b/tests/check/pipelines/streamheader.c @@ -36,7 +36,7 @@ static int n_tags = 0; -gboolean +static gboolean tag_event_probe_cb (GstPad * pad, GstEvent * event, GMainLoop * loop) { switch (GST_EVENT_TYPE (event)) { @@ -113,7 +113,7 @@ GST_END_TEST; static int n_in_caps = 0; -gboolean +static gboolean buffer_probe_cb (GstPad * pad, GstBuffer * buffer) { if (GST_BUFFER_FLAG_IS_SET (buffer, GST_BUFFER_FLAG_IN_CAPS)) { @@ -208,7 +208,7 @@ GST_END_TEST; #endif /* #ifndef GST_DISABLE_PARSE */ -Suite * +static Suite * streamheader_suite (void) { Suite *s = suite_create ("streamheader"); |