gi-gstbase-1.0.28: GStreamerBase bindings
CopyrightWill Thompson and Iñaki García Etxebarria
LicenseLGPL-2.1
MaintainerIñaki García Etxebarria
Safe HaskellSafe-Inferred
LanguageHaskell2010

GI.GstBase.Functions

Description

 
Synopsis

Methods

typeFindHelper

typeFindHelper Source #

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

typeFindHelperForBuffer Source #

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

typeFindHelperForBufferWithCaps

typeFindHelperForBufferWithCaps Source #

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

-> Caps

caps: caps of the media

-> 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 if type of media contained in the given Buffer, matches caps specified, assumption being that the buffer represents the beginning of the stream or file.

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.

Only the typefinder matching the given caps will be called, if found. The caps with the highest probability will be returned, or Nothing if the content of the data could not be identified.

Free-function: gst_caps_unref

Since: 1.22

typeFindHelperForBufferWithExtension

typeFindHelperForBufferWithExtension Source #

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

typeFindHelperForData Source #

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

typeFindHelperForDataWithCaps

typeFindHelperForDataWithCaps Source #

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

-> Caps

caps: caps of the media

-> 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 if type of media contained in the given data, matches the caps specified, assumption being that the data represents the beginning of the stream or file.

Only the typefinder matching the given caps will be called, if found. The caps with the highest probability will be returned, or Nothing if the content of the data could not be identified.

Free-function: gst_caps_unref

Since: 1.22

typeFindHelperForDataWithExtension

typeFindHelperForDataWithExtension Source #

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

typeFindHelperForExtension Source #

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

typeFindHelperGetRange Source #

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

typeFindHelperGetRangeFull Source #

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

typeFindListFactoriesForCaps

typeFindListFactoriesForCaps Source #

Arguments

:: (HasCallStack, MonadIO m, IsObject a) 
=> Maybe a

obj: object doing the typefinding, or Nothing (used for logging)

-> Caps

caps: caps of the media

-> m [TypeFindFactory]

Returns: the list of TypeFindFactory corresponding to caps, or Nothing if no typefinder could be found. Caller should free the returned list with g_list_free() and list elements with objectUnref.

Tries to find the best TypeFindFactory associated with caps.

The typefinder that can handle caps will be returned.

Free-function: g_list_free

Since: 1.22