gi-gstaudio-1.0.24: GStreamerAudio bindings
CopyrightWill Thompson and Iñaki García Etxebarria
LicenseLGPL-2.1
MaintainerIñaki García Etxebarria
Safe HaskellSafe-Inferred
LanguageHaskell2010

GI.GstAudio.Structs.AudioInfo

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 #

Memory-managed wrapper type.

Instances

Instances details
Eq AudioInfo Source # 
Instance details

Defined in GI.GstAudio.Structs.AudioInfo

GBoxed AudioInfo Source # 
Instance details

Defined in GI.GstAudio.Structs.AudioInfo

ManagedPtrNewtype AudioInfo Source # 
Instance details

Defined in GI.GstAudio.Structs.AudioInfo

TypedObject AudioInfo Source # 
Instance details

Defined in GI.GstAudio.Structs.AudioInfo

Methods

glibType :: IO GType #

HasParentTypes AudioInfo Source # 
Instance details

Defined in GI.GstAudio.Structs.AudioInfo

tag ~ 'AttrSet => Constructible AudioInfo tag Source # 
Instance details

Defined in GI.GstAudio.Structs.AudioInfo

Methods

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

IsGValue (Maybe AudioInfo) Source #

Convert AudioInfo to and from GValue. See toGValue and fromGValue.

Instance details

Defined in GI.GstAudio.Structs.AudioInfo

type ParentTypes AudioInfo Source # 
Instance details

Defined in GI.GstAudio.Structs.AudioInfo

type ParentTypes AudioInfo = '[] :: [Type]

newZeroAudioInfo :: MonadIO m => m AudioInfo Source #

Construct a AudioInfo struct initialized to zero.

Methods

Click to display all available methods, including inherited ones

Expand

Methods

convert, copy, free, isEqual, toCaps.

Getters

None.

Setters

setFormat.

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

-> m (Bool, Int64)

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) 
=> Caps

caps: a Caps

-> m (Bool, AudioInfo)

Returns: TRUE if caps could be parsed

Parse caps and update info.

init

audioInfoInit :: (HasCallStack, MonadIO m) => m AudioInfo Source #

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

-> Maybe [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

the number of bytes for one frame, this is the size of one sample * channels

getAudioInfoBpf :: MonadIO m => AudioInfo -> m Int32 Source #

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

get audioInfo #bpf

setAudioInfoBpf :: MonadIO m => AudioInfo -> Int32 -> m () Source #

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

set audioInfo [ #bpf := value ]

channels

the number of channels

getAudioInfoChannels :: MonadIO m => AudioInfo -> m Int32 Source #

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

get audioInfo #channels

setAudioInfoChannels :: MonadIO m => AudioInfo -> Int32 -> m () Source #

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

set audioInfo [ #channels := value ]

finfo

the format info of the audio

clearAudioInfoFinfo :: MonadIO m => AudioInfo -> m () Source #

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

clear #finfo

getAudioInfoFinfo :: MonadIO m => AudioInfo -> m (Maybe AudioFormatInfo) Source #

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

get audioInfo #finfo

setAudioInfoFinfo :: MonadIO m => AudioInfo -> Ptr AudioFormatInfo -> m () Source #

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

set audioInfo [ #finfo := value ]

flags

additional audio flags

getAudioInfoFlags :: MonadIO m => AudioInfo -> m [AudioFlags] Source #

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

get audioInfo #flags

setAudioInfoFlags :: MonadIO m => AudioInfo -> [AudioFlags] -> m () Source #

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

set audioInfo [ #flags := value ]

layout

audio layout

getAudioInfoLayout :: MonadIO m => AudioInfo -> m AudioLayout Source #

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

get audioInfo #layout

setAudioInfoLayout :: MonadIO m => AudioInfo -> AudioLayout -> m () Source #

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

set audioInfo [ #layout := value ]

rate

the audio sample rate

getAudioInfoRate :: MonadIO m => AudioInfo -> m Int32 Source #

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

get audioInfo #rate

setAudioInfoRate :: MonadIO m => AudioInfo -> Int32 -> m () Source #

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

set audioInfo [ #rate := value ]