diff options
author | Wim Taymans <wtaymans@redhat.com> | 2013-12-03 21:46:19 +0100 |
---|---|---|
committer | Wim Taymans <wtaymans@redhat.com> | 2013-12-03 22:28:09 +0100 |
commit | 34db3528792a36e1befdd415c8df0db8b0b1ebb1 (patch) | |
tree | 1d4c32a9bb3a91f438734943ebd96fc53a38311c /gst/gstpad.h | |
parent | a90ce304c823ac47f8a31b33a61db826c548d217 (diff) | |
download | gstreamer-34db3528792a36e1befdd415c8df0db8b0b1ebb1.tar.gz |
pad: add ACCEPT_INTERCEPT flag
Make a new flag on the pad that tweaks the default behaviour of the
accept-caps function. By default it will check for a subset of the
query-caps result but this is not always desirable. The query-caps
result contains all the constraints to make a good caps decision
upstream but sometimes, like for parsers, not all the constrained caps
fields are known upstream and then a subset check would fail. Switching
to an intersection makes this work again.
See https://bugzilla.gnome.org/show_bug.cgi?id=705024
https://bugzilla.gnome.org/show_bug.cgi?id=677401
Diffstat (limited to 'gst/gstpad.h')
-rw-r--r-- | gst/gstpad.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/gst/gstpad.h b/gst/gstpad.h index a784835af4..367d4a5ede 100644 --- a/gst/gstpad.h +++ b/gst/gstpad.h @@ -622,6 +622,10 @@ typedef gboolean (*GstPadStickyEventsForeachFunction) (GstPad *pad, GstEvent ** * @GST_PAD_FLAG_PROXY_SCHEDULING: the default query handler will forward * scheduling queries to the internally linked pads * instead of discarding them. + * @GST_PAD_FLAG_ACCEPT_INTERSECT: the default accept-caps handler will check + * it the caps intersect the query-caps result instead + * of checking for a subset. This is interesting for + * parsers that can accept incompletely specified caps. * @GST_PAD_FLAG_LAST: offset to define more flags * * Pad state flags @@ -638,6 +642,7 @@ typedef enum { GST_PAD_FLAG_PROXY_CAPS = (GST_OBJECT_FLAG_LAST << 8), GST_PAD_FLAG_PROXY_ALLOCATION = (GST_OBJECT_FLAG_LAST << 9), GST_PAD_FLAG_PROXY_SCHEDULING = (GST_OBJECT_FLAG_LAST << 10), + GST_PAD_FLAG_ACCEPT_INTERSECT = (GST_OBJECT_FLAG_LAST << 11), /* padding */ GST_PAD_FLAG_LAST = (GST_OBJECT_FLAG_LAST << 16) } GstPadFlags; @@ -791,6 +796,10 @@ struct _GstPadClass { #define GST_PAD_SET_PROXY_SCHEDULING(pad) (GST_OBJECT_FLAG_SET (pad, GST_PAD_FLAG_PROXY_SCHEDULING)) #define GST_PAD_UNSET_PROXY_SCHEDULING(pad) (GST_OBJECT_FLAG_UNSET (pad, GST_PAD_FLAG_PROXY_SCHEDULING)) +#define GST_PAD_IS_ACCEPT_INTERSECT(pad) (GST_OBJECT_FLAG_IS_SET (pad, GST_PAD_FLAG_ACCEPT_INTERSECT)) +#define GST_PAD_SET_ACCEPT_INTERSECT(pad) (GST_OBJECT_FLAG_SET (pad, GST_PAD_FLAG_ACCEPT_INTERSECT)) +#define GST_PAD_UNSET_ACCEPT_INTERSECT(pad) (GST_OBJECT_FLAG_UNSET (pad, GST_PAD_FLAG_ACCEPT_INTERSECT)) + /** * GST_PAD_GET_STREAM_LOCK: * @pad: a #GstPad |