Caps


Object Hierarchy:

Gst.Caps Gst.Caps Gst.Caps Gst.MiniObject Gst.MiniObject Gst.MiniObject->Gst.Caps

Description:

[ CCode ( ref_function = "gst_caps_ref" , type_id = "gst_caps_get_type ()" , unref_function = "gst_caps_unref" ) ]
[ Compact ]
public class Caps : MiniObject

Caps (capabilities) are lightweight refcounted objects describing media types.

They are composed of an array of Structure.

Caps are exposed on PadTemplate to describe all possible types a given pad can handle. They are also stored in the Registry along with a description of the Element.

Caps are exposed on the element pads using the query_caps pad function. This function describes the possible types that the pad can handle or produce at runtime.

A Caps can be constructed with the following code fragment:

``` C GstCaps *caps = gst_caps_new_simple ("video/x-raw", "format", G_TYPE_STRING, "I420", "framerate", GST_TYPE_FRACTION, 25, 1, "pixel-aspect-ratio", GST_TYPE_FRACTION, 1, 1, "width", G_TYPE_INT, 320, "height", G_TYPE_INT, 240, NULL); ```

A Caps is fixed when it has no fields with ranges or lists. Use is_fixed 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 Caps / Structure serialization into string had limited support for nested Caps / Structure fields. It could only support one level of nesting. Using more levels would lead to unexpected behavior when using serialization features, such as to_string or serialize and their counterparts.


Namespace: Gst
Package: gstreamer-1.0

Content:

Static methods:

Creation methods:

Methods:

Inherited Members: