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 |
This is a base class for anything that can be added to a Plugin
.
Synopsis
- newtype PluginFeature = PluginFeature (ManagedPtr PluginFeature)
- class (GObject o, IsDescendantOf PluginFeature o) => IsPluginFeature o
- toPluginFeature :: (MonadIO m, IsPluginFeature o) => o -> m PluginFeature
- noPluginFeature :: Maybe PluginFeature
- pluginFeatureCheckVersion :: (HasCallStack, MonadIO m, IsPluginFeature a) => a -> Word32 -> Word32 -> Word32 -> m Bool
- pluginFeatureGetPlugin :: (HasCallStack, MonadIO m, IsPluginFeature a) => a -> m (Maybe Plugin)
- pluginFeatureGetPluginName :: (HasCallStack, MonadIO m, IsPluginFeature a) => a -> m (Maybe Text)
- pluginFeatureGetRank :: (HasCallStack, MonadIO m, IsPluginFeature a) => a -> m Word32
- pluginFeatureListCopy :: (HasCallStack, MonadIO m, IsPluginFeature a) => [a] -> m [PluginFeature]
- pluginFeatureListDebug :: (HasCallStack, MonadIO m, IsPluginFeature a) => [a] -> m ()
- pluginFeatureListFree :: (HasCallStack, MonadIO m, IsPluginFeature a) => [a] -> m ()
- pluginFeatureLoad :: (HasCallStack, MonadIO m, IsPluginFeature a) => a -> m (Maybe PluginFeature)
- pluginFeatureRankCompareFunc :: (HasCallStack, MonadIO m) => Ptr () -> Ptr () -> m Int32
- pluginFeatureSetRank :: (HasCallStack, MonadIO m, IsPluginFeature a) => a -> Word32 -> m ()
Exported types
newtype PluginFeature Source #
Memory-managed wrapper type.
Instances
GObject PluginFeature Source # | |
Defined in GI.Gst.Objects.PluginFeature gobjectType :: IO GType # | |
HasParentTypes PluginFeature Source # | |
Defined in GI.Gst.Objects.PluginFeature | |
type ParentTypes PluginFeature Source # | |
Defined in GI.Gst.Objects.PluginFeature |
class (GObject o, IsDescendantOf PluginFeature o) => IsPluginFeature o Source #
Type class for types which can be safely cast to PluginFeature
, for instance with toPluginFeature
.
Instances
(GObject o, IsDescendantOf PluginFeature o) => IsPluginFeature o Source # | |
Defined in GI.Gst.Objects.PluginFeature |
toPluginFeature :: (MonadIO m, IsPluginFeature o) => o -> m PluginFeature Source #
Cast to PluginFeature
, for types for which this is known to be safe. For general casts, use castTo
.
noPluginFeature :: Maybe PluginFeature Source #
A convenience alias for Nothing
:: Maybe
PluginFeature
.
Methods
checkVersion
pluginFeatureCheckVersion Source #
:: (HasCallStack, MonadIO m, IsPluginFeature a) | |
=> a |
|
-> Word32 |
|
-> Word32 |
|
-> Word32 |
|
-> m Bool | Returns: |
Checks whether the given plugin feature is at least the required version
getPlugin
pluginFeatureGetPlugin Source #
:: (HasCallStack, MonadIO m, IsPluginFeature a) | |
=> a |
|
-> m (Maybe Plugin) | Returns: the plugin that provides this
feature, or |
Get the plugin that provides this feature.
getPluginName
pluginFeatureGetPluginName Source #
:: (HasCallStack, MonadIO m, IsPluginFeature a) | |
=> a |
|
-> m (Maybe Text) | Returns: the name of the plugin that provides this
feature, or |
Get the name of the plugin that provides this feature.
Since: 1.2
getRank
:: (HasCallStack, MonadIO m, IsPluginFeature a) | |
=> a |
|
-> m Word32 | Returns: The rank of the feature |
Gets the rank of a plugin feature.
listCopy
pluginFeatureListCopy Source #
:: (HasCallStack, MonadIO m, IsPluginFeature a) | |
=> [a] |
|
-> m [PluginFeature] | Returns: a copy of |
Copies the list of features. Caller should call gstPluginFeatureListFree
when done with the list.
listDebug
pluginFeatureListDebug Source #
:: (HasCallStack, MonadIO m, IsPluginFeature a) | |
=> [a] |
|
-> m () |
Debug the plugin feature names in list
.
listFree
pluginFeatureListFree Source #
:: (HasCallStack, MonadIO m, IsPluginFeature a) | |
=> [a] |
|
-> m () |
Unrefs each member of list
, then frees the list.
load
:: (HasCallStack, MonadIO m, IsPluginFeature a) | |
=> a |
|
-> m (Maybe PluginFeature) | Returns: a reference to the loaded
feature, or |
Loads the plugin containing feature
if it's not already loaded. feature
is
unaffected; use the return value instead.
Normally this function is used like this:
C code
GstPluginFeature *loaded_feature; loaded_feature = gst_plugin_feature_load (feature); // presumably, we're no longer interested in the potentially-unloaded feature gst_object_unref (feature); feature = loaded_feature;
rankCompareFunc
pluginFeatureRankCompareFunc Source #
:: (HasCallStack, MonadIO m) | |
=> Ptr () |
|
-> Ptr () |
|
-> m Int32 | Returns: negative value if the rank of p1 > the rank of p2 or the ranks are equal but the name of p1 comes before the name of p2; zero if the rank and names are equal; positive value if the rank of p1 < the rank of p2 or the ranks are equal but the name of p2 comes before the name of p1 |
Compares the two given PluginFeature
instances. This function can be
used as a CompareFunc
when sorting by rank and then by name.
setRank
:: (HasCallStack, MonadIO m, IsPluginFeature a) | |
=> a |
|
-> Word32 |
|
-> m () |
Specifies a rank for a plugin feature, so that autoplugging uses the most appropriate feature.