gi-gstpbutils-1.0.19: GStreamer Plugins Base Utils bindings

CopyrightWill Thompson Iñaki García Etxebarria and Jonas Platte
LicenseLGPL-2.1
MaintainerIñaki García Etxebarria (inaki@blueleaf.cc)
Safe HaskellNone
LanguageHaskell2010

GI.GstPbutils.Objects.EncodingTarget

Contents

Description

Collection of EncodingProfile for a specific target or use-case.

When being stored/loaded, targets come from a specific category, like ENCODING_CATEGORY_DEVICE.

Synopsis

Exported types

newtype EncodingTarget Source #

Memory-managed wrapper type.

Constructors

EncodingTarget (ManagedPtr EncodingTarget) 
Instances
GObject EncodingTarget Source # 
Instance details

Defined in GI.GstPbutils.Objects.EncodingTarget

Methods

gobjectType :: IO GType

HasParentTypes EncodingTarget Source # 
Instance details

Defined in GI.GstPbutils.Objects.EncodingTarget

type ParentTypes EncodingTarget Source # 
Instance details

Defined in GI.GstPbutils.Objects.EncodingTarget

type ParentTypes EncodingTarget = Object ': ([] :: [Type])

class (GObject o, IsDescendantOf EncodingTarget o) => IsEncodingTarget o Source #

Type class for types which can be safely cast to EncodingTarget, for instance with toEncodingTarget.

Instances
(GObject o, IsDescendantOf EncodingTarget o) => IsEncodingTarget o Source # 
Instance details

Defined in GI.GstPbutils.Objects.EncodingTarget

toEncodingTarget :: (MonadIO m, IsEncodingTarget o) => o -> m EncodingTarget Source #

Cast to EncodingTarget, for types for which this is known to be safe. For general casts, use castTo.

Methods

addProfile

encodingTargetAddProfile Source #

Arguments

:: (HasCallStack, MonadIO m, IsEncodingTarget a, IsEncodingProfile b) 
=> a

target: the EncodingTarget to add a profile to

-> b

profile: the EncodingProfile to add

-> m Bool

Returns: True if the profile was added, else False.

Adds the given profile to the target. Each added profile must have a unique name within the profile.

The target will steal a reference to the profile. If you wish to use the profile after calling this method, you should increase its reference count.

getCategory

encodingTargetGetCategory Source #

Arguments

:: (HasCallStack, MonadIO m, IsEncodingTarget a) 
=> a

target: a EncodingTarget

-> m Text

Returns: The category of the target. For example: ENCODING_CATEGORY_DEVICE.

No description available in the introspection data.

getDescription

encodingTargetGetDescription Source #

Arguments

:: (HasCallStack, MonadIO m, IsEncodingTarget a) 
=> a

target: a EncodingTarget

-> m Text

Returns: The description of the target.

No description available in the introspection data.

getName

encodingTargetGetName Source #

Arguments

:: (HasCallStack, MonadIO m, IsEncodingTarget a) 
=> a

target: a EncodingTarget

-> m Text

Returns: The name of the target.

No description available in the introspection data.

getProfile

encodingTargetGetProfile Source #

Arguments

:: (HasCallStack, MonadIO m, IsEncodingTarget a) 
=> a

target: a EncodingTarget

-> Text

name: the name of the profile to retrieve

-> m EncodingProfile

Returns: The matching EncodingProfile, or Nothing.

No description available in the introspection data.

getProfiles

encodingTargetGetProfiles Source #

Arguments

:: (HasCallStack, MonadIO m, IsEncodingTarget a) 
=> a

target: a EncodingTarget

-> m [EncodingProfile]

Returns: A list of EncodingProfile(s) this target handles.

No description available in the introspection data.

load

encodingTargetLoad Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Text

name: the name of the EncodingTarget to load (automatically converted to lower case internally as capital letters are not valid for target names).

-> Maybe Text

category: the name of the target category, like ENCODING_CATEGORY_DEVICE. Can be Nothing

-> m EncodingTarget

Returns: The EncodingTarget if available, else Nothing. (Can throw GError)

Searches for the EncodingTarget with the given name, loads it and returns it.

If the category name is specified only targets from that category will be searched for.

loadFromFile

encodingTargetLoadFromFile Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> [Char]

filepath: The file location to load the EncodingTarget from

-> m EncodingTarget

Returns: The EncodingTarget contained in the file, else Nothing (Can throw GError)

Opens the provided file and returns the contained EncodingTarget.

new

encodingTargetNew Source #

Arguments

:: (HasCallStack, MonadIO m, IsEncodingProfile a) 
=> Text

name: The name of the target.

-> Text

category: The name of the category to which this target belongs. For example: ENCODING_CATEGORY_DEVICE.

-> Text

description: A description of EncodingTarget in the current locale.

-> [a]

profiles: A List of EncodingProfile.

-> m EncodingTarget

Returns: The newly created EncodingTarget or Nothing if there was an error.

Creates a new EncodingTarget.

The name and category can only consist of lowercase ASCII letters for the first character, followed by either lowercase ASCII letters, digits or hyphens ('-').

The category <emphasis>should</emphasis> be one of the existing well-defined categories, like ENCODING_CATEGORY_DEVICE, but it <emphasis>can</emphasis> be a application or user specific category if needed.

save

encodingTargetSave Source #

Arguments

:: (HasCallStack, MonadIO m, IsEncodingTarget a) 
=> a

target: a EncodingTarget

-> m ()

(Can throw GError)

Saves the target to a default user-local directory.

saveToFile

encodingTargetSaveToFile Source #

Arguments

:: (HasCallStack, MonadIO m, IsEncodingTarget a) 
=> a

target: a EncodingTarget

-> [Char]

filepath: the location to store the target at.

-> m ()

(Can throw GError)

Saves the target to the provided file location.