Caps (capabilities) are lightweight refcounted objects describing media types.
They are composed of an array of #GstStructure.
Caps are exposed on #GstPadTemplate to describe all possible types a
given pad can handle. They are also stored in the #GstRegistry along with
a description of the #GstElement.
Caps are exposed on the element pads using the gst.pad.Pad.queryCaps pad
function. This function describes the possible types that the pad can
handle or produce at runtime.
A #GstCaps can be constructed with the following code fragment:
A #GstCaps is fixed when it has no fields with ranges or lists. Use
gst.caps.Caps.isFixed to test for fixed caps. Fixed caps can be used in a
caps event to notify downstream elements of the current media type.
Various methods exist to work with the media types such as subtracting
or intersecting.
Be aware that until 1.20 the #GstCaps / #GstStructure serialization into string
had limited support for nested #GstCaps / #GstStructure fields. It could only
support one level of nesting. Using more levels would lead to unexpected
behavior when using serialization features, such as gst.caps.Caps.toString_ or
gst.global.valueSerialize and their counterparts.
Caps (capabilities) are lightweight refcounted objects describing media types. They are composed of an array of #GstStructure.
Caps are exposed on #GstPadTemplate to describe all possible types a given pad can handle. They are also stored in the #GstRegistry along with a description of the #GstElement.
Caps are exposed on the element pads using the gst.pad.Pad.queryCaps pad function. This function describes the possible types that the pad can handle or produce at runtime.
A #GstCaps can be constructed with the following code fragment:
A #GstCaps is fixed when it has no fields with ranges or lists. Use gst.caps.Caps.isFixed to test for fixed caps. Fixed caps can be used in a caps event to notify downstream elements of the current media type.
Various methods exist to work with the media types such as subtracting or intersecting.
Be aware that until 1.20 the #GstCaps / #GstStructure serialization into string had limited support for nested #GstCaps / #GstStructure fields. It could only support one level of nesting. Using more levels would lead to unexpected behavior when using serialization features, such as gst.caps.Caps.toString_ or gst.global.valueSerialize and their counterparts.