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 |
Synopsis
- typeFindHelper :: (HasCallStack, MonadIO m, IsPad a) => a -> Word64 -> m (Maybe Caps)
- typeFindHelperForBuffer :: (HasCallStack, MonadIO m, IsObject a) => Maybe a -> Buffer -> m (Maybe Caps, TypeFindProbability)
- typeFindHelperForBufferWithExtension :: (HasCallStack, MonadIO m, IsObject a) => Maybe a -> Buffer -> Maybe Text -> m (Maybe Caps, TypeFindProbability)
- typeFindHelperForData :: (HasCallStack, MonadIO m, IsObject a) => Maybe a -> ByteString -> m (Maybe Caps, TypeFindProbability)
- typeFindHelperForDataWithExtension :: (HasCallStack, MonadIO m, IsObject a) => Maybe a -> ByteString -> Maybe Text -> m (Maybe Caps, TypeFindProbability)
- typeFindHelperForExtension :: (HasCallStack, MonadIO m, IsObject a) => Maybe a -> Text -> m (Maybe Caps)
- typeFindHelperGetRange :: (HasCallStack, MonadIO m, IsObject a, IsObject b) => a -> Maybe b -> TypeFindHelperGetRangeFunction -> Word64 -> Maybe Text -> m (Maybe Caps, TypeFindProbability)
- typeFindHelperGetRangeFull :: (HasCallStack, MonadIO m, IsObject a, IsObject b) => a -> Maybe b -> TypeFindHelperGetRangeFunction -> Word64 -> Maybe Text -> m (FlowReturn, Caps, TypeFindProbability)
Methods
typeFindHelper
:: (HasCallStack, MonadIO m, IsPad a) | |
=> a |
|
-> Word64 |
|
-> m (Maybe Caps) | Returns: the |
Tries to find what type of data is flowing from the given source Pad
.
Free-function: gst_caps_unref
typeFindHelperForBuffer
typeFindHelperForBuffer Source #
:: (HasCallStack, MonadIO m, IsObject a) | |
=> Maybe a |
|
-> Buffer |
|
-> m (Maybe Caps, TypeFindProbability) | Returns: the |
Tries to find what type of data is contained in the given Buffer
, the
assumption being that the buffer represents the beginning of the stream or
file.
All available typefinders will be called on the data in order of rank. If
a typefinding function returns a probability of TypeFindProbabilityMaximum
,
typefinding is stopped immediately and the found caps will be returned
right away. Otherwise, all available typefind functions will the tried,
and the caps with the highest probability will be returned, or Nothing
if
the content of the buffer could not be identified.
Free-function: gst_caps_unref
typeFindHelperForBufferWithExtension
typeFindHelperForBufferWithExtension Source #
:: (HasCallStack, MonadIO m, IsObject a) | |
=> Maybe a |
|
-> Buffer |
|
-> Maybe Text |
|
-> m (Maybe Caps, TypeFindProbability) | Returns: the |
Tries to find what type of data is contained in the given Buffer
, the
assumption being that the buffer represents the beginning of the stream or
file.
All available typefinders will be called on the data in order of rank. If
a typefinding function returns a probability of TypeFindProbabilityMaximum
,
typefinding is stopped immediately and the found caps will be returned
right away. Otherwise, all available typefind functions will the tried,
and the caps with the highest probability will be returned, or Nothing
if
the content of the buffer could not be identified.
When extension
is not Nothing
, this function will first try the typefind
functions for the given extension, which might speed up the typefinding
in many cases.
Free-function: gst_caps_unref
Since: 1.16
typeFindHelperForData
typeFindHelperForData Source #
:: (HasCallStack, MonadIO m, IsObject a) | |
=> Maybe a |
|
-> ByteString |
|
-> m (Maybe Caps, TypeFindProbability) | Returns: the |
Tries to find what type of data is contained in the given data
, the
assumption being that the data represents the beginning of the stream or
file.
All available typefinders will be called on the data in order of rank. If
a typefinding function returns a probability of TypeFindProbabilityMaximum
,
typefinding is stopped immediately and the found caps will be returned
right away. Otherwise, all available typefind functions will the tried,
and the caps with the highest probability will be returned, or Nothing
if
the content of data
could not be identified.
Free-function: gst_caps_unref
typeFindHelperForDataWithExtension
typeFindHelperForDataWithExtension Source #
:: (HasCallStack, MonadIO m, IsObject a) | |
=> Maybe a |
|
-> ByteString |
|
-> Maybe Text |
|
-> m (Maybe Caps, TypeFindProbability) | Returns: the |
Tries to find what type of data is contained in the given data
, the
assumption being that the data represents the beginning of the stream or
file.
All available typefinders will be called on the data in order of rank. If
a typefinding function returns a probability of TypeFindProbabilityMaximum
,
typefinding is stopped immediately and the found caps will be returned
right away. Otherwise, all available typefind functions will the tried,
and the caps with the highest probability will be returned, or Nothing
if
the content of data
could not be identified.
When extension
is not Nothing
, this function will first try the typefind
functions for the given extension, which might speed up the typefinding
in many cases.
Free-function: gst_caps_unref
Since: 1.16
typeFindHelperForExtension
typeFindHelperForExtension Source #
:: (HasCallStack, MonadIO m, IsObject a) | |
=> Maybe a |
|
-> Text |
|
-> m (Maybe Caps) | Returns: the |
Tries to find the best Caps
associated with extension
.
All available typefinders will be checked against the extension in order
of rank. The caps of the first typefinder that can handle extension
will be
returned.
Free-function: gst_caps_unref
typeFindHelperGetRange
typeFindHelperGetRange Source #
:: (HasCallStack, MonadIO m, IsObject a, IsObject b) | |
=> a |
|
-> Maybe b |
|
-> TypeFindHelperGetRangeFunction |
|
-> Word64 |
|
-> Maybe Text |
|
-> m (Maybe Caps, TypeFindProbability) | Returns: the |
Utility function to do pull-based typefinding. Unlike typeFindHelper
however, this function will use the specified function func
to obtain the
data needed by the typefind functions, rather than operating on a given
source pad. This is useful mostly for elements like tag demuxers which
strip off data at the beginning and/or end of a file and want to typefind
the stripped data stream before adding their own source pad (the specified
callback can then call the upstream peer pad with offsets adjusted for the
tag size, for example).
When extension
is not Nothing
, this function will first try the typefind
functions for the given extension, which might speed up the typefinding
in many cases.
Free-function: gst_caps_unref
typeFindHelperGetRangeFull
typeFindHelperGetRangeFull Source #
:: (HasCallStack, MonadIO m, IsObject a, IsObject b) | |
=> a |
|
-> Maybe b |
|
-> TypeFindHelperGetRangeFunction |
|
-> Word64 |
|
-> Maybe Text |
|
-> m (FlowReturn, Caps, TypeFindProbability) | Returns: the last |
Utility function to do pull-based typefinding. Unlike typeFindHelper
however, this function will use the specified function func
to obtain the
data needed by the typefind functions, rather than operating on a given
source pad. This is useful mostly for elements like tag demuxers which
strip off data at the beginning and/or end of a file and want to typefind
the stripped data stream before adding their own source pad (the specified
callback can then call the upstream peer pad with offsets adjusted for the
tag size, for example).
When extension
is not Nothing
, this function will first try the typefind
functions for the given extension, which might speed up the typefinding
in many cases.
Since: 1.14.3