Package ch.bailu.gtk.gst
Klasse Caps
java.lang.Object
ch.bailu.gtk.type.Type
ch.bailu.gtk.type.Pointer
ch.bailu.gtk.type.Record
ch.bailu.gtk.gst.Caps
- Alle implementierten Schnittstellen:
PointerInterface
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:
``` 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 #GstCaps is fixed when it has no fields 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.
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_to_string() or
gst_value_serialize() and their counterparts.
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:
``` 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 #GstCaps is fixed when it has no fields 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.
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_to_string() or
gst_value_serialize() and their counterparts.
https://gstreamer.freedesktop.org/documentation/gstreamer/gi-index.html
-
Verschachtelte Klassen - Übersicht
Verschachtelte KlassenModifizierer und TypKlasseBeschreibungstatic interface
static interface
static interface
-
Feldübersicht
FelderModifizierer und TypFeldBeschreibungstatic final String
the parent type
Private field: direct-type -
Konstruktorübersicht
Konstruktoren -
Methodenübersicht
Modifizierer und TypMethodeBeschreibungvoid
Appends the structures contained in @caps2 to @caps1.void
appendStructure
(Structure structure) Appends @structure to @caps.void
appendStructureFull
(Structure structure, CapsFeatures features) Appends @structure with @features to @caps.boolean
canIntersect
(Caps caps2) Tries intersecting @caps1 and @caps2 and reports whether the result would not
be emptycopy()
Creates a new #GstCaps as a copy of the old @caps.copyNth
(int nth) Creates a new #GstCaps and appends a copy of the nth structure
contained in @caps.void
filterAndMapInPlace
(Caps.OnCapsFilterMapFunc func, Pointer user_data) Calls the provided function once for each structure and caps feature in the
#GstCaps.fixate()
Modifies the given @caps into a representation with only fixed
values.boolean
foreach
(Caps.OnCapsForeachFunc func, Pointer user_data) Calls the provided function once for each structure and caps feature in the
#GstCaps.static Caps
fromString
(Str string) Converts @caps from a string representation.static ClassHandler
getFeatures
(int index) Finds the features in @caps at @index, and returns it.static int
static long
static TypeSystem.TypeSize
int
getSize()
Gets the number of structures contained in @caps.getStructure
(int index) Finds the structure in @caps at @index, and returns it.static long
static TypeSystem.TypeSize
void
idStrSetSimple
(IdStr field, Object... _ellipsis) Sets fields in a #GstCaps.void
idStrSetValue
(IdStr field, Value value) Sets the given @field on all structures of @caps to the given @value.Creates a new #GstCaps that contains all the formats that are common
to both @caps1 and @caps2.intersectFull
(Caps caps2, int 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.boolean
isAlwaysCompatible
(Caps caps2) A given #GstCaps structure is always compatible with another if
every media format that is in the first is also contained in the
second.boolean
isAny()
Determines if @caps represents any media format.boolean
isEmpty()
Determines if @caps represents no media formats.boolean
Checks if the given caps represent the same set of caps.boolean
isEqualFixed
(Caps caps2) Tests if two #GstCaps are equal.boolean
isFixed()
Fixed #GstCaps describe exactly one format, that is, they have exactly
one structure, and each field in the structure describes a fixed type.boolean
isStrictlyEqual
(Caps caps2) Checks if the given caps are exactly the same set of caps.boolean
Checks if all caps represented by @subset are also represented by @superset.boolean
isSubsetStructure
(Structure structure) Checks if @structure is a subset of @caps.boolean
isSubsetStructureFull
(Structure structure, CapsFeatures features) Checks if @structure is a subset of @caps.boolean
mapInPlace
(Caps.OnCapsMapFunc func, Pointer user_data) Calls the provided function once for each structure and caps feature in the
#GstCaps.Appends the structures contained in @caps2 to @caps1 if they are not yet
expressed by @caps1.mergeStructure
(Structure structure) Appends @structure to @caps if it is not already expressed by @caps.mergeStructureFull
(Structure structure, CapsFeatures features) Appends @structure with @features to @caps if its not already expressed by @caps.static Caps
Creates a new #GstCaps that indicates that it is compatible with
any media format.static Caps
Creates a new #GstCaps that is empty.static Caps
newEmptySimpleCaps
(Str media_type) Creates a new #GstCaps that contains one #GstStructure with name
@media_type.static Caps
newEmptySimpleCaps
(String media_type) Creates a new #GstCaps that contains one #GstStructure with name
@media_type.static Caps
newFullCaps
(Structure struct1, Object... _ellipsis) Creates a new #GstCaps and adds all the structures listed as
arguments.static Caps
newIdStrEmptySimpleCaps
(IdStr media_type) Creates a new #GstCaps that contains one #GstStructure with name
@media_type.static Caps
newIdStrSimpleCaps
(IdStr media_type, IdStr fieldname, Object... _ellipsis) Creates a new #GstCaps that contains one #GstStructure.static Caps
newSimpleCaps
(Str media_type, Str fieldname, Object... _ellipsis) Creates a new #GstCaps that contains one #GstStructure.static Caps
newSimpleCaps
(String media_type, String fieldname, Object... _ellipsis) Creates a new #GstCaps that contains one #GstStructure.static Caps
newStaticStrEmptySimpleCaps
(Str media_type) Creates a new #GstCaps that contains one #GstStructure with name
@media_type.static Caps
newStaticStrEmptySimpleCaps
(String media_type) Creates a new #GstCaps that contains one #GstStructure with name
@media_type.static Caps
newStaticStrSimpleCaps
(Str media_type, Str fieldname, Object... _ellipsis) Creates a new #GstCaps that contains one #GstStructure.static Caps
newStaticStrSimpleCaps
(String media_type, String fieldname, Object... _ellipsis) Creates a new #GstCaps that contains one #GstStructure.Returns a #GstCaps that represents the same set of formats as
@caps, but contains no lists.void
removeStructure
(int idx) Removes the structure with the given index from the list of structures
contained in @caps.serialize
(int flags) Converts @caps to a string representation.void
setFeatures
(int index, CapsFeatures features) Sets the @features for the structure at @index.void
setFeaturesSimple
(CapsFeatures features) Sets the @features for all the structures of @caps.void
Sets fields in a #GstCaps.void
Sets fields in a #GstCaps.void
setSimpleStaticStr
(Str field, Object... _ellipsis) Sets fields in a #GstCaps.void
setSimpleStaticStr
(String field, Object... _ellipsis) Sets fields in a #GstCaps.void
Sets the given @field on all structures of @caps to the given @value.void
Sets the given @field on all structures of @caps to the given @value.void
setValueStaticStr
(Str field, Value value) Sets the given @field on all structures of @caps to the given @value.void
setValueStaticStr
(String field, Value value) Sets the given @field on all structures of @caps to the given @value.simplify()
Converts the given @caps into a representation that represents the
same set of formats, but in a simpler form.stealStructure
(int index) Retrieves the structure with the given index from the list of structures
contained in @caps.Subtracts the @subtrahend from the @minuend.toStr()
Converts @caps to a string representation.truncate()
Discards all but the first structure from @caps.Von Klasse geerbte Methoden ch.bailu.gtk.type.Pointer
asCPointer, cast, connectSignal, disconnectSignals, disconnectSignals, equals, hashCode, throwIfNull, throwNullPointerException, toString, unregisterCallbacks, unregisterCallbacks
Von Klasse geerbte Methoden ch.bailu.gtk.type.Type
asCPointer, asCPointer, asCPointerNotNull, asJnaPointer, asJnaPointer, asPointer, asPointer, cast, cast, throwIfNull
Von Klasse geerbte Methoden java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Von Schnittstelle geerbte Methoden ch.bailu.gtk.type.PointerInterface
asCPointerNotNull, asJnaPointer, asPointer, isNotNull, isNull
-
Felddetails
-
MINI_OBJECT
the parent type
Private field: direct-type- Siehe auch:
-
-
Konstruktordetails
-
Caps
-
Caps
public Caps()
-
-
Methodendetails
-
getClassHandler
-
newAnyCaps
Creates a new #GstCaps that indicates that it is compatible with
any media format.- Gibt zurück:
- the new #GstCaps
-
newEmptyCaps
Creates a new #GstCaps that is empty. That is, the returned
#GstCaps contains no media formats.
The #GstCaps is guaranteed to be writable.- Gibt zurück:
- the new #GstCaps
-
newEmptySimpleCaps
Creates a new #GstCaps that contains one #GstStructure with name
@media_type.- Parameter:
media_type
- the media type of the structure- Gibt zurück:
- the new #GstCaps
-
newEmptySimpleCaps
Creates a new #GstCaps that contains one #GstStructure with name
@media_type.- Parameter:
media_type
- the media type of the structure- Gibt zurück:
- the new #GstCaps
-
newFullCaps
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.- Parameter:
struct1
- the first structure to add_ellipsis
- additional structures to add- Gibt zurück:
- the new #GstCaps
-
newIdStrEmptySimpleCaps
Creates a new #GstCaps that contains one #GstStructure with name
@media_type.- Parameter:
media_type
- the media type of the structure- Gibt zurück:
- the new #GstCaps
-
newIdStrSimpleCaps
public static Caps newIdStrSimpleCaps(@Nonnull IdStr media_type, @Nonnull IdStr fieldname, Object... _ellipsis) Creates a new #GstCaps that contains one #GstStructure. The
structure is defined by the arguments, which have the same format
as gst_structure_new().- Parameter:
media_type
- the media type of the structurefieldname
- first field to set_ellipsis
- additional arguments- Gibt zurück:
- the new #GstCaps
-
newSimpleCaps
public static Caps newSimpleCaps(@Nonnull Str media_type, @Nonnull Str fieldname, Object... _ellipsis) Creates a new #GstCaps that contains one #GstStructure. The
structure is defined by the arguments, which have the same format
as gst_structure_new().- Parameter:
media_type
- the media type of the structurefieldname
- first field to set_ellipsis
- additional arguments- Gibt zurück:
- the new #GstCaps
-
newSimpleCaps
Creates a new #GstCaps that contains one #GstStructure. The
structure is defined by the arguments, which have the same format
as gst_structure_new().- Parameter:
media_type
- the media type of the structurefieldname
- first field to set_ellipsis
- additional arguments- Gibt zurück:
- the new #GstCaps
-
newStaticStrEmptySimpleCaps
Creates a new #GstCaps that contains one #GstStructure with name
@media_type.
@media_type needs to be valid for the remaining lifetime of the process, e.g.
has to be a static string.- Parameter:
media_type
- the media type of the structure- Gibt zurück:
- the new #GstCaps
-
newStaticStrEmptySimpleCaps
Creates a new #GstCaps that contains one #GstStructure with name
@media_type.
@media_type needs to be valid for the remaining lifetime of the process, e.g.
has to be a static string.- Parameter:
media_type
- the media type of the structure- Gibt zurück:
- the new #GstCaps
-
newStaticStrSimpleCaps
public static Caps newStaticStrSimpleCaps(@Nonnull Str media_type, @Nonnull Str fieldname, Object... _ellipsis) Creates a new #GstCaps that contains one #GstStructure. The
structure is defined by the arguments, which have the same format
as gst_structure_new().
@media_type, @fieldname and all other fieldnames need to be valid for the
remaining lifetime of the process, e.g. have to be static strings.- Parameter:
media_type
- the media type of the structurefieldname
- first field to set_ellipsis
- additional arguments- Gibt zurück:
- the new #GstCaps
-
newStaticStrSimpleCaps
Creates a new #GstCaps that contains one #GstStructure. The
structure is defined by the arguments, which have the same format
as gst_structure_new().
@media_type, @fieldname and all other fieldnames need to be valid for the
remaining lifetime of the process, e.g. have to be static strings.- Parameter:
media_type
- the media type of the structurefieldname
- first field to set_ellipsis
- additional arguments- Gibt zurück:
- the new #GstCaps
-
append
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.- Parameter:
caps2
- the #GstCaps to append
-
appendStructure
Appends @structure to @caps. The structure is not copied; @caps
becomes the owner of @structure.- Parameter:
structure
- the #GstStructure to append
-
appendStructureFull
Appends @structure with @features to @caps. The structure is not copied; @caps
becomes the owner of @structure.- Parameter:
structure
- the #GstStructure to appendfeatures
- the #GstCapsFeatures to append
-
canIntersect
Tries intersecting @caps1 and @caps2 and reports whether the result would not
be empty- Parameter:
caps2
- a #GstCaps to intersect- Gibt zurück:
- %TRUE if intersection would be not empty
-
copy
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().- Gibt zurück:
- the new #GstCaps
-
copyNth
Creates a new #GstCaps and appends a copy of the nth structure
contained in @caps.- Parameter:
nth
- the nth structure to copy- Gibt zurück:
- the new #GstCaps
-
filterAndMapInPlace
Calls the provided function once for each structure and caps feature in the
#GstCaps. In contrast to gst_caps_foreach(), the function may modify the
structure and features. In contrast to gst_caps_map_in_place(), the structure
and features are removed from the caps if %FALSE is returned from the
function. The caps must be mutable.- Parameter:
func
- a function to call for each fielduser_data
- private data
-
fixate
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().
This function takes ownership of @caps and will call gst_caps_make_writable()
on it so you must not use @caps afterwards unless you keep an additional
reference to it with gst_caps_ref().
Note that it is not guaranteed that the returned caps have exactly one
structure. If @caps are empty caps then the returned caps will be
the empty too and contain no structure at all.
Calling this function with ANY caps is not allowed.- Gibt zurück:
- the fixated caps
-
foreach
Calls the provided function once for each structure and caps feature in the
#GstCaps. The function must not modify the fields.
Also see gst_caps_map_in_place() and gst_caps_filter_and_map_in_place().- Parameter:
func
- a function to call for each fielduser_data
- private data- Gibt zurück:
- %TRUE if the supplied function returns %TRUE for each call, %FALSE otherwise.
-
getFeatures
Finds the features in @caps at @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 features 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().- Parameter:
index
- the index of the structure- Gibt zurück:
- a pointer to the #GstCapsFeatures corresponding to @index
-
getSize
public int getSize()Gets the number of structures contained in @caps.- Gibt zurück:
- the number of structures that @caps contains
-
getStructure
Finds the structure in @caps at @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().- Parameter:
index
- the index of the structure- Gibt zurück:
- a pointer to the #GstStructure corresponding to @index
-
idStrSetSimple
Sets fields in a #GstCaps. The arguments must be passed in the same
manner as gst_structure_id_str_set(), and be %NULL-terminated.- Parameter:
field
- first field to set_ellipsis
- additional parameters
-
idStrSetValue
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.- Parameter:
field
- name of the field to setvalue
- value to set the field to
-
intersect
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.- Parameter:
caps2
- a #GstCaps to intersect- Gibt zurück:
- the new #GstCaps
-
intersectFull
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.- Parameter:
caps2
- a #GstCaps to intersectmode
- The intersection algorithm/mode to use- Gibt zurück:
- the new #GstCaps
-
isAlwaysCompatible
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.- Parameter:
caps2
- the #GstCaps to test- Gibt zurück:
- %TRUE if @caps1 is a subset of @caps2.
-
isAny
public boolean isAny()Determines if @caps represents any media format.- Gibt zurück:
- %TRUE if @caps represents any format.
-
isEmpty
public boolean isEmpty()Determines if @caps represents no media formats.- Gibt zurück:
- %TRUE if @caps represents no formats.
-
isEqual
Checks if the given caps represent the same set of caps.- Parameter:
caps2
- another #GstCaps- Gibt zurück:
- %TRUE if both caps are equal.
-
isEqualFixed
Tests if two #GstCaps are equal. This function only works on fixed
#GstCaps.- Parameter:
caps2
- the #GstCaps to test- Gibt zurück:
- %TRUE if the arguments represent the same format
-
isFixed
public boolean isFixed()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.- Gibt zurück:
- %TRUE if @caps is fixed
-
isStrictlyEqual
Checks if the given caps are exactly the same set of caps.- Parameter:
caps2
- another #GstCaps- Gibt zurück:
- %TRUE if both caps are strictly equal.
-
isSubset
Checks if all caps represented by @subset are also represented by @superset.- Parameter:
superset
- a potentially greater #GstCaps- Gibt zurück:
- %TRUE if @subset is a subset of @superset
-
isSubsetStructure
Checks if @structure is a subset of @caps. See gst_caps_is_subset()
for more information.- Parameter:
structure
- a potential #GstStructure subset of @caps- Gibt zurück:
- %TRUE if @structure is a subset of @caps
-
isSubsetStructureFull
Checks if @structure is a subset of @caps. See gst_caps_is_subset()
for more information.- Parameter:
structure
- a potential #GstStructure subset of @capsfeatures
- a #GstCapsFeatures for @structure- Gibt zurück:
- %TRUE if @structure is a subset of @caps
-
mapInPlace
Calls the provided function once for each structure and caps feature in the
#GstCaps. In contrast to gst_caps_foreach(), the function may modify but not
delete the structures and features. The caps must be mutable.- Parameter:
func
- a function to call for each fielduser_data
- private data- Gibt zurück:
- %TRUE if the supplied function returns %TRUE for each call, %FALSE otherwise.
-
merge
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.- Parameter:
caps2
- the #GstCaps to merge in- Gibt zurück:
- the merged caps.
-
mergeStructure
Appends @structure to @caps if it is not already expressed by @caps.- Parameter:
structure
- the #GstStructure to merge- Gibt zurück:
- the merged caps.
-
mergeStructureFull
Appends @structure with @features to @caps if its not already expressed by @caps.- Parameter:
structure
- the #GstStructure to mergefeatures
- the #GstCapsFeatures to merge- Gibt zurück:
- the merged caps.
-
normalize
Returns a #GstCaps that represents the same set of formats as
@caps, but contains no lists. Each list is expanded into separate
#GstStructure.
This function takes ownership of @caps and will call gst_caps_make_writable()
on it so you must not use @caps afterwards unless you keep an additional
reference to it with gst_caps_ref().- Gibt zurück:
- the normalized #GstCaps
-
removeStructure
public void removeStructure(int idx) Removes the structure with the given index from the list of structures
contained in @caps.- Parameter:
idx
- Index of the structure to remove
-
serialize
Converts @caps to a string representation. This string representation can be
converted back to a #GstCaps by gst_caps_from_string().
This prints the caps in human readable form.
This version of the caps serialization function introduces support for nested
structures and caps but the resulting strings won't be parsable with
GStreamer prior to 1.20 unless #GST_SERIALIZE_FLAG_BACKWARD_COMPAT is passed
as @flag.- Parameter:
flags
- a #GstSerializeFlags- Gibt zurück:
- a newly allocated string representing @caps.
-
setFeatures
Sets the @features for the structure at @index.- Parameter:
index
- the index of the structurefeatures
- the #GstCapsFeatures to set
-
setFeaturesSimple
Sets the @features for all the structures of @caps.- Parameter:
features
- the #GstCapsFeatures to set
-
setSimple
Sets fields in a #GstCaps. The arguments must be passed in the same
manner as gst_structure_set(), and be %NULL-terminated.- Parameter:
field
- first field to set_ellipsis
- additional parameters
-
setSimple
Sets fields in a #GstCaps. The arguments must be passed in the same
manner as gst_structure_set(), and be %NULL-terminated.- Parameter:
field
- first field to set_ellipsis
- additional parameters
-
setSimpleStaticStr
Sets fields in a #GstCaps. The arguments must be passed in the same
manner as gst_structure_set(), and be %NULL-terminated.
@field and all other field names need to be valid for the remaining lifetime
of the process, e.g. have to be static strings.- Parameter:
field
- first field to set_ellipsis
- additional parameters
-
setSimpleStaticStr
Sets fields in a #GstCaps. The arguments must be passed in the same
manner as gst_structure_set(), and be %NULL-terminated.
@field and all other field names need to be valid for the remaining lifetime
of the process, e.g. have to be static strings.- Parameter:
field
- first field to set_ellipsis
- additional parameters
-
setValue
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.- Parameter:
field
- name of the field to setvalue
- value to set the field to
-
setValue
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.- Parameter:
field
- name of the field to setvalue
- value to set the field to
-
setValueStaticStr
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.
@field needs to be valid for the remaining lifetime of the process, e.g.
has to be a static string.- Parameter:
field
- name of the field to setvalue
- value to set the field to
-
setValueStaticStr
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.
@field needs to be valid for the remaining lifetime of the process, e.g.
has to be a static string.- Parameter:
field
- name of the field to setvalue
- value to set the field to
-
simplify
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 function takes ownership of @caps and will call gst_caps_make_writable()
on it if necessary, so you must not use @caps afterwards unless you keep an
additional reference to it with gst_caps_ref().
This method does not preserve the original order of @caps.- Gibt zurück:
- The simplified caps.
-
stealStructure
Retrieves the structure with the given index from the list of structures
contained in @caps. The caller becomes the owner of the returned structure.- Parameter:
index
- Index of the structure to retrieve- Gibt zurück:
- a pointer to the #GstStructure corresponding to @index.
-
subtract
Subtracts the @subtrahend from the @minuend.
> This function does not work reliably if optional properties for caps
> are included on one caps and omitted on the other.- Parameter:
subtrahend
- #GstCaps to subtract- Gibt zurück:
- the resulting caps
-
toStr
Converts @caps to a string representation. This string representation
can be converted back to a #GstCaps by gst_caps_from_string().
For debugging purposes its easier to do something like this:
``` C
GST_LOG ("caps are %" GST_PTR_FORMAT, caps);
```
This prints the caps in human readable form.
The implementation of serialization up to 1.20 would lead to unexpected results
when there were nested #GstCaps / #GstStructure deeper than one level.- Gibt zurück:
- a newly allocated string representing @caps.
-
truncate
Discards all but the first structure from @caps. Useful when
fixating.
This function takes ownership of @caps and will call gst_caps_make_writable()
on it if necessary, so you must not use @caps afterwards unless you keep an
additional reference to it with gst_caps_ref().
Note that it is not guaranteed that the returned caps have exactly one
structure. If @caps is any or empty caps then the returned caps will be
the same and contain no structure at all.- Gibt zurück:
- truncated caps
-
fromString
Converts @caps from a string representation.
The implementation of serialization up to 1.20 would lead to unexpected results
when there were nested #GstCaps / #GstStructure deeper than one level.- Parameter:
string
- a string to convert to #GstCaps- Gibt zurück:
- a newly allocated #GstCaps
-
getTypeID
public static long getTypeID() -
getParentTypeID
public static long getParentTypeID() -
getTypeSize
-
getParentTypeSize
-
getInstanceSize
public static int getInstanceSize()
-