Caps Intersection and Default Features.

Sebastian Dröge sebastian at centricular.com
Sun Sep 6 02:50:24 PDT 2015


On Fr, 2015-09-04 at 11:47 -0400, Stirling Westrup wrote:
> I just discovered that although the caps "video/x-raw" is assumed to
> be the same as "video/x-raw(memory:SystemMemory)", its not the case
> if any other feature is mentioned. So, if you have two caps like
> this, where the (...) parts are identical:
> 
> "video/x-raw(meta:Foo), ..."
> "video/x-raw(memory:SystemMemory, meta:Foo), ..."
> 
> if you intersect the caps you get EMPTY. I checked the source code
> for gst_caps_intersect_full() and found that it only assumes a
> default feature of memory:SystemMemory if features are completely
> empty. Wouldn't it make more sense to assume memory:SystemMemory in
> the absence of any other memory: feature?

It is currently implemented like this for backwards compatibility as
caps features were only added in 1.2. Caps features are opaque strings
currently, so the "memory:" prefix might tell the programmer something
but GStreamer does not know anything about it.

In your above example, implicitly adding sysmem to the first caps seems
to make sense, but this all has the be carefully analysed first :) Can
you open a bug about it in Bugzilla, ideally with more examples?
Thanks!

-- 
Sebastian Dröge, Centricular Ltd · http://www.centricular.com

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 949 bytes
Desc: This is a digitally signed message part
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20150906/73353410/attachment.sig>


More information about the gstreamer-devel mailing list