Commit 64045ba9 authored by Mark Nauwelaerts's avatar Mark Nauwelaerts

videobox: adjust to deprecated GMutex setup

parent edf3139e
...@@ -2451,10 +2451,7 @@ gst_video_box_finalize (GObject * object) ...@@ -2451,10 +2451,7 @@ gst_video_box_finalize (GObject * object)
{ {
GstVideoBox *video_box = GST_VIDEO_BOX (object); GstVideoBox *video_box = GST_VIDEO_BOX (object);
if (video_box->mutex) { g_mutex_clear (&video_box->mutex);
g_mutex_free (video_box->mutex);
video_box->mutex = NULL;
}
G_OBJECT_CLASS (parent_class)->finalize (object); G_OBJECT_CLASS (parent_class)->finalize (object);
} }
...@@ -2552,7 +2549,7 @@ gst_video_box_init (GstVideoBox * video_box) ...@@ -2552,7 +2549,7 @@ gst_video_box_init (GstVideoBox * video_box)
video_box->border_alpha = DEFAULT_BORDER_ALPHA; video_box->border_alpha = DEFAULT_BORDER_ALPHA;
video_box->autocrop = FALSE; video_box->autocrop = FALSE;
video_box->mutex = g_mutex_new (); g_mutex_init (&video_box->mutex);
} }
static void static void
...@@ -2561,7 +2558,7 @@ gst_video_box_set_property (GObject * object, guint prop_id, ...@@ -2561,7 +2558,7 @@ gst_video_box_set_property (GObject * object, guint prop_id,
{ {
GstVideoBox *video_box = GST_VIDEO_BOX (object); GstVideoBox *video_box = GST_VIDEO_BOX (object);
g_mutex_lock (video_box->mutex); g_mutex_lock (&video_box->mutex);
switch (prop_id) { switch (prop_id) {
case PROP_LEFT: case PROP_LEFT:
video_box->box_left = g_value_get_int (value); video_box->box_left = g_value_get_int (value);
...@@ -2624,7 +2621,7 @@ gst_video_box_set_property (GObject * object, guint prop_id, ...@@ -2624,7 +2621,7 @@ gst_video_box_set_property (GObject * object, guint prop_id,
GST_DEBUG_OBJECT (video_box, "Calling reconfigure"); GST_DEBUG_OBJECT (video_box, "Calling reconfigure");
gst_base_transform_reconfigure_src (GST_BASE_TRANSFORM_CAST (video_box)); gst_base_transform_reconfigure_src (GST_BASE_TRANSFORM_CAST (video_box));
g_mutex_unlock (video_box->mutex); g_mutex_unlock (&video_box->mutex);
} }
static void static void
...@@ -3141,7 +3138,7 @@ gst_video_box_set_info (GstVideoFilter * vfilter, GstCaps * in, ...@@ -3141,7 +3138,7 @@ gst_video_box_set_info (GstVideoFilter * vfilter, GstCaps * in,
GstVideoBox *video_box = GST_VIDEO_BOX (vfilter); GstVideoBox *video_box = GST_VIDEO_BOX (vfilter);
gboolean ret; gboolean ret;
g_mutex_lock (video_box->mutex); g_mutex_lock (&video_box->mutex);
video_box->in_format = GST_VIDEO_INFO_FORMAT (in_info); video_box->in_format = GST_VIDEO_INFO_FORMAT (in_info);
video_box->in_width = GST_VIDEO_INFO_WIDTH (in_info); video_box->in_width = GST_VIDEO_INFO_WIDTH (in_info);
...@@ -3169,7 +3166,7 @@ gst_video_box_set_info (GstVideoFilter * vfilter, GstCaps * in, ...@@ -3169,7 +3166,7 @@ gst_video_box_set_info (GstVideoFilter * vfilter, GstCaps * in,
if (ret) if (ret)
ret = gst_video_box_select_processing_functions (video_box); ret = gst_video_box_select_processing_functions (video_box);
g_mutex_unlock (video_box->mutex); g_mutex_unlock (&video_box->mutex);
return ret; return ret;
} }
...@@ -3320,9 +3317,9 @@ gst_video_box_transform_frame (GstVideoFilter * vfilter, ...@@ -3320,9 +3317,9 @@ gst_video_box_transform_frame (GstVideoFilter * vfilter,
{ {
GstVideoBox *video_box = GST_VIDEO_BOX (vfilter); GstVideoBox *video_box = GST_VIDEO_BOX (vfilter);
g_mutex_lock (video_box->mutex); g_mutex_lock (&video_box->mutex);
gst_video_box_process (video_box, in_frame, out_frame); gst_video_box_process (video_box, in_frame, out_frame);
g_mutex_unlock (video_box->mutex); g_mutex_unlock (&video_box->mutex);
return GST_FLOW_OK; return GST_FLOW_OK;
} }
......
...@@ -57,7 +57,7 @@ struct _GstVideoBox ...@@ -57,7 +57,7 @@ struct _GstVideoBox
/* <private> */ /* <private> */
/* Guarding everything below */ /* Guarding everything below */
GMutex *mutex; GMutex mutex;
/* caps */ /* caps */
GstVideoFormat in_format; GstVideoFormat in_format;
gint in_width, in_height; gint in_width, in_height;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment