GNOME Bugzilla – Bug 725415
v4l2videodec: Check caps are subset of encode or raw when probing devices
Last modified: 2014-05-08 20:20:29 UTC
To probe v4l2 devices in the decoder, we enumerate the formats and intersect against a set of know Encoded, or Raw formats depending on input or output. The problem is that some people have come up with multi-purpose encoding, decoding, color transform, scaler, transcoding magic driver that just can't be handled by VideoDecoder base class. These magic driver would better be accommodated by BaseTransform (acutally AsyncBaseTransform). To avoid enabling these as decoders, I would suggest that instead of doing: ret = gst_caps_intersect (filter, caps); I would suggest to check if caps is a subset of filter, if not we'd return the empty caps (or NULL), if it is a subset, then we can return the caps. This way a driver with double function like being an encoder and a decoder would be skipped, (e.g. input H264, YUV and output H264 YUV)
This is fixed now.