From: Jan Schmidt Date: Sat, 12 Jan 2008 20:22:30 +0000 (+0000) Subject: gst/gst.c: _gst_trace_on is already provided by gsttrace.h, no need to declare it... X-Git-Tag: RELEASE-0_10_16~12 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=f2c36159ef299ea5fc34d4a3841e0a20d99848bd;p=platform%2Fupstream%2Fgstreamer.git gst/gst.c: _gst_trace_on is already provided by gsttrace.h, no need to declare it ourselves. Original commit message from CVS: * gst/gst.c: _gst_trace_on is already provided by gsttrace.h, no need to declare it ourselves. * docs/libs/gstreamer-libs-sections.txt: Add 'buffers', 'check_cond' and 'check_mutex' from libgstcheck and remove strange tcase_add_test which is outputting a warning. * libs/gst/check/gstcheck.c: * libs/gst/check/gstcheck.h: Properly declare 'buffers', 'check_cond', 'check_mutex' extern and define them in gstcheck.c instead of having every .c file whcih includes gstcheck.h be defining its own copy and relying on symbol interposing to marry them all, which doesn't work on Solaris. * tests/check/elements/identity.c: (GST_START_TEST): Don't define 'buffers' locally, it comes from libgstcheck. * tests/check/generic/sinks.c: (send_buffer): Fix type of variable (GstFlowReturn, not GstStateChangeReturn) * tests/check/gst/gststructure.c: (GST_START_TEST): * tests/check/gst/gstsystemclock.c: (GST_START_TEST): * tests/check/gst/gstutils.c: (GST_START_TEST): * tests/check/gst/gstvalue.c: (GST_START_TEST): Add a bunch of casts to make various constants fit the types they're being assigned to. --- diff --git a/ChangeLog b/ChangeLog index 01af162..82cf5dd 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,33 @@ +2008-01-12 Jan Schmidt + + * gst/gst.c: + _gst_trace_on is already provided by gsttrace.h, no need to declare + it ourselves. + + * docs/libs/gstreamer-libs-sections.txt: + Add 'buffers', 'check_cond' and 'check_mutex' from libgstcheck + and remove strange tcase_add_test which is outputting a warning. + + * libs/gst/check/gstcheck.c: + * libs/gst/check/gstcheck.h: + Properly declare 'buffers', 'check_cond', 'check_mutex' extern + and define them in gstcheck.c instead of having every .c file whcih + includes gstcheck.h be defining its own copy and relying on symbol + interposing to marry them all, which doesn't work on Solaris. + + * tests/check/elements/identity.c: (GST_START_TEST): + Don't define 'buffers' locally, it comes from libgstcheck. + + * tests/check/generic/sinks.c: (send_buffer): + Fix type of variable (GstFlowReturn, not GstStateChangeReturn) + + * tests/check/gst/gststructure.c: (GST_START_TEST): + * tests/check/gst/gstsystemclock.c: (GST_START_TEST): + * tests/check/gst/gstutils.c: (GST_START_TEST): + * tests/check/gst/gstvalue.c: (GST_START_TEST): + Add a bunch of casts to make various constants fit the types + they're being assigned to. + 2008-01-10 Stefan Kost * gst/gstchildproxy.c: diff --git a/common b/common index 49c2fc5..c67241e 160000 --- a/common +++ b/common @@ -1 +1 @@ -Subproject commit 49c2fc5c9bff0e9858e89978bd98164a386de51d +Subproject commit c67241ed5661b56da42c9f35f5be27ac738a5d00 diff --git a/docs/libs/gstreamer-libs-sections.txt b/docs/libs/gstreamer-libs-sections.txt index fd87fc1..029232b 100644 --- a/docs/libs/gstreamer-libs-sections.txt +++ b/docs/libs/gstreamer-libs-sections.txt @@ -543,7 +543,9 @@ GST_CHECK_MAIN gst_check_chain_func gst_check_abi_list -tcase_add_test +buffers +check_cond +check_mutex
diff --git a/gst/gst.c b/gst/gst.c index e084b74..2cc58f6 100644 --- a/gst/gst.c +++ b/gst/gst.c @@ -133,8 +133,6 @@ static gboolean gst_initialized = FALSE; static GList *plugin_paths = NULL; /* for delayed processing in post_init */ #endif -extern gint _gst_trace_on; - #ifndef GST_DISABLE_GST_DEBUG extern const gchar *priv_gst_dump_dot_dir; #endif diff --git a/libs/gst/check/gstcheck.c b/libs/gst/check/gstcheck.c index f4ae3fb..f25bf32 100644 --- a/libs/gst/check/gstcheck.c +++ b/libs/gst/check/gstcheck.c @@ -43,6 +43,10 @@ GMutex *mutex; GCond *start_cond; /* used to notify main thread of thread startups */ GCond *sync_cond; /* used to synchronize all threads and main thread */ +GList *buffers = NULL; +GMutex *check_mutex = NULL; +GCond *check_cond = NULL; + gboolean _gst_check_debug = FALSE; gboolean _gst_check_raised_critical = FALSE; gboolean _gst_check_raised_warning = FALSE; diff --git a/libs/gst/check/gstcheck.h b/libs/gst/check/gstcheck.h index 0de19f6..5cf934e 100644 --- a/libs/gst/check/gstcheck.h +++ b/libs/gst/check/gstcheck.h @@ -48,10 +48,10 @@ extern gboolean _gst_check_raised_warning; extern gboolean _gst_check_expecting_log; /* global variables used in test methods */ -GList * buffers; +extern GList * buffers; -GMutex *check_mutex; -GCond *check_cond; +extern GMutex *check_mutex; +extern GCond *check_cond; typedef struct { diff --git a/tests/check/elements/identity.c b/tests/check/elements/identity.c index dc8caa5..536cfb0 100644 --- a/tests/check/elements/identity.c +++ b/tests/check/elements/identity.c @@ -24,7 +24,6 @@ #include -GList *buffers = NULL; gboolean have_eos = FALSE; /* For ease of programming we use globals to keep refs for our floating @@ -97,8 +96,11 @@ GST_START_TEST (test_one_buffer) buffer = gst_buffer_new_and_alloc (4); ASSERT_BUFFER_REFCOUNT (buffer, "buffer", 1); memcpy (GST_BUFFER_DATA (buffer), "data", 4); + /* pushing gives away my reference ... */ - gst_pad_push (mysrcpad, buffer); + fail_unless (gst_pad_push (mysrcpad, buffer) == GST_FLOW_OK, + "Failed pushing buffer to identity"); + /* ... but it should end up being collected on the global buffer list */ fail_unless (g_list_length (buffers) == 1); fail_unless ((GstBuffer *) (g_list_first (buffers)->data) == buffer); diff --git a/tests/check/generic/sinks.c b/tests/check/generic/sinks.c index 1002fc1..8792916 100644 --- a/tests/check/generic/sinks.c +++ b/tests/check/generic/sinks.c @@ -1019,7 +1019,7 @@ static void send_buffer (GstPad * sinkpad) { GstBuffer *buffer; - GstStateChangeReturn ret; + GstFlowReturn ret; /* push a second buffer */ GST_DEBUG ("pushing last buffer"); diff --git a/tests/check/gst/gststructure.c b/tests/check/gst/gststructure.c index 6e032d2..15c6719 100644 --- a/tests/check/gst/gststructure.c +++ b/tests/check/gst/gststructure.c @@ -44,9 +44,9 @@ GST_START_TEST (test_from_string_int) 0xFFFF, 0xFFFF, 0x7FFFFFFF, - 0x80000000, - 0xFF000000, - 0xFF000000, + (gint) 0x80000000, + (gint) 0xFF000000, + (gint) 0xFF000000, }; GstStructure *structure; int i; diff --git a/tests/check/gst/gstsystemclock.c b/tests/check/gst/gstsystemclock.c index 299c9ca..c7a49f3 100644 --- a/tests/check/gst/gstsystemclock.c +++ b/tests/check/gst/gstsystemclock.c @@ -319,10 +319,11 @@ GST_START_TEST (test_periodic_multi) GST_END_TEST GST_START_TEST (test_diff) { - GstClockTime time1[] = - { 0, -1, 0, 1, 2 * GST_SECOND, -GST_SECOND, -GST_SECOND }; + GstClockTime time1[] = { 0, (GstClockTime) - 1, 0, 1, 2 * GST_SECOND, + (GstClockTime) - GST_SECOND, (GstClockTime) - GST_SECOND + }; GstClockTime time2[] = - { 0, 1, 1, 0, 1 * GST_SECOND, -GST_SECOND, GST_SECOND }; + { 0, 1, 1, 0, 1 * GST_SECOND, (GstClockTime) - GST_SECOND, GST_SECOND }; GstClockTimeDiff d[] = { 0, 2, 1, -1, -GST_SECOND, 0, 2 * GST_SECOND }; guint i; diff --git a/tests/check/gst/gstutils.c b/tests/check/gst/gstutils.c index 36584d0..413885d 100644 --- a/tests/check/gst/gstutils.c +++ b/tests/check/gst/gstutils.c @@ -283,9 +283,9 @@ GST_END_TEST; GST_START_TEST (test_guint64_to_gdouble) { - guint64 from[] = { 0, 1, 100, 10000, G_GINT64_CONSTANT (1) << 63, - (G_GINT64_CONSTANT (1) << 63) + 1, - (G_GINT64_CONSTANT (1) << 63) + (G_GINT64_CONSTANT (1) << 62) + guint64 from[] = { 0, 1, 100, 10000, (guint64) (1) << 63, + ((guint64) (1) << 63) + 1, + ((guint64) (1) << 63) + (G_GINT64_CONSTANT (1) << 62) }; gdouble to[] = { 0., 1., 100., 10000., 9223372036854775808., 9223372036854775809., 13835058055282163712. @@ -312,9 +312,9 @@ GST_START_TEST (test_gdouble_to_guint64) gdouble from[] = { 0., 1., 100., 10000., 9223372036854775808., 9223372036854775809., 13835058055282163712. }; - guint64 to[] = { 0, 1, 100, 10000, G_GINT64_CONSTANT (1) << 63, - (G_GINT64_CONSTANT (1) << 63) + 1, - (G_GINT64_CONSTANT (1) << 63) + (G_GINT64_CONSTANT (1) << 62) + guint64 to[] = { 0, 1, 100, 10000, (guint64) (1) << 63, + ((guint64) (1) << 63) + 1, + ((guint64) (1) << 63) + (G_GINT64_CONSTANT (1) << 62) }; guint64 tolerance[] = { 0, 0, 0, 0, 0, 1, 1 }; gint i; diff --git a/tests/check/gst/gstvalue.c b/tests/check/gst/gstvalue.c index 6a0c096..192c80e 100644 --- a/tests/check/gst/gstvalue.c +++ b/tests/check/gst/gstvalue.c @@ -178,21 +178,21 @@ GST_START_TEST (test_deserialize_gint) "0xFFFFFFFFFFFFFFFF", "0xEFFFFFFF", }; + /* some casts need to be explicit because of unsigned -> signed */ gint results[] = { 123456, -123456, 0xFFFF, 0xFFFF, 0x7FFFFFFF, - 0x80000000, - 0x80000000, - 0xFF000000, + (gint) 0x80000000, + (gint) 0x80000000, + (gint) 0xFF000000, -1, - 0xFFFFFFFF, + (gint) 0xFFFFFFFF, -1, - /* cast needs to be explicit because of unsigned -> signed */ (gint) 0xFFFFFFFFFFFFFFFFLL, - 0xEFFFFFFF, + (gint) 0xEFFFFFFF, }; int i; @@ -261,7 +261,7 @@ GST_START_TEST (test_deserialize_guint) }; guint results[] = { 123456, - -123456, + (guint) - 123456, 0xFFFF, 0xFFFF, 0x7FFFFFFF,