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.TypeFind

Contents

Description

The following functions allow you to detect the media type of an unknown stream.

Synopsis

Exported types

newtype TypeFind Source #

Memory-managed wrapper type.

Constructors

TypeFind (ManagedPtr TypeFind) 

newZeroTypeFind :: MonadIO m => m TypeFind Source #

Construct a TypeFind struct initialized to zero.

noTypeFind :: Maybe TypeFind Source #

A convenience alias for Nothing :: Maybe TypeFind.

Methods

getLength

typeFindGetLength Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> TypeFind

find: The TypeFind the function was called with

-> m Word64

Returns: The length of the data stream, or 0 if it is not available.

Get the length of the data stream.

peek

typeFindPeek Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> TypeFind

find: The TypeFind object the function was called with

-> Int64

offset: The offset

-> m (Maybe ByteString)

Returns: the requested data, or Nothing if that data is not available.

Returns the size bytes of the stream to identify beginning at offset. If offset is a positive number, the offset is relative to the beginning of the stream, if offset is a negative number the offset is relative to the end of the stream. The returned memory is valid until the typefinding function returns and must not be freed.

register

typeFindRegister Source #

Arguments

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

plugin: A Plugin, or Nothing for a static typefind function

-> Text

name: The name for registering

-> Word32

rank: The rank (or importance) of this typefind function

-> TypeFindFunction

func: The TypeFindFunction to use

-> Maybe Text

extensions: Optional comma-separated list of extensions that could belong to this type

-> Caps

possibleCaps: Optionally the caps that could be returned when typefinding succeeds

-> m Bool

Returns: True on success, False otherwise

Registers a new typefind function to be used for typefinding. After registering this function will be available for typefinding. This function is typically called during an element's plugin initialization.

suggest

typeFindSuggest Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> TypeFind

find: The TypeFind object the function was called with

-> Word32

probability: The probability in percent that the suggestion is right

-> Caps

caps: The fixed Caps to suggest

-> m () 

If a TypeFindFunction calls this function it suggests the caps with the given probability. A TypeFindFunction may supply different suggestions in one call. It is up to the caller of the TypeFindFunction to interpret these values.

Properties

data

The data used by the caller of the typefinding function.

clearTypeFindData :: MonadIO m => TypeFind -> m () Source #

Set the value of the “data” field to Nothing. When overloading is enabled, this is equivalent to

clear #data

getTypeFindData :: MonadIO m => TypeFind -> m (Ptr ()) Source #

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

get typeFind #data

setTypeFindData :: MonadIO m => TypeFind -> Ptr () -> m () Source #

Set the value of the “data” field. When overloading is enabled, this is equivalent to

set typeFind [ #data := value ]

getLength

No description available in the introspection data.

clearTypeFindGetLength :: MonadIO m => TypeFind -> m () Source #

Set the value of the “get_length” field to Nothing. When overloading is enabled, this is equivalent to

clear #getLength

getTypeFindGetLength :: MonadIO m => TypeFind -> m (Maybe TypeFindGetLengthFieldCallback) Source #

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

get typeFind #getLength

setTypeFindGetLength :: MonadIO m => TypeFind -> FunPtr C_TypeFindGetLengthFieldCallback -> m () Source #

Set the value of the “get_length” field. When overloading is enabled, this is equivalent to

set typeFind [ #getLength := value ]

peek

No description available in the introspection data.

clearTypeFindPeek :: MonadIO m => TypeFind -> m () Source #

Set the value of the “peek” field to Nothing. When overloading is enabled, this is equivalent to

clear #peek

getTypeFindPeek :: MonadIO m => TypeFind -> m (Maybe TypeFindPeekFieldCallback) Source #

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

get typeFind #peek

setTypeFindPeek :: MonadIO m => TypeFind -> FunPtr C_TypeFindPeekFieldCallback -> m () Source #

Set the value of the “peek” field. When overloading is enabled, this is equivalent to

set typeFind [ #peek := value ]

suggest

No description available in the introspection data.

clearTypeFindSuggest :: MonadIO m => TypeFind -> m () Source #

Set the value of the “suggest” field to Nothing. When overloading is enabled, this is equivalent to

clear #suggest

getTypeFindSuggest :: MonadIO m => TypeFind -> m (Maybe TypeFindSuggestFieldCallback) Source #

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

get typeFind #suggest

setTypeFindSuggest :: MonadIO m => TypeFind -> FunPtr C_TypeFindSuggestFieldCallback -> m () Source #

Set the value of the “suggest” field. When overloading is enabled, this is equivalent to

set typeFind [ #suggest := value ]