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 |
- Exported types
- Methods
- addValue
- copy
- copyValue
- foreach
- getBoolean
- getBooleanIndex
- getDate
- getDateIndex
- getDateTime
- getDateTimeIndex
- getDouble
- getDoubleIndex
- getFloat
- getFloatIndex
- getInt
- getInt64
- getInt64Index
- getIntIndex
- getPointer
- getPointerIndex
- getSample
- getSampleIndex
- getScope
- getString
- getStringIndex
- getTagSize
- getUint
- getUint64
- getUint64Index
- getUintIndex
- getValueIndex
- insert
- isEmpty
- isEqual
- merge
- nTags
- newEmpty
- newFromString
- nthTagName
- peekStringIndex
- removeTag
- setScope
- toString
- Properties
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
- newtype TagList = TagList (ManagedPtr TagList)
- newZeroTagList :: MonadIO m => m TagList
- tagListAddValue :: (HasCallStack, MonadIO m) => TagList -> TagMergeMode -> Text -> GValue -> m ()
- tagListCopy :: (HasCallStack, MonadIO m) => TagList -> m TagList
- tagListCopyValue :: (HasCallStack, MonadIO m) => TagList -> Text -> m (Bool, GValue)
- tagListForeach :: (HasCallStack, MonadIO m) => TagList -> TagForeachFunc -> m ()
- tagListGetBoolean :: (HasCallStack, MonadIO m) => TagList -> Text -> m (Bool, Bool)
- tagListGetBooleanIndex :: (HasCallStack, MonadIO m) => TagList -> Text -> Word32 -> m (Bool, Bool)
- tagListGetDate :: (HasCallStack, MonadIO m) => TagList -> Text -> m (Bool, Date)
- tagListGetDateIndex :: (HasCallStack, MonadIO m) => TagList -> Text -> Word32 -> m (Bool, Date)
- tagListGetDateTime :: (HasCallStack, MonadIO m) => TagList -> Text -> m (Bool, DateTime)
- tagListGetDateTimeIndex :: (HasCallStack, MonadIO m) => TagList -> Text -> Word32 -> m (Bool, DateTime)
- tagListGetDouble :: (HasCallStack, MonadIO m) => TagList -> Text -> m (Bool, Double)
- tagListGetDoubleIndex :: (HasCallStack, MonadIO m) => TagList -> Text -> Word32 -> m (Bool, Double)
- tagListGetFloat :: (HasCallStack, MonadIO m) => TagList -> Text -> m (Bool, Float)
- tagListGetFloatIndex :: (HasCallStack, MonadIO m) => TagList -> Text -> Word32 -> m (Bool, Float)
- tagListGetInt :: (HasCallStack, MonadIO m) => TagList -> Text -> m (Bool, Int32)
- tagListGetInt64 :: (HasCallStack, MonadIO m) => TagList -> Text -> m (Bool, Int64)
- tagListGetInt64Index :: (HasCallStack, MonadIO m) => TagList -> Text -> Word32 -> m (Bool, Int64)
- tagListGetIntIndex :: (HasCallStack, MonadIO m) => TagList -> Text -> Word32 -> m (Bool, Int32)
- tagListGetPointer :: (HasCallStack, MonadIO m) => TagList -> Text -> m (Bool, Ptr ())
- tagListGetPointerIndex :: (HasCallStack, MonadIO m) => TagList -> Text -> Word32 -> m (Bool, Ptr ())
- tagListGetSample :: (HasCallStack, MonadIO m) => TagList -> Text -> m (Bool, Sample)
- tagListGetSampleIndex :: (HasCallStack, MonadIO m) => TagList -> Text -> Word32 -> m (Bool, Sample)
- tagListGetScope :: (HasCallStack, MonadIO m) => TagList -> m TagScope
- tagListGetString :: (HasCallStack, MonadIO m) => TagList -> Text -> m (Bool, Text)
- tagListGetStringIndex :: (HasCallStack, MonadIO m) => TagList -> Text -> Word32 -> m (Bool, Text)
- tagListGetTagSize :: (HasCallStack, MonadIO m) => TagList -> Text -> m Word32
- tagListGetUint :: (HasCallStack, MonadIO m) => TagList -> Text -> m (Bool, Word32)
- tagListGetUint64 :: (HasCallStack, MonadIO m) => TagList -> Text -> m (Bool, Word64)
- tagListGetUint64Index :: (HasCallStack, MonadIO m) => TagList -> Text -> Word32 -> m (Bool, Word64)
- tagListGetUintIndex :: (HasCallStack, MonadIO m) => TagList -> Text -> Word32 -> m (Bool, Word32)
- tagListGetValueIndex :: (HasCallStack, MonadIO m) => TagList -> Text -> Word32 -> m (Maybe GValue)
- tagListInsert :: (HasCallStack, MonadIO m) => TagList -> TagList -> TagMergeMode -> m ()
- tagListIsEmpty :: (HasCallStack, MonadIO m) => TagList -> m Bool
- tagListIsEqual :: (HasCallStack, MonadIO m) => TagList -> TagList -> m Bool
- tagListMerge :: (HasCallStack, MonadIO m) => Maybe TagList -> Maybe TagList -> TagMergeMode -> m (Maybe TagList)
- tagListNTags :: (HasCallStack, MonadIO m) => TagList -> m Int32
- tagListNewEmpty :: (HasCallStack, MonadIO m) => m TagList
- tagListNewFromString :: (HasCallStack, MonadIO m) => Text -> m (Maybe TagList)
- tagListNthTagName :: (HasCallStack, MonadIO m) => TagList -> Word32 -> m Text
- tagListPeekStringIndex :: (HasCallStack, MonadIO m) => TagList -> Text -> Word32 -> m (Bool, Text)
- tagListRemoveTag :: (HasCallStack, MonadIO m) => TagList -> Text -> m ()
- tagListSetScope :: (HasCallStack, MonadIO m) => TagList -> TagScope -> m ()
- tagListToString :: (HasCallStack, MonadIO m) => TagList -> m (Maybe Text)
- getTagListMiniObject :: MonadIO m => TagList -> m MiniObject
Exported types
Memory-managed wrapper type.
Instances
Eq TagList Source # | |
GBoxed TagList Source # | |
Defined in GI.Gst.Structs.TagList | |
ManagedPtrNewtype TagList Source # | |
Defined in GI.Gst.Structs.TagList toManagedPtr :: TagList -> ManagedPtr TagList | |
TypedObject TagList Source # | |
Defined in GI.Gst.Structs.TagList | |
HasParentTypes TagList Source # | |
Defined in GI.Gst.Structs.TagList | |
tag ~ 'AttrSet => Constructible TagList tag Source # | |
IsGValue (Maybe TagList) Source # | Convert |
Defined in GI.Gst.Structs.TagList gvalueGType_ :: IO GType gvalueSet_ :: Ptr GValue -> Maybe TagList -> IO () gvalueGet_ :: Ptr GValue -> IO (Maybe TagList) | |
type ParentTypes TagList Source # | |
Defined in GI.Gst.Structs.TagList |
Methods
Click to display all available methods, including inherited ones
Methods
addValue, copy, foreach, insert, isEmpty, isEqual, merge, nTags, nthTagName, peekStringIndex, removeTag, toString.
Getters
getBoolean, getBooleanIndex, getDate, getDateIndex, getDateTime, getDateTimeIndex, getDouble, getDoubleIndex, getFloat, getFloatIndex, getInt, getInt64, getInt64Index, getIntIndex, getPointer, getPointerIndex, getSample, getSampleIndex, getScope, getString, getStringIndex, getTagSize, getUint, getUint64, getUint64Index, getUintIndex, getValueIndex.
Setters
addValue
:: (HasCallStack, MonadIO m) | |
=> TagList |
|
-> TagMergeMode |
|
-> Text |
|
-> GValue |
|
-> m () |
Sets the GValue for a given tag using the specified mode.
copy
Creates a new TagList
as a copy of the old taglist
. The new taglist
will have a refcount of 1, owned by the caller, and will be writable as
a result.
Note that this function is the semantic equivalent of a gst_tag_list_ref()
followed by a gst_tag_list_make_writable()
. If you only want to hold on to a
reference to the data, you should use gst_tag_list_ref()
.
When you are finished with the taglist, call gst_tag_list_unref()
on it.
copyValue
:: (HasCallStack, MonadIO m) | |
=> TagList |
|
-> Text |
|
-> m (Bool, GValue) | Returns: |
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
:: (HasCallStack, MonadIO m) | |
=> TagList |
|
-> TagForeachFunc |
|
-> 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
:: (HasCallStack, MonadIO m) | |
=> TagList |
|
-> Text |
|
-> m (Bool, Bool) | Returns: |
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 #
:: (HasCallStack, MonadIO m) | |
=> TagList |
|
-> Text |
|
-> Word32 |
|
-> m (Bool, Bool) | Returns: |
Gets the value that is at the given index for the given tag in the given list.
getDate
:: (HasCallStack, MonadIO m) | |
=> TagList |
|
-> Text |
|
-> m (Bool, Date) | Returns: |
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
:: (HasCallStack, MonadIO m) | |
=> TagList |
|
-> Text |
|
-> Word32 |
|
-> m (Bool, Date) | Returns: |
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
:: (HasCallStack, MonadIO m) | |
=> TagList |
|
-> Text |
|
-> m (Bool, DateTime) | Returns: |
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 #
:: (HasCallStack, MonadIO m) | |
=> TagList |
|
-> Text |
|
-> Word32 |
|
-> m (Bool, DateTime) | Returns: |
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
:: (HasCallStack, MonadIO m) | |
=> TagList |
|
-> Text |
|
-> m (Bool, Double) | Returns: |
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 #
:: (HasCallStack, MonadIO m) | |
=> TagList |
|
-> Text |
|
-> Word32 |
|
-> m (Bool, Double) | Returns: |
Gets the value that is at the given index for the given tag in the given list.
getFloat
:: (HasCallStack, MonadIO m) | |
=> TagList |
|
-> Text |
|
-> m (Bool, Float) | Returns: |
Copies the contents for the given tag into the value, merging multiple values into one if multiple values are associated with the tag.
getFloatIndex
:: (HasCallStack, MonadIO m) | |
=> TagList |
|
-> Text |
|
-> Word32 |
|
-> m (Bool, Float) | Returns: |
Gets the value that is at the given index for the given tag in the given list.
getInt
:: (HasCallStack, MonadIO m) | |
=> TagList |
|
-> Text |
|
-> m (Bool, Int32) | Returns: |
Copies the contents for the given tag into the value, merging multiple values into one if multiple values are associated with the tag.
getInt64
:: (HasCallStack, MonadIO m) | |
=> TagList |
|
-> Text |
|
-> m (Bool, Int64) | Returns: |
Copies the contents for the given tag into the value, merging multiple values into one if multiple values are associated with the tag.
getInt64Index
:: (HasCallStack, MonadIO m) | |
=> TagList |
|
-> Text |
|
-> Word32 |
|
-> m (Bool, Int64) | Returns: |
Gets the value that is at the given index for the given tag in the given list.
getIntIndex
:: (HasCallStack, MonadIO m) | |
=> TagList |
|
-> Text |
|
-> Word32 |
|
-> m (Bool, Int32) | Returns: |
Gets the value that is at the given index for the given tag in the given list.
getPointer
:: (HasCallStack, MonadIO m) | |
=> TagList |
|
-> Text |
|
-> m (Bool, Ptr ()) | Returns: |
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 #
:: (HasCallStack, MonadIO m) | |
=> TagList |
|
-> Text |
|
-> Word32 |
|
-> m (Bool, Ptr ()) | Returns: |
Gets the value that is at the given index for the given tag in the given list.
getSample
:: (HasCallStack, MonadIO m) | |
=> TagList |
|
-> Text |
|
-> m (Bool, Sample) | Returns: |
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 #
:: (HasCallStack, MonadIO m) | |
=> TagList |
|
-> Text |
|
-> Word32 |
|
-> m (Bool, Sample) | Returns: |
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
:: (HasCallStack, MonadIO m) | |
=> TagList |
|
-> m TagScope | Returns: The scope of |
Gets the scope of list
.
getString
:: (HasCallStack, MonadIO m) | |
=> TagList |
|
-> Text |
|
-> m (Bool, Text) | Returns: |
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 #
:: (HasCallStack, MonadIO m) | |
=> TagList |
|
-> Text |
|
-> Word32 |
|
-> m (Bool, Text) | Returns: |
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
:: (HasCallStack, MonadIO m) | |
=> TagList |
|
-> Text |
|
-> m Word32 | Returns: The number of tags stored |
Checks how many value are stored in this tag list for the given tag.
getUint
:: (HasCallStack, MonadIO m) | |
=> TagList |
|
-> Text |
|
-> m (Bool, Word32) | Returns: |
Copies the contents for the given tag into the value, merging multiple values into one if multiple values are associated with the tag.
getUint64
:: (HasCallStack, MonadIO m) | |
=> TagList |
|
-> Text |
|
-> m (Bool, Word64) | Returns: |
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 #
:: (HasCallStack, MonadIO m) | |
=> TagList |
|
-> Text |
|
-> Word32 |
|
-> m (Bool, Word64) | Returns: |
Gets the value that is at the given index for the given tag in the given list.
getUintIndex
:: (HasCallStack, MonadIO m) | |
=> TagList |
|
-> Text |
|
-> Word32 |
|
-> m (Bool, Word32) | Returns: |
Gets the value that is at the given index for the given tag in the given list.
getValueIndex
:: (HasCallStack, MonadIO m) | |
=> TagList |
|
-> Text |
|
-> Word32 |
|
-> m (Maybe GValue) | Returns: The GValue for the specified
entry or |
Gets the value that is at the given index for the given tag in the given list.
insert
:: (HasCallStack, MonadIO m) | |
=> TagList |
|
-> TagList |
|
-> TagMergeMode |
|
-> m () |
Inserts the tags of the from
list into the first list using the given mode.
isEmpty
:: (HasCallStack, MonadIO m) | |
=> TagList |
|
-> m Bool |
Checks if the given taglist is empty.
isEqual
Checks if the two given taglists are equal.
merge
:: (HasCallStack, MonadIO m) | |
=> Maybe TagList |
|
-> Maybe TagList |
|
-> TagMergeMode |
|
-> m (Maybe TagList) | Returns: the new list |
nTags
:: (HasCallStack, MonadIO m) | |
=> TagList |
|
-> m Int32 | Returns: The number of tags in |
Get the number of tags in list
.
newEmpty
:: (HasCallStack, MonadIO m) | |
=> m TagList | Returns: An empty tag list |
Creates a new empty GstTagList.
Free-function: gst_tag_list_unref
newFromString
:: (HasCallStack, MonadIO m) | |
=> Text |
|
-> m (Maybe TagList) |
Deserializes a tag list.
nthTagName
:: (HasCallStack, MonadIO m) | |
=> TagList |
|
-> Word32 |
|
-> m Text | Returns: The name of the tag at |
Get the name of the tag in list
at index
.
peekStringIndex
tagListPeekStringIndex Source #
:: (HasCallStack, MonadIO m) | |
=> TagList |
|
-> Text |
|
-> Word32 |
|
-> m (Bool, Text) | Returns: |
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
:: (HasCallStack, MonadIO m) | |
=> TagList |
|
-> Text |
|
-> m () |
Removes the given tag from the taglist.
setScope
:: (HasCallStack, MonadIO m) | |
=> TagList |
|
-> TagScope |
|
-> m () |
Sets the scope of list
to scope
. By default the scope
of a taglist is stream scope.
toString
:: (HasCallStack, MonadIO m) | |
=> TagList |
|
-> m (Maybe Text) | Returns: a newly-allocated string.
The string must be freed with |
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