static void
gst_base_transform_finalize (GObject * object)
{
- GstBaseTransform *trans;
-
- trans = GST_BASE_TRANSFORM (object);
-
- g_mutex_clear (&trans->transform_lock);
-
G_OBJECT_CLASS (parent_class)->finalize (object);
}
GST_DEBUG_FUNCPTR (gst_base_transform_query));
gst_element_add_pad (GST_ELEMENT (trans), trans->srcpad);
- g_mutex_init (&trans->transform_lock);
trans->priv->qos_enabled = DEFAULT_PROP_QOS;
trans->cache_caps1 = NULL;
trans->cache_caps2 = NULL;
if (klass->before_transform)
klass->before_transform (trans, inbuf);
- GST_BASE_TRANSFORM_LOCK (trans);
ret = gst_base_transform_handle_buffer (trans, inbuf, buffer);
- GST_BASE_TRANSFORM_UNLOCK (trans);
done:
return ret;
klass->before_transform (trans, buffer);
/* protect transform method and concurrent buffer alloc */
- GST_BASE_TRANSFORM_LOCK (trans);
ret = gst_base_transform_handle_buffer (trans, buffer, &outbuf);
- GST_BASE_TRANSFORM_UNLOCK (trans);
/* outbuf can be NULL, this means a dropped buffer, if we have a buffer but
* GST_BASE_TRANSFORM_FLOW_DROPPED we will not push either. */
*/
#define GST_BASE_TRANSFORM_FLOW_DROPPED GST_FLOW_CUSTOM_SUCCESS
-/**
- * GST_BASE_TRANSFORM_LOCK:
- * @obj: base transform instance
- *
- * Obtain a lock to protect the transform function from concurrent access.
- *
- * Since: 0.10.13
- */
-#define GST_BASE_TRANSFORM_LOCK(obj) g_mutex_lock (&GST_BASE_TRANSFORM_CAST (obj)->transform_lock)
-
-/**
- * GST_BASE_TRANSFORM_UNLOCK:
- * @obj: base transform instance
- *
- * Release the lock that protects the transform function from concurrent access.
- *
- * Since: 0.10.13
- */
-#define GST_BASE_TRANSFORM_UNLOCK(obj) g_mutex_unlock (&GST_BASE_TRANSFORM_CAST (obj)->transform_lock)
-
typedef struct _GstBaseTransform GstBaseTransform;
typedef struct _GstBaseTransformClass GstBaseTransformClass;
typedef struct _GstBaseTransformPrivate GstBaseTransformPrivate;
/* MT-protected (with STREAM_LOCK) */
GstSegment segment;
- GMutex transform_lock;
-
/*< private >*/
GstBaseTransformPrivate *priv;