Valadoc | Vala | Tutorial | API-References | Markup

Caps


Object Hierarchy:

Object hierarchy for Caps

Description:

public class Caps

Caps (capabilities) are lighweight 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 get_caps pad function. This function describes the possible types that the pad can handle or produce at runtime. Caps are also attached to buffers to describe to content of the data pointed to by the buffer with set_caps. Caps attached to a Buffer allow for format negotiation upstream and downstream. A Caps can be constructed with the following code fragment:

Creating caps:


GstCaps *caps;
caps = gst_caps_new_simple ("video/x-raw-yuv",
"format", GST_TYPE_FOURCC, GST_MAKE_FOURCC ('I', '4', '2', '0'),
"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 properties with ranges or lists. Use is_fixed to test for fixed caps. Only fixed caps can be set on a Pad or Buffer. Various methods exist to work with the media types such as subtracting or intersecting. Last reviewed on 2007-02-13 (0.10.10)


Namespace: Gst
Package: gstreamer-0.10

Content:

Static methods:

Creation methods:

Methods:

Fields: