summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authorWim Taymans <wim.taymans@gmail.com>2005-03-07 18:27:42 +0000
committerWim Taymans <wim.taymans@gmail.com>2005-03-07 18:27:42 +0000
commitc47dc4d8537a2cf09e830b8e8fef455306bb7e3e (patch)
tree52648c38eaf8eb9b206078ad5f134ec5f3fa914b /plugins
parentd5e9b91e0aa074b93135300a5e31a6e0a850a18c (diff)
First THREADED backport attempt, focusing on adding locks and making sure the API is threadsafe. Needs more work. Mor...
Original commit message from CVS: First THREADED backport attempt, focusing on adding locks and making sure the API is threadsafe. Needs more work. More docs follow this week.
Diffstat (limited to 'plugins')
-rw-r--r--plugins/elements/gstfakesrc.c2
-rw-r--r--plugins/elements/gstidentity.c4
-rw-r--r--plugins/elements/gstqueue.c7
-rw-r--r--plugins/elements/gsttee.c17
-rw-r--r--plugins/elements/gsttypefindelement.c2
5 files changed, 17 insertions, 15 deletions
diff --git a/plugins/elements/gstfakesrc.c b/plugins/elements/gstfakesrc.c
index 0b64860e9..780835e9a 100644
--- a/plugins/elements/gstfakesrc.c
+++ b/plugins/elements/gstfakesrc.c
@@ -887,7 +887,7 @@ gst_fakesrc_loop (GstElement * element)
src = GST_FAKESRC (element);
- pads = gst_element_get_pad_list (element);
+ pads = element->pads;
while (pads) {
GstPad *pad = GST_PAD (pads->data);
diff --git a/plugins/elements/gstidentity.c b/plugins/elements/gstidentity.c
index 835697c20..2b4c46063 100644
--- a/plugins/elements/gstidentity.c
+++ b/plugins/elements/gstidentity.c
@@ -203,14 +203,14 @@ gst_identity_init (GstIdentity * identity)
gst_element_add_pad (GST_ELEMENT (identity), identity->sinkpad);
gst_pad_set_chain_function (identity->sinkpad,
GST_DEBUG_FUNCPTR (gst_identity_chain));
- gst_pad_set_link_function (identity->sinkpad, gst_pad_proxy_pad_link);
+ //gst_pad_set_link_function (identity->sinkpad, gst_pad_proxy_pad_link);
gst_pad_set_getcaps_function (identity->sinkpad, gst_pad_proxy_getcaps);
identity->srcpad =
gst_pad_new_from_template (gst_static_pad_template_get (&srctemplate),
"src");
gst_element_add_pad (GST_ELEMENT (identity), identity->srcpad);
- gst_pad_set_link_function (identity->srcpad, gst_pad_proxy_pad_link);
+ //gst_pad_set_link_function (identity->srcpad, gst_pad_proxy_pad_link);
gst_pad_set_getcaps_function (identity->srcpad, gst_pad_proxy_getcaps);
identity->loop_based = DEFAULT_LOOP_BASED;
diff --git a/plugins/elements/gstqueue.c b/plugins/elements/gstqueue.c
index b9ade2405..0ed213dd7 100644
--- a/plugins/elements/gstqueue.c
+++ b/plugins/elements/gstqueue.c
@@ -434,6 +434,8 @@ gst_queue_link_sink (GstPad * pad, const GstCaps * caps)
GST_QUEUE_MUTEX_UNLOCK;
}
+ link_ret = GST_PAD_LINK_OK;
+#if 0
link_ret = gst_pad_proxy_pad_link (pad, caps);
if (GST_PAD_LINK_SUCCESSFUL (link_ret)) {
@@ -441,6 +443,7 @@ gst_queue_link_sink (GstPad * pad, const GstCaps * caps)
* the pads become unnegotiated while we have buffers */
gst_caps_replace (&queue->negotiated_caps, gst_caps_copy (caps));
}
+#endif
return link_ret;
}
@@ -459,8 +462,10 @@ gst_queue_link_src (GstPad * pad, const GstCaps * caps)
}
return GST_PAD_LINK_REFUSED;
}
-
+#if 0
link_ret = gst_pad_proxy_pad_link (pad, caps);
+#endif
+ link_ret = GST_PAD_LINK_OK;
if (GST_PAD_LINK_SUCCESSFUL (link_ret)) {
/* we store an extra copy of the negotiated caps, just in case
diff --git a/plugins/elements/gsttee.c b/plugins/elements/gsttee.c
index a046ed363..eec458604 100644
--- a/plugins/elements/gsttee.c
+++ b/plugins/elements/gsttee.c
@@ -141,8 +141,7 @@ gst_tee_init (GstTee * tee)
"sink");
gst_element_add_pad (GST_ELEMENT (tee), tee->sinkpad);
gst_pad_set_chain_function (tee->sinkpad, GST_DEBUG_FUNCPTR (gst_tee_chain));
- gst_pad_set_link_function (tee->sinkpad,
- GST_DEBUG_FUNCPTR (gst_pad_proxy_pad_link));
+ //gst_pad_set_link_function (tee->sinkpad, GST_DEBUG_FUNCPTR (gst_pad_proxy_pad_link));
gst_pad_set_getcaps_function (tee->sinkpad,
GST_DEBUG_FUNCPTR (gst_pad_proxy_getcaps));
@@ -169,16 +168,15 @@ gst_tee_getcaps (GstPad * _pad)
GstPad *pad;
const GList *pads;
- for (pads = gst_element_get_pad_list (GST_ELEMENT (tee));
- pads != NULL; pads = pads->next) {
+ for (pads = GST_ELEMENT (tee)->pads; pads != NULL; pads = pads->next) {
pad = GST_PAD (pads->data);
if (pad == _pad)
continue;
tmp = gst_pad_get_allowed_caps (pad);
res = gst_caps_intersect (caps, tmp);
- gst_caps_free (tmp);
- gst_caps_free (caps);
+ gst_caps_unref (tmp);
+ gst_caps_unref (caps);
caps = res;
}
@@ -195,8 +193,7 @@ gst_tee_link (GstPad * _pad, const GstCaps * caps)
GST_DEBUG_OBJECT (tee, "Forwarding link to all other pads");
- for (pads = gst_element_get_pad_list (GST_ELEMENT (tee));
- pads != NULL; pads = pads->next) {
+ for (pads = GST_ELEMENT (tee)->pads; pads != NULL; pads = pads->next) {
pad = GST_PAD (pads->data);
if (pad == _pad)
continue;
@@ -231,7 +228,7 @@ gst_tee_request_new_pad (GstElement * element, GstPadTemplate * templ,
tee = GST_TEE (element);
/* try names in order and find one that's not in use atm */
- pads = gst_element_get_pad_list (element);
+ pads = element->pads;
name = NULL;
while (!name) {
@@ -335,7 +332,7 @@ gst_tee_chain (GstPad * pad, GstData * _data)
gst_buffer_ref_by_count (buf, GST_ELEMENT (tee)->numsrcpads - 1);
- pads = gst_element_get_pad_list (GST_ELEMENT (tee));
+ pads = GST_ELEMENT (tee)->pads;
while (pads) {
GstPad *outpad = GST_PAD (pads->data);
diff --git a/plugins/elements/gsttypefindelement.c b/plugins/elements/gsttypefindelement.c
index a3b6fa206..9c7b16244 100644
--- a/plugins/elements/gsttypefindelement.c
+++ b/plugins/elements/gsttypefindelement.c
@@ -350,7 +350,7 @@ free_entry (TypeFindEntry * entry)
free_entry_buffers (entry);
if (entry->caps)
- gst_caps_free (entry->caps);
+ gst_caps_unref (entry->caps);
g_free (entry);
}
static void