GST_LOG_OBJECT (obj, \
"locking from thread %p", \
g_thread_self ()); \
- g_mutex_lock (GST_PLAY_SINK_CONVERT_BIN_CAST(obj)->lock); \
+ g_mutex_lock (&GST_PLAY_SINK_CONVERT_BIN_CAST(obj)->lock); \
GST_LOG_OBJECT (obj, \
"locked from thread %p", \
g_thread_self ()); \
GST_LOG_OBJECT (obj, \
"unlocking from thread %p", \
g_thread_self ()); \
- g_mutex_unlock (GST_PLAY_SINK_CONVERT_BIN_CAST(obj)->lock); \
+ g_mutex_unlock (&GST_PLAY_SINK_CONVERT_BIN_CAST(obj)->lock); \
} G_STMT_END
typedef struct _GstPlaySinkConvertBin GstPlaySinkConvertBin;
GstBin parent;
/* < private > */
- GMutex *lock;
+ GMutex lock;
GstPad *sinkpad, *sink_proxypad;
guint sink_proxypad_block_id;
{
GstSubtitleOverlay *self = GST_SUBTITLE_OVERLAY (object);
- if (self->lock) {
- g_mutex_free (self->lock);
- self->lock = NULL;
- }
-
- if (self->factories_lock) {
- g_mutex_free (self->factories_lock);
- self->factories_lock = NULL;
- }
+ g_mutex_clear (&self->lock);
+ g_mutex_clear (&self->factories_lock);
if (self->factories)
gst_plugin_feature_list_free (self->factories);
self->subtitle_flush = FALSE;
/* Find our factories */
- g_mutex_lock (self->factories_lock);
+ g_mutex_lock (&self->factories_lock);
gst_subtitle_overlay_update_factory_list (self);
if (subcaps) {
factories =
self->subtitle_error = TRUE;
}
}
- g_mutex_unlock (self->factories_lock);
+ g_mutex_unlock (&self->factories_lock);
if (!subcaps) {
_setup_passthrough (self);
g_assert (parser_caps != NULL);
- g_mutex_lock (self->factories_lock);
+ g_mutex_lock (&self->factories_lock);
gst_subtitle_overlay_update_factory_list (self);
GST_DEBUG_OBJECT (self,
"Searching overlay factories for caps %" GST_PTR_FORMAT, parser_caps);
overlay_factories =
gst_subtitle_overlay_get_factories_for_caps (self->factories,
parser_caps);
- g_mutex_unlock (self->factories_lock);
+ g_mutex_unlock (&self->factories_lock);
if (!overlay_factories) {
GST_WARNING_OBJECT (self,
switch (transition) {
case GST_STATE_CHANGE_NULL_TO_READY:
GST_DEBUG_OBJECT (self, "State change NULL->READY");
- g_mutex_lock (self->factories_lock);
+ g_mutex_lock (&self->factories_lock);
if (G_UNLIKELY (!gst_subtitle_overlay_update_factory_list (self))) {
- g_mutex_unlock (self->factories_lock);
+ g_mutex_unlock (&self->factories_lock);
return GST_STATE_CHANGE_FAILURE;
}
- g_mutex_unlock (self->factories_lock);
+ g_mutex_unlock (&self->factories_lock);
GST_SUBTITLE_OVERLAY_LOCK (self);
/* Set the internal pads to blocking */
GstSubtitleOverlay *self = GST_SUBTITLE_OVERLAY (gst_pad_get_parent (pad));
GstCaps *ret;
- g_mutex_lock (self->factories_lock);
+ g_mutex_lock (&self->factories_lock);
if (G_UNLIKELY (!gst_subtitle_overlay_update_factory_list (self)))
ret = gst_caps_new_empty ();
else if (filter)
GST_CAPS_INTERSECT_FIRST);
else
ret = gst_caps_ref (self->factory_caps);
- g_mutex_unlock (self->factories_lock);
+ g_mutex_unlock (&self->factories_lock);
GST_DEBUG_OBJECT (pad, "Returning subtitle caps %" GST_PTR_FORMAT, ret);
GstPadTemplate *templ;
GstPad *proxypad = NULL;
- self->lock = g_mutex_new ();
- self->factories_lock = g_mutex_new ();
+ g_mutex_init (&self->lock);
+ g_mutex_init (&self->factories_lock);
templ = gst_static_pad_template_get (&srctemplate);
self->srcpad = gst_ghost_pad_new_no_target_from_template ("src", templ);
GST_LOG_OBJECT (obj, \
"locking from thread %p", \
g_thread_self ()); \
- g_mutex_lock (GST_SUBTITLE_OVERLAY_CAST(obj)->lock); \
+ g_mutex_lock (&GST_SUBTITLE_OVERLAY_CAST(obj)->lock); \
GST_LOG_OBJECT (obj, \
"locked from thread %p", \
g_thread_self ()); \
GST_LOG_OBJECT (obj, \
"unlocking from thread %p", \
g_thread_self ()); \
- g_mutex_unlock (GST_SUBTITLE_OVERLAY_CAST(obj)->lock); \
+ g_mutex_unlock (&GST_SUBTITLE_OVERLAY_CAST(obj)->lock); \
} G_STMT_END
typedef struct _GstSubtitleOverlay GstSubtitleOverlay;
gboolean subtitle_flush;
gboolean subtitle_error;
- GMutex *factories_lock;
+ GMutex factories_lock;
GList *factories;
guint32 factories_cookie;
GstCaps *factory_caps;
- GMutex *lock;
+ GMutex lock;
GstCaps *subcaps;
GstElement *passthrough_identity;