+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:
-Subproject commit 49c2fc5c9bff0e9858e89978bd98164a386de51d
+Subproject commit c67241ed5661b56da42c9f35f5be27ac738a5d00
gst_check_chain_func
gst_check_abi_list
-tcase_add_test
+buffers
+check_cond
+check_mutex
</SECTION>
<SECTION>
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
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;
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
{
#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
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);
send_buffer (GstPad * sinkpad)
{
GstBuffer *buffer;
- GstStateChangeReturn ret;
+ GstFlowReturn ret;
/* push a second buffer */
GST_DEBUG ("pushing last buffer");
0xFFFF,
0xFFFF,
0x7FFFFFFF,
- 0x80000000,
- 0xFF000000,
- 0xFF000000,
+ (gint) 0x80000000,
+ (gint) 0xFF000000,
+ (gint) 0xFF000000,
};
GstStructure *structure;
int i;
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;
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.
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;
"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;
};
guint results[] = {
123456,
- -123456,
+ (guint) - 123456,
0xFFFF,
0xFFFF,
0x7FFFFFFF,