diff options
author | Tim-Philipp Müller <tim.muller@collabora.co.uk> | 2012-01-22 23:31:19 +0000 |
---|---|---|
committer | Tim-Philipp Müller <tim.muller@collabora.co.uk> | 2012-01-22 23:32:51 +0000 |
commit | 37409d4d6595db5f7f00e88240bd12c76ff7950f (patch) | |
tree | 13776f1931651996c8670a44d4b692c6db2fd196 /gst-libs | |
parent | 7cb9b7ab9db548eca8a67883b010dd14d2efd07e (diff) |
Don't use deprecated GLib API
Diffstat (limited to 'gst-libs')
-rw-r--r-- | gst-libs/gst/glib-compat-private.h | 69 |
1 files changed, 0 insertions, 69 deletions
diff --git a/gst-libs/gst/glib-compat-private.h b/gst-libs/gst/glib-compat-private.h index 91fe1ff7f..9a92993d4 100644 --- a/gst-libs/gst/glib-compat-private.h +++ b/gst-libs/gst/glib-compat-private.h @@ -27,77 +27,8 @@ G_BEGIN_DECLS -#if GLIB_CHECK_VERSION(2,26,0) -#define GLIB_HAS_GDATETIME -#endif - /* copies */ -#if 0 //GLIB_CHECK_VERSION (2, 31, 0) -#define g_mutex_new gst_g_mutex_new -static inline GMutex * -gst_g_mutex_new (void) -{ - GMutex *mutex = g_slice_new (GMutex); - g_mutex_init (mutex); - return mutex; -} -#define g_mutex_free gst_g_mutex_free -static inline void -gst_g_mutex_free (GMutex *mutex) -{ - g_mutex_clear (mutex); - g_slice_free (GMutex, mutex); -} -#define g_static_rec_mutex_init gst_g_static_rec_mutex_init -static inline void -gst_g_static_rec_mutex_init (GStaticRecMutex *mutex) -{ - static const GStaticRecMutex init_mutex = G_STATIC_REC_MUTEX_INIT; - - *mutex = init_mutex; -} -#define g_cond_new gst_g_cond_new -static inline GCond * -gst_g_cond_new (void) -{ - GCond *cond = g_slice_new (GCond); - g_cond_init (cond); - return cond; -} -#define g_cond_free gst_g_cond_free -static inline void -gst_g_cond_free (GCond *cond) -{ - g_cond_clear (cond); - g_slice_free (GCond, cond); -} -#define g_cond_timed_wait gst_g_cond_timed_wait -static inline gboolean -gst_g_cond_timed_wait (GCond *cond, GMutex *mutex, GTimeVal *abs_time) -{ - gint64 end_time; - - if (abs_time == NULL) { - g_cond_wait (cond, mutex); - return TRUE; - } - - end_time = abs_time->tv_sec; - end_time *= 1000000; - end_time += abs_time->tv_usec; - - /* would be nice if we had clock_rtoffset, but that didn't seem to - * make it into the kernel yet... - */ - /* if CLOCK_MONOTONIC is not defined then g_get_montonic_time() and - * g_get_real_time() are returning the same clock and we'd add ~0 - */ - end_time += g_get_monotonic_time () - g_get_real_time (); - return g_cond_wait_until (cond, mutex, end_time); -} -#endif /* GLIB_CHECK_VERSION (2, 31, 0) */ - /* adaptations */ G_END_DECLS |