g_mutex_lock (&souphttpsink->mutex);
/* FIXME: error handling */
-#if !GLIB_CHECK_VERSION (2, 31, 0)
- souphttpsink->thread = g_thread_create (thread_func, souphttpsink,
- TRUE, &error);
-#else
souphttpsink->thread = g_thread_try_new ("souphttpclientsink-thread",
thread_func, souphttpsink, &error);
-#endif
GST_LOG_OBJECT (souphttpsink, "waiting for main loop thread to start up");
g_cond_wait (&souphttpsink->cond, &souphttpsink->mutex);
G_BEGIN_DECLS
-#if !GLIB_CHECK_VERSION(2,25,0)
-
-#if defined (_MSC_VER) && !defined(_WIN64)
-typedef struct _stat32 GStatBuf;
-#else
-typedef struct stat GStatBuf;
-#endif
-
-#endif
-
#if GLIB_CHECK_VERSION(2,26,0)
#define GLIB_HAS_GDATETIME
#endif
-/* See bug #651514 */
-#if GLIB_CHECK_VERSION(2,29,5)
-#define G_ATOMIC_POINTER_COMPARE_AND_EXCHANGE(a,b,c) \
- g_atomic_pointer_compare_and_exchange ((a),(b),(c))
-#define G_ATOMIC_INT_COMPARE_AND_EXCHANGE(a,b,c) \
- g_atomic_int_compare_and_exchange ((a),(b),(c))
-#else
-#define G_ATOMIC_POINTER_COMPARE_AND_EXCHANGE(a,b,c) \
- g_atomic_pointer_compare_and_exchange ((volatile gpointer *)(a),(b),(c))
-#define G_ATOMIC_INT_COMPARE_AND_EXCHANGE(a,b,c) \
- g_atomic_int_compare_and_exchange ((volatile int *)(a),(b),(c))
-#endif
-
-/* See bug #651514 */
-#if GLIB_CHECK_VERSION(2,29,5)
-#define G_ATOMIC_INT_ADD(a,b) g_atomic_int_add ((a),(b))
-#else
-#define G_ATOMIC_INT_ADD(a,b) g_atomic_int_exchange_and_add ((a),(b))
-#endif
-
/* copies */
-#if GLIB_CHECK_VERSION (2, 31, 0)
+#if 0 //GLIB_CHECK_VERSION (2, 31, 0)
#define g_mutex_new gst_g_mutex_new
static inline GMutex *
gst_g_mutex_new (void)
GST_STATIC_CAPS (GST_VIDEO_CAPS_MAKE ("{ AYUV, ARGB, BGRA, ABGR, RGBA }"));
/* FIXME: why do we need our own lock for this? */
-#if !GLIB_CHECK_VERSION (2, 31, 0)
-#define GST_ALPHA_LOCK(alpha) G_STMT_START { \
- GST_LOG_OBJECT (alpha, "Locking alpha from thread %p", g_thread_self ()); \
- g_static_mutex_lock (&alpha->lock); \
- GST_LOG_OBJECT (alpha, "Locked alpha from thread %p", g_thread_self ()); \
-} G_STMT_END
-
-#define GST_ALPHA_UNLOCK(alpha) G_STMT_START { \
- GST_LOG_OBJECT (alpha, "Unlocking alpha from thread %p", g_thread_self ()); \
- g_static_mutex_unlock (&alpha->lock); \
-} G_STMT_END
-#else
#define GST_ALPHA_LOCK(alpha) G_STMT_START { \
GST_LOG_OBJECT (alpha, "Locking alpha from thread %p", g_thread_self ()); \
g_mutex_lock (&alpha->lock); \
GST_LOG_OBJECT (alpha, "Unlocking alpha from thread %p", g_thread_self ()); \
g_mutex_unlock (&alpha->lock); \
} G_STMT_END
-#endif
static GstCaps *gst_alpha_transform_caps (GstBaseTransform * btrans,
GstPadDirection direction, GstCaps * caps, GstCaps * filter);
alpha->black_sensitivity = DEFAULT_BLACK_SENSITIVITY;
alpha->white_sensitivity = DEFAULT_WHITE_SENSITIVITY;
-#if !GLIB_CHECK_VERSION (2, 31, 0)
- g_static_mutex_init (&alpha->lock);
-#else
g_mutex_init (&alpha->lock);
-#endif
}
static void
{
GstAlpha *alpha = GST_ALPHA (object);
-#if !GLIB_CHECK_VERSION (2, 31, 0)
- g_static_mutex_free (&alpha->lock);
-#else
g_mutex_clear (&alpha->lock);
-#endif
G_OBJECT_CLASS (parent_class)->finalize (object);
}
/* <private> */
/* caps */
-#if !GLIB_CHECK_VERSION (2, 31, 0)
- GStaticMutex lock;
-#else
GMutex lock;
-#endif
gboolean in_sdtv, out_sdtv;
if (templ->direction != GST_PAD_SINK)
goto not_sink_pad;
-#if GLIB_CHECK_VERSION(2,29,5)
channels = g_atomic_int_add (&self->channels, 1);
padnumber = g_atomic_int_add (&self->padcounter, 1);
-#else
- channels = g_atomic_int_exchange_and_add (&self->channels, 1);
- padnumber = g_atomic_int_exchange_and_add (&self->padcounter, 1);
-#endif
pad_name = g_strdup_printf ("sink_%u", padnumber);
new_pad = GST_PAD_CAST (g_object_new (GST_TYPE_INTERLEAVE_PAD,
g_thread_join (rtpsession->priv->thread);
/* only create a new thread if the old one was stopped. Otherwise we can
* just reuse the currently running one. */
-#if !GLIB_CHECK_VERSION (2, 31, 0)
- rtpsession->priv->thread =
- g_thread_create ((GThreadFunc) rtcp_thread, rtpsession, TRUE, &error);
-#else
rtpsession->priv->thread = g_thread_try_new ("rtpsession-rtcp-thread",
(GThreadFunc) rtcp_thread, rtpsession, &error);
-#endif
rtpsession->priv->thread_stopped = FALSE;
}
GST_RTP_SESSION_UNLOCK (rtpsession);
mixer->watch_cond = g_cond_new ();
mixer->watch_shutdown = FALSE;
-#if !GLIB_CHECK_VERSION (2, 31, 0)
- mixer->watch_thread = g_thread_create (gst_oss4_mixer_watch_thread,
- gst_object_ref (mixer), TRUE, &err);
-#else
mixer->watch_thread = g_thread_try_new ("oss4-mixer-thread",
gst_oss4_mixer_watch_thread, gst_object_ref (mixer), &err);
-#endif
if (mixer->watch_thread == NULL) {
GST_ERROR_OBJECT (mixer, "Could not create watch thread: %s", err->message);
gst_element_set_state (pipeline, GST_STATE_NULL);
}
-#if !GLIB_CHECK_VERSION(2,30,0)
-static gchar *
-g_mkdtemp (gchar * template)
-{
- gchar *tmpdir;
-
- tmpdir = mkdtemp (template);
- if (tmpdir == NULL) {
- g_free (template);
- }
- return tmpdir;
-}
-#endif
-
GST_START_TEST (test_multifilesink_key_frame)
{
GstElement *pipeline;
g_type_init ();
-#if !GLIB_CHECK_VERSION (2, 31, 0)
- if (!g_thread_supported ())
- g_thread_init (NULL);
-#endif
-
s = suite_create ("souphttpsrc");
tc_chain = tcase_create ("general");
tc_internet = tcase_create ("internet");
GstPad *eq_sinkpad;
gchar *uri;
-#if !GLIB_CHECK_VERSION (2, 31, 0)
- if (!g_thread_supported ())
- g_thread_init (NULL);
-#endif
-
/* command line option parsing */
ctx = g_option_context_new ("FILENAME");
g_option_context_add_group (ctx, gst_init_get_option_group ());
GOptionContext *ctx;
GError *opt_err = NULL;
-#if !GLIB_CHECK_VERSION (2, 31, 0)
- if (!g_thread_supported ())
- g_thread_init (NULL);
-#endif
-
gtk_init (&argc, &argv);
/* command line option parsing */
GOptionContext *ctx;
GError *err = NULL;
-#if !GLIB_CHECK_VERSION (2, 31, 0)
- if (!g_thread_supported ())
- g_thread_init (NULL);
-#endif
-
ctx = g_option_context_new ("");
g_option_context_add_main_entries (ctx, options, NULL);
g_option_context_add_group (ctx, gst_init_get_option_group ());
gst_element_set_state (GST_ELEMENT (pipeline), GST_STATE_PLAYING);
loop = g_main_loop_new (NULL, FALSE);
-#if !GLIB_CHECK_VERSION (2, 31, 0)
- input_thread = g_thread_create (read_user, source, TRUE, NULL);
-#else
input_thread = g_thread_try_new ("v4l2src-test", read_user, source, NULL);
-#endif
if (input_thread == NULL) {
- fprintf (stderr, "error: g_thread_create return NULL");
+ fprintf (stderr, "error: g_thread_try_new() failed");
return -1;
}
GstCaps *filter_caps = NULL;
GList *caps_list, *l;
-#if !GLIB_CHECK_VERSION (2, 31, 0)
- if (!g_thread_supported ())
- g_thread_init (NULL);
-#endif
-
/* command line option parsing */
ctx = g_option_context_new ("");
g_option_context_add_group (ctx, gst_init_get_option_group ());