Sets our main struct and passes it to the parent class
Creates a new GstCaps that is empty. That is, the returned GstCaps contains no media formats. The GstCaps is guaranteed to be writable. Caller is responsible for unreffing the returned caps.
Creates a new GstCaps that contains one GstStructure with name media_type. Caller is responsible for unreffing the returned caps.
Creates a new GstCaps and adds all the structures listed as arguments. The list must be NULL-terminated. The structures are not copied; the returned GstCaps owns the structures.
Appends the structures contained in caps2 to caps1. The structures in caps2 are not copied -- they are transferred to caps1, and then caps2 is freed. If either caps is ANY, the resulting caps will be ANY.
Appends structure to caps. The structure is not copied; caps becomes the owner of structure.
Appends structure with features to caps. The structure is not copied; caps becomes the owner of structure. Since 1.2
Tries intersecting caps1 and caps2 and reports whether the result would not be empty
Creates a new GstCaps as a copy of the old caps. The new caps will have a refcount of 1, owned by the caller. The structures are copied as well. Note that this function is the semantic equivalent of a gst_caps_ref() followed by a gst_caps_make_writable(). If you only want to hold on to a reference to the data, you should use gst_caps_ref(). When you are finished with the caps, call gst_caps_unref() on it.
Creates a new GstCaps and appends a copy of the nth structure contained in caps.
Add a reference to a GstCaps object. From this point on, until the caller calls gst_caps_unref() or gst_caps_make_writable(), it is guaranteed that the caps object will not change. This means its structures won't change, etc. To use a GstCaps object, you must always have a refcount on it -- either the one made implicitly by e.g. gst_caps_new_simple(), or via taking one explicitly with this function.
Modifies the given caps into a representation with only fixed values. First the caps will be truncated and then the first structure will be fixated with gst_structure_fixate().
Finds the features in caps that has the index index, and returns it. WARNING: This function takes a const GstCaps *, but returns a non-const GstCapsFeatures *. This is for programming convenience -- the caller should be aware that structures inside a constant GstCaps should not be modified. However, if you know the caps are writable, either because you have just copied them or made them writable with gst_caps_make_writable(), you may modify the features returned in the usual way, e.g. with functions like gst_caps_features_add(). You do not need to free or unref the structure returned, it belongs to the GstCaps. Since 1.2
Gets the number of structures contained in caps.
the main Gtk struct as a void*
Finds the structure in caps that has the index index, and returns it. WARNING: This function takes a const GstCaps *, but returns a non-const GstStructure *. This is for programming convenience -- the caller should be aware that structures inside a constant GstCaps should not be modified. However, if you know the caps are writable, either because you have just copied them or made them writable with gst_caps_make_writable(), you may modify the structure returned in the usual way, e.g. with functions like gst_structure_set(). You do not need to free or unref the structure returned, it belongs to the GstCaps.
Creates a new GstCaps that contains all the formats that are common to both caps1 and caps2. Defaults to GST_CAPS_INTERSECT_ZIG_ZAG mode.
Creates a new GstCaps that contains all the formats that are common to both caps1 and caps2, the order is defined by the GstCapsIntersectMode used.
A given GstCaps structure is always compatible with another if every media format that is in the first is also contained in the second. That is, caps1 is a subset of caps2.
Determines if caps represents any media format.
Determines if caps represents no media formats.
Checks if the given caps represent the same set of caps.
Tests if two GstCaps are equal. This function only works on fixed GstCaps.
Fixed GstCaps describe exactly one format, that is, they have exactly one structure, and each field in the structure describes a fixed type. Examples of non-fixed types are GST_TYPE_INT_RANGE and GST_TYPE_LIST.
Checks if the given caps are exactly the same set of caps.
Checks if all caps represented by subset are also represented by superset.
Checks if structure is a subset of caps. See gst_caps_is_subset() for more information.
Checks if structure is a subset of caps. See gst_caps_is_subset() for more information. Since 1.2
Appends the structures contained in caps2 to caps1 if they are not yet expressed by caps1. The structures in caps2 are not copied -- they are transferred to a writable copy of caps1, and then caps2 is freed. If either caps is ANY, the resulting caps will be ANY.
Appends structure to caps if its not already expressed by caps.
Appends structure with features to caps if its not already expressed by caps. Since 1.2
Returns a GstCaps that represents the same set of formats as caps, but contains no lists. Each list is expanded into separate GstStructures. This function takes ownership of caps.
removes the stucture with the given index from the list of structures contained in caps.
Sets the GstCapsFeatures features for the structure at index. Since 1.2
Sets fields in a GstCaps. The arguments must be passed in the same manner as gst_structure_set(), and be NULL-terminated.
Sets the given field on all structures of caps to the given value. This is a convenience function for calling gst_structure_set_value() on all structures of caps.
Converts the given caps into a representation that represents the same set of formats, but in a simpler form. Component structures that are identical are merged. Component structures that have values that can be merged are also merged. This method does not preserve the original order of caps.
Retrieves the structure with the given index from the list of structures contained in caps. The caller becomes the owner of the returned structure.
Subtracts the subtrahend from the minuend. Note This function does not work reliably if optional properties for caps are included on one caps and omitted on the other.
Converts caps to a string representation. This string representation can be converted back to a GstCaps by gst_caps_from_string().
Discard all but the first structure from caps. Useful when fixating.
Unref a GstCaps and and free all its structures and the structures' values when the refcount reaches 0.
Converts caps from a string representation.
Creates a new GstCaps that indicates that it is compatible with any media format.
Modifies a pointer to a GstCaps to point to a different GstCaps. The modification is done atomically (so this is useful for ensuring thread safety in some cases), and the reference counts are updated appropriately (the old caps is unreffed, the new is reffed). Either ncaps or the GstCaps pointed to by ocaps may be NULL.
Clean up the cached caps contained in static_caps.
Converts a GstStaticCaps to a GstCaps.
Modifies a pointer to a GstCaps to point to a different GstCaps. This function is similar to gst_caps_replace() except that it takes ownership of new_caps.
the main Gtk struct
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_query_caps() 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 properties with ranges or lists. Use gst_caps_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.
Last reviewed on 2011-03-28 (0.11.3)