summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 8df6cd7)
raw | patch | inline | side by side (parent: 8df6cd7)
author | Wim Taymans <wim.taymans@gmail.com> | |
Mon, 9 May 2005 14:47:15 +0000 (14:47 +0000) | ||
committer | Wim Taymans <wim.taymans@gmail.com> | |
Mon, 9 May 2005 14:47:15 +0000 (14:47 +0000) |
Original commit message from CVS:
* gst/base/gstbasetransform.c: (gst_base_transform_proxy_getcaps),
(gst_base_transform_event):
* gst/gstpad.c: (gst_pad_accept_caps), (gst_pad_query):
Implement accept_caps.
Fix silly lock/unlock mismatch in base class.
* gst/base/gstbasetransform.c: (gst_base_transform_proxy_getcaps),
(gst_base_transform_event):
* gst/gstpad.c: (gst_pad_accept_caps), (gst_pad_query):
Implement accept_caps.
Fix silly lock/unlock mismatch in base class.
ChangeLog | patch | blob | history | |
gst/base/gstbasetransform.c | patch | blob | history | |
gst/gstpad.c | patch | blob | history | |
libs/gst/base/gstbasetransform.c | patch | blob | history |
diff --git a/ChangeLog b/ChangeLog
index aa23ce13a60b1eb77e2eefd2a61911c931b632f7..b2846604035d107ab532d7334b88a33c458f3aca 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
+2005-05-09 Wim Taymans <wim@fluendo.com>
+
+ * gst/base/gstbasetransform.c: (gst_base_transform_proxy_getcaps),
+ (gst_base_transform_event):
+ * gst/gstpad.c: (gst_pad_accept_caps), (gst_pad_query):
+ Implement accept_caps.
+ Fix silly lock/unlock mismatch in base class.
+
2005-05-09 Wim Taymans <wim@fluendo.com>
* docs/design/draft-push-pull.txt:
index 59470679774f477dd608cd7448bf375e9328e4c7..abfbcd688a139c57f11b478351b0be756cf1b725 100644 (file)
GstBaseTransform *trans;
GstBaseTransformClass *bclass;
gboolean ret = FALSE;
+ gboolean unlock;
trans = GST_BASE_TRANSFORM (GST_PAD_PARENT (pad));
bclass = GST_BASE_TRANSFORM_GET_CLASS (trans);
if (bclass->event)
bclass->event (trans, event);
+ unlock = FALSE;
+
switch (GST_EVENT_TYPE (event)) {
case GST_EVENT_FLUSH:
if (GST_EVENT_FLUSH_DONE (event)) {
}
GST_STREAM_LOCK (pad);
+ unlock = TRUE;
break;
case GST_EVENT_EOS:
GST_STREAM_LOCK (pad);
+ unlock = TRUE;
break;
default:
break;
}
ret = gst_pad_event_default (pad, event);
- GST_STREAM_UNLOCK (pad);
+ if (unlock)
+ GST_STREAM_UNLOCK (pad);
return ret;
}
diff --git a/gst/gstpad.c b/gst/gstpad.c
index 8981c3881048bfdd6480de1e9e845c18e289f7cb..3aa9ef461050e536f28f41074fa6a777dbe2b1f0 100644 (file)
--- a/gst/gstpad.c
+++ b/gst/gstpad.c
GST_CAT_DEBUG (GST_CAT_CAPS, "pad accept caps of %s:%s (%p)",
GST_DEBUG_PAD_NAME (realpad), realpad);
- /* FIXME, call accept function */
- result = FALSE;
+ if (GST_RPAD_ACCEPTCAPSFUNC (pad)) {
+ /* we can call the function */
+ result = GST_RPAD_ACCEPTCAPSFUNC (realpad) (pad, caps);
+ } else {
+ /* else see get the caps and see if it intersects to something
+ * not empty */
+ GstCaps *intersect;
+ GstCaps *allowed;
+
+ allowed = gst_real_pad_get_caps_unlocked (realpad);
+ intersect = gst_caps_intersect (allowed, caps);
+ if (gst_caps_is_empty (intersect))
+ result = FALSE;
+ else
+ result = TRUE;
+ }
GST_UNLOCK (realpad);
return result;
index 59470679774f477dd608cd7448bf375e9328e4c7..abfbcd688a139c57f11b478351b0be756cf1b725 100644 (file)
GstBaseTransform *trans;
GstBaseTransformClass *bclass;
gboolean ret = FALSE;
+ gboolean unlock;
trans = GST_BASE_TRANSFORM (GST_PAD_PARENT (pad));
bclass = GST_BASE_TRANSFORM_GET_CLASS (trans);
if (bclass->event)
bclass->event (trans, event);
+ unlock = FALSE;
+
switch (GST_EVENT_TYPE (event)) {
case GST_EVENT_FLUSH:
if (GST_EVENT_FLUSH_DONE (event)) {
}
GST_STREAM_LOCK (pad);
+ unlock = TRUE;
break;
case GST_EVENT_EOS:
GST_STREAM_LOCK (pad);
+ unlock = TRUE;
break;
default:
break;
}
ret = gst_pad_event_default (pad, event);
- GST_STREAM_UNLOCK (pad);
+ if (unlock)
+ GST_STREAM_UNLOCK (pad);
return ret;
}