gi-gstaudio-1.0.12: GStreamerAudio bindings

CopyrightWill Thompson, Iñaki García Etxebarria and Jonas Platte
LicenseLGPL-2.1
MaintainerIñaki García Etxebarria (garetxe@gmail.com)
Safe HaskellNone
LanguageHaskell2010

GI.GstAudio.Structs.AudioInfo

Contents

Description

Information describing audio properties. This information can be filled in from GstCaps with audioInfoFromCaps.

Use the provided macros to access the info in this structure.

Synopsis

Exported types

newtype AudioInfo Source #

Instances

BoxedObject AudioInfo Source # 
(~) AttrOpTag tag AttrSet => Constructible AudioInfo tag Source # 

Methods

new :: MonadIO m => (ManagedPtr AudioInfo -> AudioInfo) -> [AttrOp AudioInfo tag] -> m AudioInfo #

((~) * info (ResolveAudioInfoMethod t AudioInfo), MethodInfo * info AudioInfo p) => IsLabel t (AudioInfo -> p) Source # 

Methods

fromLabel :: Proxy# Symbol t -> AudioInfo -> p #

((~) * info (ResolveAudioInfoMethod t AudioInfo), MethodInfo * info AudioInfo p) => IsLabelProxy t (AudioInfo -> p) Source # 

Methods

fromLabelProxy :: Proxy Symbol t -> AudioInfo -> p #

HasAttributeList * AudioInfo Source # 
((~) * signature (m Caps), MonadIO m) => MethodInfo * AudioInfoToCapsMethodInfo AudioInfo signature Source # 
((~) * signature (AudioFormat -> Int32 -> Int32 -> AudioChannelPosition -> m ()), MonadIO m) => MethodInfo * AudioInfoSetFormatMethodInfo AudioInfo signature Source # 
((~) * signature (AudioInfo -> m Bool), MonadIO m) => MethodInfo * AudioInfoIsEqualMethodInfo AudioInfo signature Source # 
((~) * signature (m ()), MonadIO m) => MethodInfo * AudioInfoInitMethodInfo AudioInfo signature Source # 
((~) * signature (Caps -> m Bool), MonadIO m) => MethodInfo * AudioInfoFromCapsMethodInfo AudioInfo signature Source # 
((~) * signature (m ()), MonadIO m) => MethodInfo * AudioInfoFreeMethodInfo AudioInfo signature Source # 
((~) * signature (m AudioInfo), MonadIO m) => MethodInfo * AudioInfoCopyMethodInfo AudioInfo signature Source # 
((~) * signature (Format -> Int64 -> Format -> Int64 -> m Bool), MonadIO m) => MethodInfo * AudioInfoConvertMethodInfo AudioInfo signature Source # 
type AttributeList AudioInfo Source # 

newZeroAudioInfo :: MonadIO m => m AudioInfo Source #

Construct a AudioInfo struct initialized to zero.

Methods

convert

audioInfoConvert Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> AudioInfo

info: a AudioInfo

-> Format

srcFmt: Format of the srcVal

-> Int64

srcVal: value to convert

-> Format

destFmt: Format of the destVal

-> Int64

destVal: pointer to destination value

-> m Bool

Returns: TRUE if the conversion was successful.

Converts among various Format types. This function handles GST_FORMAT_BYTES, GST_FORMAT_TIME, and GST_FORMAT_DEFAULT. For raw audio, GST_FORMAT_DEFAULT corresponds to audio frames. This function can be used to handle pad queries of the type GST_QUERY_CONVERT.

copy

audioInfoCopy Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> AudioInfo

info: a AudioInfo

-> m AudioInfo

Returns: a new AudioInfo. free with gst_audio_info_free.

Copy a GstAudioInfo structure.

free

audioInfoFree Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> AudioInfo

info: a AudioInfo

-> m () 

Free a GstAudioInfo structure previously allocated with audioInfoNew or audioInfoCopy.

fromCaps

audioInfoFromCaps Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> AudioInfo

info: a AudioInfo

-> Caps

caps: a Caps

-> m Bool

Returns: TRUE if caps could be parsed

Parse caps and update info.

init

audioInfoInit Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> AudioInfo

info: a AudioInfo

-> m () 

Initialize info with default values.

isEqual

audioInfoIsEqual Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> AudioInfo

info: a AudioInfo

-> AudioInfo

other: a AudioInfo

-> m Bool

Returns: True if info and other are equal, else False.

Compares two AudioInfo and returns whether they are equal or not

Since: 1.2

new

audioInfoNew Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> m AudioInfo

Returns: a new AudioInfo. free with audioInfoFree.

Allocate a new AudioInfo that is also initialized with audioInfoInit.

setFormat

audioInfoSetFormat Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> AudioInfo

info: a AudioInfo

-> AudioFormat

format: the format

-> Int32

rate: the samplerate

-> Int32

channels: the number of channels

-> AudioChannelPosition

position: the channel positions

-> m () 

Set the default info for the audio info of format and rate and channels.

Note: This initializes info first, no values are preserved.

toCaps

audioInfoToCaps Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> AudioInfo

info: a AudioInfo

-> m Caps

Returns: the new Caps containing the info of info.

Convert the values of info into a Caps.

Properties

bpf

channels

finfo

flags

layout

rate