summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ext/soup/gstsouphttpclientsink.c5
-rw-r--r--gst-libs/gst/glib-compat-private.h32
-rw-r--r--gst/alpha/gstalpha.c21
-rw-r--r--gst/alpha/gstalpha.h4
-rw-r--r--gst/interleave/interleave.c5
-rw-r--r--gst/rtpmanager/gstrtpsession.c5
-rw-r--r--sys/oss4/oss4-mixer.c5
-rw-r--r--tests/check/elements/multifile.c14
-rw-r--r--tests/check/elements/souphttpsrc.c5
-rw-r--r--tests/icles/equalizer-test.c5
-rw-r--r--tests/icles/gdkpixbufsink-test.c5
-rw-r--r--tests/icles/test-oss4.c5
-rw-r--r--tests/icles/v4l2src-test.c6
-rw-r--r--tests/icles/videocrop-test.c5
14 files changed, 2 insertions, 120 deletions
diff --git a/ext/soup/gstsouphttpclientsink.c b/ext/soup/gstsouphttpclientsink.c
index 5dec06171..712cee56d 100644
--- a/ext/soup/gstsouphttpclientsink.c
+++ b/ext/soup/gstsouphttpclientsink.c
@@ -500,13 +500,8 @@ gst_soup_http_client_sink_start (GstBaseSink * sink)
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);
diff --git a/gst-libs/gst/glib-compat-private.h b/gst-libs/gst/glib-compat-private.h
index b9248e686..91fe1ff7f 100644
--- a/gst-libs/gst/glib-compat-private.h
+++ b/gst-libs/gst/glib-compat-private.h
@@ -27,43 +27,13 @@
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)
diff --git a/gst/alpha/gstalpha.c b/gst/alpha/gstalpha.c
index 325bdc53b..4b53a80ce 100644
--- a/gst/alpha/gstalpha.c
+++ b/gst/alpha/gstalpha.c
@@ -146,18 +146,6 @@ static GstStaticCaps gst_alpha_alpha_caps =
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); \
@@ -168,7 +156,6 @@ GST_STATIC_CAPS (GST_VIDEO_CAPS_MAKE ("{ AYUV, ARGB, BGRA, ABGR, RGBA }"));
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);
@@ -310,11 +297,7 @@ gst_alpha_init (GstAlpha * alpha)
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
@@ -322,11 +305,7 @@ gst_alpha_finalize (GObject * object)
{
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);
}
diff --git a/gst/alpha/gstalpha.h b/gst/alpha/gstalpha.h
index 48592f1bb..a3131341d 100644
--- a/gst/alpha/gstalpha.h
+++ b/gst/alpha/gstalpha.h
@@ -69,11 +69,7 @@ struct _GstAlpha
/* <private> */
/* caps */
-#if !GLIB_CHECK_VERSION (2, 31, 0)
- GStaticMutex lock;
-#else
GMutex lock;
-#endif
gboolean in_sdtv, out_sdtv;
diff --git a/gst/interleave/interleave.c b/gst/interleave/interleave.c
index e7e0b668c..97d81e4b3 100644
--- a/gst/interleave/interleave.c
+++ b/gst/interleave/interleave.c
@@ -479,13 +479,8 @@ gst_interleave_request_new_pad (GstElement * element, GstPadTemplate * templ,
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,
diff --git a/gst/rtpmanager/gstrtpsession.c b/gst/rtpmanager/gstrtpsession.c
index 8fd9e05a7..7409a2396 100644
--- a/gst/rtpmanager/gstrtpsession.c
+++ b/gst/rtpmanager/gstrtpsession.c
@@ -910,13 +910,8 @@ start_rtcp_thread (GstRtpSession * rtpsession)
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);
diff --git a/sys/oss4/oss4-mixer.c b/sys/oss4/oss4-mixer.c
index e384452ec..49da03ceb 100644
--- a/sys/oss4/oss4-mixer.c
+++ b/sys/oss4/oss4-mixer.c
@@ -542,13 +542,8 @@ gst_oss4_mixer_start_watch_task (GstOss4Mixer * mixer)
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);
diff --git a/tests/check/elements/multifile.c b/tests/check/elements/multifile.c
index fcdb41acd..3102e53f3 100644
--- a/tests/check/elements/multifile.c
+++ b/tests/check/elements/multifile.c
@@ -41,20 +41,6 @@ run_pipeline (GstElement * pipeline)
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;
diff --git a/tests/check/elements/souphttpsrc.c b/tests/check/elements/souphttpsrc.c
index a21ab8ff6..81554a28c 100644
--- a/tests/check/elements/souphttpsrc.c
+++ b/tests/check/elements/souphttpsrc.c
@@ -447,11 +447,6 @@ souphttpsrc_suite (void)
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");
diff --git a/tests/icles/equalizer-test.c b/tests/icles/equalizer-test.c
index fc6d5273e..e082162ed 100644
--- a/tests/icles/equalizer-test.c
+++ b/tests/icles/equalizer-test.c
@@ -179,11 +179,6 @@ main (int argc, char **argv)
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 ());
diff --git a/tests/icles/gdkpixbufsink-test.c b/tests/icles/gdkpixbufsink-test.c
index 8ada8614b..a09d9f135 100644
--- a/tests/icles/gdkpixbufsink-test.c
+++ b/tests/icles/gdkpixbufsink-test.c
@@ -330,11 +330,6 @@ main (int argc, char **argv)
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 */
diff --git a/tests/icles/test-oss4.c b/tests/icles/test-oss4.c
index 233e891fd..ad8f46cd0 100644
--- a/tests/icles/test-oss4.c
+++ b/tests/icles/test-oss4.c
@@ -233,11 +233,6 @@ main (int argc, char **argv)
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 ());
diff --git a/tests/icles/v4l2src-test.c b/tests/icles/v4l2src-test.c
index 5020c5e7f..674267798 100644
--- a/tests/icles/v4l2src-test.c
+++ b/tests/icles/v4l2src-test.c
@@ -491,14 +491,10 @@ main (int argc, char *argv[])
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;
}
diff --git a/tests/icles/videocrop-test.c b/tests/icles/videocrop-test.c
index de8963b3f..001f89163 100644
--- a/tests/icles/videocrop-test.c
+++ b/tests/icles/videocrop-test.c
@@ -193,11 +193,6 @@ main (int argc, char **argv)
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 ());