gi-gstbase-1.0.23: GStreamerBase bindings
Copyright Will Thompson Iñaki García Etxebarria and Jonas Platte LGPL-2.1 Iñaki García Etxebarria None Haskell2010

GI.GstBase.Functions

Description

Synopsis

# Methods

## typeFindHelper

Arguments

 :: (HasCallStack, MonadIO m, IsPad a) => a src: A source Pad -> Word64 size: The length in bytes -> m (Maybe Caps) Returns: the Caps corresponding to the data stream. Returns Nothing if no Caps matches the data stream.

Tries to find what type of data is flowing from the given source Pad.

Free-function: gst_caps_unref

## typeFindHelperForBuffer

Arguments

 :: (HasCallStack, MonadIO m, IsObject a) => Maybe a obj: object doing the typefinding, or Nothing (used for logging) -> Buffer buf: a Buffer with data to typefind -> m (Maybe Caps, TypeFindProbability) Returns: the Caps corresponding to the data, or Nothing if no type could be found. The caller should free the caps returned with gst_caps_unref().

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

Arguments

 :: (HasCallStack, MonadIO m, IsObject a) => Maybe a obj: object doing the typefinding, or Nothing (used for logging) -> Buffer buf: a Buffer with data to typefind -> Maybe Text extension: extension of the media, or Nothing -> m (Maybe Caps, TypeFindProbability) Returns: the Caps corresponding to the data, or Nothing if no type could be found. The caller should free the caps returned with gst_caps_unref().

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

Arguments

 :: (HasCallStack, MonadIO m, IsObject a) => Maybe a obj: object doing the typefinding, or Nothing (used for logging) -> ByteString data: * a pointer with data to typefind -> m (Maybe Caps, TypeFindProbability) Returns: the Caps corresponding to the data, or Nothing if no type could be found. The caller should free the caps returned with gst_caps_unref().

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

Arguments

 :: (HasCallStack, MonadIO m, IsObject a) => Maybe a obj: object doing the typefinding, or Nothing (used for logging) -> ByteString data: * a pointer with data to typefind -> Maybe Text extension: extension of the media, or Nothing -> m (Maybe Caps, TypeFindProbability) Returns: the Caps corresponding to the data, or Nothing if no type could be found. The caller should free the caps returned with gst_caps_unref().

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

Arguments

 :: (HasCallStack, MonadIO m, IsObject a) => Maybe a obj: object doing the typefinding, or Nothing (used for logging) -> Text extension: an extension -> m (Maybe Caps) Returns: the Caps corresponding to extension, or Nothing if no type could be found. The caller should free the caps returned with gst_caps_unref().

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

Arguments

 :: (HasCallStack, MonadIO m, IsObject a, IsObject b) => a obj: A Object that will be passed as first argument to func -> Maybe b parent: the parent of obj or Nothing -> TypeFindHelperGetRangeFunction func: A generic TypeFindHelperGetRangeFunction that will be used to access data at random offsets when doing the typefinding -> Word64 size: The length in bytes -> Maybe Text extension: extension of the media, or Nothing -> m (Maybe Caps, TypeFindProbability) Returns: the Caps corresponding to the data stream. Returns Nothing if no Caps matches the data stream.

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

Arguments

 :: (HasCallStack, MonadIO m, IsObject a, IsObject b) => a obj: A Object that will be passed as first argument to func -> Maybe b parent: the parent of obj or Nothing -> TypeFindHelperGetRangeFunction func: A generic TypeFindHelperGetRangeFunction that will be used to access data at random offsets when doing the typefinding -> Word64 size: The length in bytes -> Maybe Text extension: extension of the media, or Nothing -> m (FlowReturn, Caps, TypeFindProbability) Returns: the last GstFlowReturn from pulling a buffer or FlowReturnOk if typefinding was successful.

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