gst/gst.c: _gst_trace_on is already provided by gsttrace.h, no need to declare it...
authorJan Schmidt <thaytan@mad.scientist.com>
Sat, 12 Jan 2008 20:22:30 +0000 (20:22 +0000)
committerJan Schmidt <thaytan@mad.scientist.com>
Sat, 12 Jan 2008 20:22:30 +0000 (20:22 +0000)
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.

12 files changed:
ChangeLog
common
docs/libs/gstreamer-libs-sections.txt
gst/gst.c
libs/gst/check/gstcheck.c
libs/gst/check/gstcheck.h
tests/check/elements/identity.c
tests/check/generic/sinks.c
tests/check/gst/gststructure.c
tests/check/gst/gstsystemclock.c
tests/check/gst/gstutils.c
tests/check/gst/gstvalue.c

index 01af162..82cf5dd 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,33 @@
+2008-01-12  Jan Schmidt  <Jan.Schmidt@sun.com>
+
+       * 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  <ensonic@users.sf.net>
 
        * gst/gstchildproxy.c:
diff --git a/common b/common
index 49c2fc5..c67241e 160000 (submodule)
--- a/common
+++ b/common
@@ -1 +1 @@
-Subproject commit 49c2fc5c9bff0e9858e89978bd98164a386de51d
+Subproject commit c67241ed5661b56da42c9f35f5be27ac738a5d00
index fd87fc1..029232b 100644 (file)
@@ -543,7 +543,9 @@ GST_CHECK_MAIN
 gst_check_chain_func
 gst_check_abi_list
 
-tcase_add_test
+buffers
+check_cond
+check_mutex
 </SECTION>
 
 <SECTION>
index e084b74..2cc58f6 100644 (file)
--- 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
index f4ae3fb..f25bf32 100644 (file)
@@ -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;
index 0de19f6..5cf934e 100644 (file)
@@ -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
 {
index dc8caa5..536cfb0 100644 (file)
@@ -24,7 +24,6 @@
 
 #include <gst/check/gstcheck.h>
 
-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);
index 1002fc1..8792916 100644 (file)
@@ -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");
index 6e032d2..15c6719 100644 (file)
@@ -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;
index 299c9ca..c7a49f3 100644 (file)
@@ -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;
 
index 36584d0..413885d 100644 (file)
@@ -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;
index 6a0c096..192c80e 100644 (file)
@@ -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,