Copyright | Will Thompson Iñaki García Etxebarria and Jonas Platte |
---|---|
License | LGPL-2.1 |
Maintainer | Iñaki García Etxebarria (inaki@blueleaf.cc) |
Safe Haskell | None |
Language | Haskell2010 |
CapsFeatures
can optionally be set on a Caps
to add requirements
for additional features for a specific Structure
. Caps structures with
the same name but with a non-equal set of caps features are not compatible.
If a pad supports multiple sets of features it has to add multiple equal
structures with different feature sets to the caps.
Empty CapsFeatures
are equivalent with the CapsFeatures
that only
contain CAPS_FEATURE_MEMORY_SYSTEM_MEMORY
. ANY CapsFeatures
as
created by capsFeaturesNewAny
are equal to any other CapsFeatures
and can be used to specify that any CapsFeatures
would be supported, e.g.
for elements that don't touch buffer memory. Caps
with ANY CapsFeatures
are considered non-fixed and during negotiation some CapsFeatures
have
to be selected.
Examples for caps features would be the requirement of a specific Memory
types or the requirement of having a specific Meta
on the buffer. Features
are given as a string of the format "memory:GstMemoryTypeName" or
"meta:GstMetaAPIName".
Since: 1.2
Synopsis
- newtype CapsFeatures = CapsFeatures (ManagedPtr CapsFeatures)
- noCapsFeatures :: Maybe CapsFeatures
- capsFeaturesAdd :: (HasCallStack, MonadIO m) => CapsFeatures -> Text -> m ()
- capsFeaturesAddId :: (HasCallStack, MonadIO m) => CapsFeatures -> Word32 -> m ()
- capsFeaturesContains :: (HasCallStack, MonadIO m) => CapsFeatures -> Text -> m Bool
- capsFeaturesContainsId :: (HasCallStack, MonadIO m) => CapsFeatures -> Word32 -> m Bool
- capsFeaturesCopy :: (HasCallStack, MonadIO m) => CapsFeatures -> m CapsFeatures
- capsFeaturesFree :: (HasCallStack, MonadIO m) => CapsFeatures -> m ()
- capsFeaturesFromString :: (HasCallStack, MonadIO m) => Text -> m (Maybe CapsFeatures)
- capsFeaturesGetNth :: (HasCallStack, MonadIO m) => CapsFeatures -> Word32 -> m (Maybe Text)
- capsFeaturesGetNthId :: (HasCallStack, MonadIO m) => CapsFeatures -> Word32 -> m Word32
- capsFeaturesGetSize :: (HasCallStack, MonadIO m) => CapsFeatures -> m Word32
- capsFeaturesIsAny :: (HasCallStack, MonadIO m) => CapsFeatures -> m Bool
- capsFeaturesIsEqual :: (HasCallStack, MonadIO m) => CapsFeatures -> CapsFeatures -> m Bool
- capsFeaturesNewAny :: (HasCallStack, MonadIO m) => m CapsFeatures
- capsFeaturesNewEmpty :: (HasCallStack, MonadIO m) => m CapsFeatures
- capsFeaturesRemove :: (HasCallStack, MonadIO m) => CapsFeatures -> Text -> m ()
- capsFeaturesRemoveId :: (HasCallStack, MonadIO m) => CapsFeatures -> Word32 -> m ()
- capsFeaturesSetParentRefcount :: (HasCallStack, MonadIO m) => CapsFeatures -> Int32 -> m Bool
- capsFeaturesToString :: (HasCallStack, MonadIO m) => CapsFeatures -> m Text
Exported types
newtype CapsFeatures Source #
Memory-managed wrapper type.
Instances
BoxedObject CapsFeatures Source # | |
Defined in GI.Gst.Structs.CapsFeatures boxedType :: CapsFeatures -> IO GType # |
noCapsFeatures :: Maybe CapsFeatures Source #
A convenience alias for Nothing
:: Maybe
CapsFeatures
.
Methods
add
:: (HasCallStack, MonadIO m) | |
=> CapsFeatures |
|
-> Text |
|
-> m () |
Adds feature
to features
.
Since: 1.2
addId
:: (HasCallStack, MonadIO m) | |
=> CapsFeatures |
|
-> Word32 |
|
-> m () |
Adds feature
to features
.
Since: 1.2
contains
:: (HasCallStack, MonadIO m) | |
=> CapsFeatures |
|
-> Text |
|
-> m Bool | Returns: |
Check if features
contains feature
.
Since: 1.2
containsId
capsFeaturesContainsId Source #
:: (HasCallStack, MonadIO m) | |
=> CapsFeatures |
|
-> Word32 |
|
-> m Bool | Returns: |
Check if features
contains feature
.
Since: 1.2
copy
:: (HasCallStack, MonadIO m) | |
=> CapsFeatures |
|
-> m CapsFeatures | Returns: a new |
free
:: (HasCallStack, MonadIO m) | |
=> CapsFeatures |
|
-> m () |
Frees a CapsFeatures
and all its values. The caps features must not
have a parent when this function is called.
Since: 1.2
fromString
capsFeaturesFromString Source #
:: (HasCallStack, MonadIO m) | |
=> Text |
|
-> m (Maybe CapsFeatures) | Returns: a new |
getNth
:: (HasCallStack, MonadIO m) | |
=> CapsFeatures |
|
-> Word32 |
|
-> m (Maybe Text) | Returns: The |
Returns the i
-th feature of features
.
Since: 1.2
getNthId
:: (HasCallStack, MonadIO m) | |
=> CapsFeatures |
|
-> Word32 |
|
-> m Word32 | Returns: The |
Returns the i
-th feature of features
.
Since: 1.2
getSize
:: (HasCallStack, MonadIO m) | |
=> CapsFeatures |
|
-> m Word32 | Returns: The number of features in |
Returns the number of features in features
.
Since: 1.2
isAny
:: (HasCallStack, MonadIO m) | |
=> CapsFeatures |
|
-> m Bool | Returns: |
Check if features
is GST_CAPS_FEATURES_ANY
.
Since: 1.2
isEqual
:: (HasCallStack, MonadIO m) | |
=> CapsFeatures |
|
-> CapsFeatures |
|
-> m Bool | Returns: |
Check if features1
and features2
are equal.
Since: 1.2
newAny
:: (HasCallStack, MonadIO m) | |
=> m CapsFeatures | Returns: a new, ANY |
Creates a new, ANY CapsFeatures
. This will be equal
to any other CapsFeatures
but caps with these are
unfixed.
Free-function: gst_caps_features_free
Since: 1.2
newEmpty
:: (HasCallStack, MonadIO m) | |
=> m CapsFeatures | Returns: a new, empty |
remove
:: (HasCallStack, MonadIO m) | |
=> CapsFeatures |
|
-> Text |
|
-> m () |
Removes feature
from features
.
Since: 1.2
removeId
:: (HasCallStack, MonadIO m) | |
=> CapsFeatures |
|
-> Word32 |
|
-> m () |
Removes feature
from features
.
Since: 1.2
setParentRefcount
capsFeaturesSetParentRefcount Source #
:: (HasCallStack, MonadIO m) | |
=> CapsFeatures |
|
-> Int32 |
|
-> m Bool | Returns: |
Sets the parent_refcount field of CapsFeatures
. This field is used to
determine whether a caps features is mutable or not. This function should only be
called by code implementing parent objects of CapsFeatures
, as described in
the MT Refcounting section of the design documents.
Since: 1.2
toString
:: (HasCallStack, MonadIO m) | |
=> CapsFeatures |
|
-> m Text | Returns: a pointer to string allocated by |
Converts features
to a human-readable string representation.
For debugging purposes its easier to do something like this:
C code
GST_LOG ("features is %" GST_PTR_FORMAT, features);
This prints the features in human readable form.
Free-function: g_free
Since: 1.2