From 4b5c5a7d372ef2dfa1f034b13bc445e1827cd459 Mon Sep 17 00:00:00 2001 From: Matthew Waters Date: Thu, 29 May 2014 17:29:41 +1000 Subject: [PATCH] gl/colorconvert: use GstObject's lock instead of our own --- gst-libs/gst/gl/gstglcolorconvert.c | 11 ++++------- gst-libs/gst/gl/gstglcolorconvert.h | 2 -- 2 files changed, 4 insertions(+), 9 deletions(-) diff --git a/gst-libs/gst/gl/gstglcolorconvert.c b/gst-libs/gst/gl/gstglcolorconvert.c index d85883181a..f4e6847bb3 100644 --- a/gst-libs/gst/gl/gstglcolorconvert.c +++ b/gst-libs/gst/gl/gstglcolorconvert.c @@ -409,7 +409,6 @@ gst_gl_color_convert_class_init (GstGLColorConvertClass * klass) static void gst_gl_color_convert_init (GstGLColorConvert * convert) { - g_mutex_init (&convert->lock); } /** @@ -448,8 +447,6 @@ gst_gl_color_convert_finalize (GObject * object) convert->context = NULL; } - g_mutex_clear (&convert->lock); - G_OBJECT_CLASS (gst_gl_color_convert_parent_class)->finalize (object); } @@ -515,9 +512,9 @@ void gst_gl_color_convert_set_format (GstGLColorConvert * convert, GstVideoInfo * in_info, GstVideoInfo * out_info) { - g_mutex_lock (&convert->lock); + GST_OBJECT_LOCK (convert); _gst_gl_color_convert_set_format_unlocked (convert, in_info, out_info); - g_mutex_unlock (&convert->lock); + GST_OBJECT_UNLOCK (convert); } /** @@ -537,9 +534,9 @@ gst_gl_color_convert_perform (GstGLColorConvert * convert, GstBuffer * inbuf) g_return_val_if_fail (convert != NULL, FALSE); - g_mutex_lock (&convert->lock); + GST_OBJECT_LOCK (convert); ret = _gst_gl_color_convert_perform_unlocked (convert, inbuf); - g_mutex_unlock (&convert->lock); + GST_OBJECT_UNLOCK (convert); return ret; } diff --git a/gst-libs/gst/gl/gstglcolorconvert.h b/gst-libs/gst/gl/gstglcolorconvert.h index 4b843fcbf5..9b905c77b6 100644 --- a/gst-libs/gst/gl/gstglcolorconvert.h +++ b/gst-libs/gst/gl/gstglcolorconvert.h @@ -46,8 +46,6 @@ struct _GstGLColorConvert /* */ GstObject parent; - GMutex lock; - GstGLContext *context; /* input data */