autoconvert: don't use deprecated threading API

This commit is contained in:
Tim-Philipp Müller 2012-12-14 18:09:06 +00:00
parent 0e0dd05fd6
commit 8b2641805f

View File

@ -37,9 +37,9 @@
GST_DEBUG_CATEGORY (autovideoconvert_debug); GST_DEBUG_CATEGORY (autovideoconvert_debug);
#define GST_CAT_DEFAULT (autovideoconvert_debug) #define GST_CAT_DEFAULT (autovideoconvert_debug)
GStaticMutex factories_mutex = G_STATIC_MUTEX_INIT; static GMutex factories_mutex;
guint32 factories_cookie = 0; /* Cookie from last time when factories was updated */ static guint32 factories_cookie = 0; /* Cookie from last time when factories was updated */
GList *factories = NULL; /* factories we can use for selecting elements */ static GList *factories = NULL; /* factories we can use for selecting elements */
/* element factory information */ /* element factory information */
static GstStaticPadTemplate sinktemplate = GST_STATIC_PAD_TEMPLATE ("sink", static GstStaticPadTemplate sinktemplate = GST_STATIC_PAD_TEMPLATE ("sink",
@ -105,7 +105,7 @@ gst_auto_video_convert_update_factory_list (GstAutoVideoConvert *
autovideoconvert) autovideoconvert)
{ {
/* use a static mutex to protect factories list and factories cookie */ /* use a static mutex to protect factories list and factories cookie */
g_static_mutex_lock (&factories_mutex); g_mutex_lock (&factories_mutex);
/* test if a factories list already exist or not */ /* test if a factories list already exist or not */
if (!factories) { if (!factories) {
@ -127,7 +127,7 @@ gst_auto_video_convert_update_factory_list (GstAutoVideoConvert *
} }
} }
g_static_mutex_unlock (&factories_mutex); g_mutex_unlock (&factories_mutex);
} }
G_DEFINE_TYPE (GstAutoVideoConvert, gst_auto_video_convert, GST_TYPE_BIN); G_DEFINE_TYPE (GstAutoVideoConvert, gst_auto_video_convert, GST_TYPE_BIN);