gi-gst-1.0.19: GStreamer 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.Gst.Structs.TagList

Contents

Description

List of tags and values used to describe media metadata.

Strings in structures must be ASCII or UTF-8 encoded. Other encodings are not allowed. Strings must not be empty or Nothing.

Synopsis

Exported types

newtype TagList Source #

Memory-managed wrapper type.

Constructors

TagList (ManagedPtr TagList) 
Instances
BoxedObject TagList Source # 
Instance details

Defined in GI.Gst.Structs.TagList

Methods

boxedType :: TagList -> IO GType #

tag ~ AttrSet => Constructible TagList tag Source # 
Instance details

Defined in GI.Gst.Structs.TagList

Methods

new :: MonadIO m => (ManagedPtr TagList -> TagList) -> [AttrOp TagList tag] -> m TagList #

newZeroTagList :: MonadIO m => m TagList Source #

Construct a TagList struct initialized to zero.

noTagList :: Maybe TagList Source #

A convenience alias for Nothing :: Maybe TagList.

Methods

addValue

tagListAddValue Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> TagList

list: list to set tags in

-> TagMergeMode

mode: the mode to use

-> Text

tag: tag

-> GValue

value: GValue for this tag

-> m () 

Sets the GValue for a given tag using the specified mode.

copyValue

tagListCopyValue Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> TagList

list: list to get the tag from

-> Text

tag: tag to read out

-> m (Bool, GValue)

Returns: True, if a value was copied, False if the tag didn't exist in the given list.

Copies the contents for the given tag into the value, merging multiple values into one if multiple values are associated with the tag. You must valueUnset the value after use.

foreach

tagListForeach Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> TagList

list: list to iterate over

-> TagForeachFunc

func: function to be called for each tag

-> m () 

Calls the given function for each tag inside the tag list. Note that if there is no tag, the function won't be called at all.

getBoolean

tagListGetBoolean Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> TagList

list: a TagList to get the tag from

-> Text

tag: tag to read out

-> m (Bool, Bool)

Returns: True, if a value was copied, False if the tag didn't exist in the given list.

Copies the contents for the given tag into the value, merging multiple values into one if multiple values are associated with the tag.

getBooleanIndex

tagListGetBooleanIndex Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> TagList

list: a TagList to get the tag from

-> Text

tag: tag to read out

-> Word32

index: number of entry to read out

-> m (Bool, Bool)

Returns: True, if a value was copied, False if the tag didn't exist in the given list.

Gets the value that is at the given index for the given tag in the given list.

getDate

tagListGetDate Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> TagList

list: a TagList to get the tag from

-> Text

tag: tag to read out

-> m (Bool, Date)

Returns: True, if a date was copied, False if the tag didn't exist in the given list or if it was Nothing.

Copies the first date for the given tag in the taglist into the variable pointed to by value. Free the date with dateFree when it is no longer needed.

Free-function: g_date_free

getDateIndex

tagListGetDateIndex Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> TagList

list: a TagList to get the tag from

-> Text

tag: tag to read out

-> Word32

index: number of entry to read out

-> m (Bool, Date)

Returns: True, if a value was copied, False if the tag didn't exist in the given list or if it was Nothing.

Gets the date that is at the given index for the given tag in the given list and copies it into the variable pointed to by value. Free the date with dateFree when it is no longer needed.

Free-function: g_date_free

getDateTime

tagListGetDateTime Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> TagList

list: a TagList to get the tag from

-> Text

tag: tag to read out

-> m (Bool, DateTime)

Returns: True, if a datetime was copied, False if the tag didn't exist in the given list or if it was Nothing.

Copies the first datetime for the given tag in the taglist into the variable pointed to by value. Unref the date with dateTimeUnref when it is no longer needed.

Free-function: gst_date_time_unref

getDateTimeIndex

tagListGetDateTimeIndex Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> TagList

list: a TagList to get the tag from

-> Text

tag: tag to read out

-> Word32

index: number of entry to read out

-> m (Bool, DateTime)

Returns: True, if a value was copied, False if the tag didn't exist in the given list or if it was Nothing.

Gets the datetime that is at the given index for the given tag in the given list and copies it into the variable pointed to by value. Unref the datetime with dateTimeUnref when it is no longer needed.

Free-function: gst_date_time_unref

getDouble

tagListGetDouble Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> TagList

list: a TagList to get the tag from

-> Text

tag: tag to read out

-> m (Bool, Double)

Returns: True, if a value was copied, False if the tag didn't exist in the given list.

Copies the contents for the given tag into the value, merging multiple values into one if multiple values are associated with the tag.

getDoubleIndex

tagListGetDoubleIndex Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> TagList

list: a TagList to get the tag from

-> Text

tag: tag to read out

-> Word32

index: number of entry to read out

-> m (Bool, Double)

Returns: True, if a value was copied, False if the tag didn't exist in the given list.

Gets the value that is at the given index for the given tag in the given list.

getFloat

tagListGetFloat Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> TagList

list: a TagList to get the tag from

-> Text

tag: tag to read out

-> m (Bool, Float)

Returns: True, if a value was copied, False if the tag didn't exist in the given list.

Copies the contents for the given tag into the value, merging multiple values into one if multiple values are associated with the tag.

getFloatIndex

tagListGetFloatIndex Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> TagList

list: a TagList to get the tag from

-> Text

tag: tag to read out

-> Word32

index: number of entry to read out

-> m (Bool, Float)

Returns: True, if a value was copied, False if the tag didn't exist in the given list.

Gets the value that is at the given index for the given tag in the given list.

getInt

tagListGetInt Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> TagList

list: a TagList to get the tag from

-> Text

tag: tag to read out

-> m (Bool, Int32)

Returns: True, if a value was copied, False if the tag didn't exist in the given list.

Copies the contents for the given tag into the value, merging multiple values into one if multiple values are associated with the tag.

getInt64

tagListGetInt64 Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> TagList

list: a TagList to get the tag from

-> Text

tag: tag to read out

-> m (Bool, Int64)

Returns: True, if a value was copied, False if the tag didn't exist in the given list.

Copies the contents for the given tag into the value, merging multiple values into one if multiple values are associated with the tag.

getInt64Index

tagListGetInt64Index Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> TagList

list: a TagList to get the tag from

-> Text

tag: tag to read out

-> Word32

index: number of entry to read out

-> m (Bool, Int64)

Returns: True, if a value was copied, False if the tag didn't exist in the given list.

Gets the value that is at the given index for the given tag in the given list.

getIntIndex

tagListGetIntIndex Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> TagList

list: a TagList to get the tag from

-> Text

tag: tag to read out

-> Word32

index: number of entry to read out

-> m (Bool, Int32)

Returns: True, if a value was copied, False if the tag didn't exist in the given list.

Gets the value that is at the given index for the given tag in the given list.

getPointer

tagListGetPointer Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> TagList

list: a TagList to get the tag from

-> Text

tag: tag to read out

-> m (Bool, Ptr ())

Returns: True, if a value was copied, False if the tag didn't exist in the given list.

Copies the contents for the given tag into the value, merging multiple values into one if multiple values are associated with the tag.

getPointerIndex

tagListGetPointerIndex Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> TagList

list: a TagList to get the tag from

-> Text

tag: tag to read out

-> Word32

index: number of entry to read out

-> m (Bool, Ptr ())

Returns: True, if a value was copied, False if the tag didn't exist in the given list.

Gets the value that is at the given index for the given tag in the given list.

getSample

tagListGetSample Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> TagList

list: a TagList to get the tag from

-> Text

tag: tag to read out

-> m (Bool, Sample)

Returns: True, if a sample was returned, False if the tag didn't exist in the given list or if it was Nothing.

Copies the first sample for the given tag in the taglist into the variable pointed to by sample. Free the sample with gst_sample_unref() when it is no longer needed. You can retrieve the buffer from the sample using sampleGetBuffer and the associated caps (if any) with sampleGetCaps.

Free-function: gst_sample_unref

getSampleIndex

tagListGetSampleIndex Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> TagList

list: a TagList to get the tag from

-> Text

tag: tag to read out

-> Word32

index: number of entry to read out

-> m (Bool, Sample)

Returns: True, if a sample was copied, False if the tag didn't exist in the given list or if it was Nothing.

Gets the sample that is at the given index for the given tag in the given list and copies it into the variable pointed to by sample. Free the sample with gst_sample_unref() when it is no longer needed. You can retrieve the buffer from the sample using sampleGetBuffer and the associated caps (if any) with sampleGetCaps.

Free-function: gst_sample_unref

getScope

tagListGetScope Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> TagList

list: a TagList

-> m TagScope

Returns: The scope of list

Gets the scope of list.

getString

tagListGetString Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> TagList

list: a TagList to get the tag from

-> Text

tag: tag to read out

-> m (Bool, Text)

Returns: True, if a value was copied, False if the tag didn't exist in the given list.

Copies the contents for the given tag into the value, possibly merging multiple values into one if multiple values are associated with the tag.

Use gst_tag_list_get_string_index (list, tag, 0, value) if you want to retrieve the first string associated with this tag unmodified.

The resulting string in value will be in UTF-8 encoding and should be freed by the caller using g_free when no longer needed. The returned string is also guaranteed to be non-Nothing and non-empty.

Free-function: g_free

getStringIndex

tagListGetStringIndex Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> TagList

list: a TagList to get the tag from

-> Text

tag: tag to read out

-> Word32

index: number of entry to read out

-> m (Bool, Text)

Returns: True, if a value was copied, False if the tag didn't exist in the given list.

Gets the value that is at the given index for the given tag in the given list.

The resulting string in value will be in UTF-8 encoding and should be freed by the caller using g_free when no longer needed. The returned string is also guaranteed to be non-Nothing and non-empty.

Free-function: g_free

getTagSize

tagListGetTagSize Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> TagList

list: a taglist

-> Text

tag: the tag to query

-> m Word32

Returns: The number of tags stored

Checks how many value are stored in this tag list for the given tag.

getUint

tagListGetUint Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> TagList

list: a TagList to get the tag from

-> Text

tag: tag to read out

-> m (Bool, Word32)

Returns: True, if a value was copied, False if the tag didn't exist in the given list.

Copies the contents for the given tag into the value, merging multiple values into one if multiple values are associated with the tag.

getUint64

tagListGetUint64 Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> TagList

list: a TagList to get the tag from

-> Text

tag: tag to read out

-> m (Bool, Word64)

Returns: True, if a value was copied, False if the tag didn't exist in the given list.

Copies the contents for the given tag into the value, merging multiple values into one if multiple values are associated with the tag.

getUint64Index

tagListGetUint64Index Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> TagList

list: a TagList to get the tag from

-> Text

tag: tag to read out

-> Word32

index: number of entry to read out

-> m (Bool, Word64)

Returns: True, if a value was copied, False if the tag didn't exist in the given list.

Gets the value that is at the given index for the given tag in the given list.

getUintIndex

tagListGetUintIndex Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> TagList

list: a TagList to get the tag from

-> Text

tag: tag to read out

-> Word32

index: number of entry to read out

-> m (Bool, Word32)

Returns: True, if a value was copied, False if the tag didn't exist in the given list.

Gets the value that is at the given index for the given tag in the given list.

getValueIndex

tagListGetValueIndex Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> TagList

list: a TagList

-> Text

tag: tag to read out

-> Word32

index: number of entry to read out

-> m (Maybe GValue)

Returns: The GValue for the specified entry or Nothing if the tag wasn't available or the tag doesn't have as many entries

Gets the value that is at the given index for the given tag in the given list.

insert

tagListInsert Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> TagList

into: list to merge into

-> TagList

from: list to merge from

-> TagMergeMode

mode: the mode to use

-> m () 

Inserts the tags of the from list into the first list using the given mode.

isEmpty

tagListIsEmpty Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> TagList

list: A TagList.

-> m Bool

Returns: True if the taglist is empty, otherwise False.

Checks if the given taglist is empty.

isEqual

tagListIsEqual Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> TagList

list1: a TagList.

-> TagList

list2: a TagList.

-> m Bool

Returns: True if the taglists are equal, otherwise False

Checks if the two given taglists are equal.

merge

tagListMerge Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> TagList

list1: first list to merge

-> Maybe TagList

list2: second list to merge

-> TagMergeMode

mode: the mode to use

-> m (Maybe TagList)

Returns: the new list

Merges the two given lists into a new list. If one of the lists is Nothing, a copy of the other is returned. If both lists are Nothing, Nothing is returned.

Free-function: gst_tag_list_unref

nTags

tagListNTags Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> TagList

list: A TagList.

-> m Int32

Returns: The number of tags in list.

Get the number of tags in list.

newEmpty

tagListNewEmpty Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> m TagList

Returns: An empty tag list

Creates a new empty GstTagList.

Free-function: gst_tag_list_unref

newFromString

tagListNewFromString Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Text

str: a string created with tagListToString

-> m (Maybe TagList)

Returns: a new TagList, or Nothing in case of an error.

Deserializes a tag list.

nthTagName

tagListNthTagName Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> TagList

list: A TagList.

-> Word32

index: the index

-> m Text

Returns: The name of the tag at index.

Get the name of the tag in list at index.

peekStringIndex

tagListPeekStringIndex Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> TagList

list: a TagList to get the tag from

-> Text

tag: tag to read out

-> Word32

index: number of entry to read out

-> m (Bool, Text)

Returns: True, if a value was set, False if the tag didn't exist in the given list.

Peeks at the value that is at the given index for the given tag in the given list.

The resulting string in value will be in UTF-8 encoding and doesn't need to be freed by the caller. The returned string is also guaranteed to be non-Nothing and non-empty.

removeTag

tagListRemoveTag Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> TagList

list: list to remove tag from

-> Text

tag: tag to remove

-> m () 

Removes the given tag from the taglist.

setScope

tagListSetScope Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> TagList

list: a TagList

-> TagScope

scope: new scope for list

-> m () 

Sets the scope of list to scope. By default the scope of a taglist is stream scope.

toString

tagListToString Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> TagList

list: a TagList

-> m (Maybe Text)

Returns: a newly-allocated string, or Nothing in case of an error. The string must be freed with free when no longer needed.

Serializes a tag list to a string.

Properties

miniObject

the parent type

getTagListMiniObject :: MonadIO m => TagList -> m MiniObject Source #

Get the value of the “mini_object” field. When overloading is enabled, this is equivalent to

get tagList #miniObject