Copyright | Will Thompson and Iñaki García Etxebarria |
---|---|
License | LGPL-2.1 |
Maintainer | Iñaki García Etxebarria |
Safe Haskell | Safe-Inferred |
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)
- 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
- capsFeaturesNewSingle :: (HasCallStack, MonadIO m) => Text -> 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.
CapsFeatures (ManagedPtr CapsFeatures) |
Instances
Eq CapsFeatures Source # | |
Defined in GI.Gst.Structs.CapsFeatures (==) :: CapsFeatures -> CapsFeatures -> Bool # (/=) :: CapsFeatures -> CapsFeatures -> Bool # | |
GBoxed CapsFeatures Source # | |
Defined in GI.Gst.Structs.CapsFeatures | |
ManagedPtrNewtype CapsFeatures Source # | |
Defined in GI.Gst.Structs.CapsFeatures toManagedPtr :: CapsFeatures -> ManagedPtr CapsFeatures | |
TypedObject CapsFeatures Source # | |
Defined in GI.Gst.Structs.CapsFeatures | |
HasParentTypes CapsFeatures Source # | |
Defined in GI.Gst.Structs.CapsFeatures | |
IsGValue (Maybe CapsFeatures) Source # | Convert |
Defined in GI.Gst.Structs.CapsFeatures gvalueGType_ :: IO GType gvalueSet_ :: Ptr GValue -> Maybe CapsFeatures -> IO () gvalueGet_ :: Ptr GValue -> IO (Maybe CapsFeatures) | |
type ParentTypes CapsFeatures Source # | |
Defined in GI.Gst.Structs.CapsFeatures |
Methods
Click to display all available methods, including inherited ones
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: |
Checks if features
contains feature
.
Since: 1.2
containsId
capsFeaturesContainsId Source #
:: (HasCallStack, MonadIO m) | |
=> CapsFeatures |
|
-> Word32 |
|
-> m Bool | Returns: |
Checks if features
contains feature
.
Since: 1.2
copy
:: (HasCallStack, MonadIO m) | |
=> CapsFeatures |
|
-> m CapsFeatures | Returns: a new |
Duplicates a CapsFeatures
and all its values.
Since: 1.2
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 |
Creates a CapsFeatures
from a string representation.
Since: 1.2
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: |
Checks if features
is GST_CAPS_FEATURES_ANY
.
Since: 1.2
isEqual
:: (HasCallStack, MonadIO m) | |
=> CapsFeatures |
|
-> CapsFeatures |
|
-> m Bool | Returns: |
Checks 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.
Since: 1.2
newEmpty
:: (HasCallStack, MonadIO m) | |
=> m CapsFeatures | Returns: a new, empty |
Creates a new, empty CapsFeatures
.
Since: 1.2
newSingle
capsFeaturesNewSingle Source #
:: (HasCallStack, MonadIO m) | |
=> Text |
|
-> m CapsFeatures | Returns: a new |
Creates a new CapsFeatures
with a single feature.
Since: 1.20
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 design document.
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.
Since: 1.2