mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-17 11:45:25 +00:00
basetransform: remove transform lock
This is not needed anymore by the baseclass. subclasses should do their own locking when needed.
This commit is contained in:
parent
c83e02d476
commit
d052c778af
2 changed files with 0 additions and 33 deletions
|
@ -351,12 +351,6 @@ static gboolean default_copy_metadata (GstBaseTransform * trans,
|
||||||
static void
|
static void
|
||||||
gst_base_transform_finalize (GObject * object)
|
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);
|
G_OBJECT_CLASS (parent_class)->finalize (object);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -444,7 +438,6 @@ gst_base_transform_init (GstBaseTransform * trans,
|
||||||
GST_DEBUG_FUNCPTR (gst_base_transform_query));
|
GST_DEBUG_FUNCPTR (gst_base_transform_query));
|
||||||
gst_element_add_pad (GST_ELEMENT (trans), trans->srcpad);
|
gst_element_add_pad (GST_ELEMENT (trans), trans->srcpad);
|
||||||
|
|
||||||
g_mutex_init (&trans->transform_lock);
|
|
||||||
trans->priv->qos_enabled = DEFAULT_PROP_QOS;
|
trans->priv->qos_enabled = DEFAULT_PROP_QOS;
|
||||||
trans->cache_caps1 = NULL;
|
trans->cache_caps1 = NULL;
|
||||||
trans->cache_caps2 = NULL;
|
trans->cache_caps2 = NULL;
|
||||||
|
@ -1937,9 +1930,7 @@ gst_base_transform_getrange (GstPad * pad, GstObject * parent, guint64 offset,
|
||||||
if (klass->before_transform)
|
if (klass->before_transform)
|
||||||
klass->before_transform (trans, inbuf);
|
klass->before_transform (trans, inbuf);
|
||||||
|
|
||||||
GST_BASE_TRANSFORM_LOCK (trans);
|
|
||||||
ret = gst_base_transform_handle_buffer (trans, inbuf, buffer);
|
ret = gst_base_transform_handle_buffer (trans, inbuf, buffer);
|
||||||
GST_BASE_TRANSFORM_UNLOCK (trans);
|
|
||||||
|
|
||||||
done:
|
done:
|
||||||
return ret;
|
return ret;
|
||||||
|
@ -1981,9 +1972,7 @@ gst_base_transform_chain (GstPad * pad, GstObject * parent, GstBuffer * buffer)
|
||||||
klass->before_transform (trans, buffer);
|
klass->before_transform (trans, buffer);
|
||||||
|
|
||||||
/* protect transform method and concurrent buffer alloc */
|
/* protect transform method and concurrent buffer alloc */
|
||||||
GST_BASE_TRANSFORM_LOCK (trans);
|
|
||||||
ret = gst_base_transform_handle_buffer (trans, buffer, &outbuf);
|
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
|
/* 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. */
|
* GST_BASE_TRANSFORM_FLOW_DROPPED we will not push either. */
|
||||||
|
|
|
@ -77,26 +77,6 @@ G_BEGIN_DECLS
|
||||||
*/
|
*/
|
||||||
#define GST_BASE_TRANSFORM_FLOW_DROPPED GST_FLOW_CUSTOM_SUCCESS
|
#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 _GstBaseTransform GstBaseTransform;
|
||||||
typedef struct _GstBaseTransformClass GstBaseTransformClass;
|
typedef struct _GstBaseTransformClass GstBaseTransformClass;
|
||||||
typedef struct _GstBaseTransformPrivate GstBaseTransformPrivate;
|
typedef struct _GstBaseTransformPrivate GstBaseTransformPrivate;
|
||||||
|
@ -131,8 +111,6 @@ struct _GstBaseTransform {
|
||||||
/* MT-protected (with STREAM_LOCK) */
|
/* MT-protected (with STREAM_LOCK) */
|
||||||
GstSegment segment;
|
GstSegment segment;
|
||||||
|
|
||||||
GMutex transform_lock;
|
|
||||||
|
|
||||||
/*< private >*/
|
/*< private >*/
|
||||||
GstBaseTransformPrivate *priv;
|
GstBaseTransformPrivate *priv;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue