mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-19 05:45:58 +00:00
tee: Remove dyn lock
It was used for pad-alloc in 0.10 but currently is completely unused and not necessary. All pad access is protected by the tee object lock and keeping another reference to the current pad.
This commit is contained in:
parent
bdf3f4237d
commit
612918c43c
2 changed files with 0 additions and 14 deletions
|
@ -78,10 +78,6 @@ gst_tee_pull_mode_get_type (void)
|
|||
return type;
|
||||
}
|
||||
|
||||
/* lock to protect request pads from being removed while downstream */
|
||||
#define GST_TEE_DYN_LOCK(tee) g_mutex_lock (&(tee)->dyn_lock)
|
||||
#define GST_TEE_DYN_UNLOCK(tee) g_mutex_unlock (&(tee)->dyn_lock)
|
||||
|
||||
#define DEFAULT_PROP_NUM_SRC_PADS 0
|
||||
#define DEFAULT_PROP_HAS_CHAIN TRUE
|
||||
#define DEFAULT_PROP_SILENT TRUE
|
||||
|
@ -220,8 +216,6 @@ gst_tee_finalize (GObject * object)
|
|||
|
||||
g_free (tee->last_message);
|
||||
|
||||
g_mutex_clear (&tee->dyn_lock);
|
||||
|
||||
G_OBJECT_CLASS (parent_class)->finalize (object);
|
||||
}
|
||||
|
||||
|
@ -285,8 +279,6 @@ gst_tee_class_init (GstTeeClass * klass)
|
|||
static void
|
||||
gst_tee_init (GstTee * tee)
|
||||
{
|
||||
g_mutex_init (&tee->dyn_lock);
|
||||
|
||||
tee->sinkpad = gst_pad_new_from_static_template (&sinktemplate, "sink");
|
||||
tee->sink_mode = GST_PAD_MODE_NONE;
|
||||
|
||||
|
@ -404,8 +396,6 @@ gst_tee_release_pad (GstElement * element, GstPad * pad)
|
|||
|
||||
GST_DEBUG_OBJECT (tee, "releasing pad");
|
||||
|
||||
/* wait for pending pad_alloc to finish */
|
||||
GST_TEE_DYN_LOCK (tee);
|
||||
GST_OBJECT_LOCK (tee);
|
||||
/* mark the pad as removed so that future pad_alloc fails with NOT_LINKED. */
|
||||
GST_TEE_PAD_CAST (pad)->removed = TRUE;
|
||||
|
@ -419,7 +409,6 @@ gst_tee_release_pad (GstElement * element, GstPad * pad)
|
|||
gst_element_remove_pad (GST_ELEMENT_CAST (tee), pad);
|
||||
|
||||
gst_pad_set_active (pad, FALSE);
|
||||
GST_TEE_DYN_UNLOCK (tee);
|
||||
|
||||
gst_object_unref (pad);
|
||||
|
||||
|
|
|
@ -66,9 +66,6 @@ struct _GstTee {
|
|||
GstElement element;
|
||||
|
||||
/*< private >*/
|
||||
/* lock protecting dynamic pads */
|
||||
GMutex dyn_lock;
|
||||
|
||||
GstPad *sinkpad;
|
||||
GstPad *allocpad;
|
||||
guint pad_counter;
|
||||
|
|
Loading…
Reference in a new issue