gstaudio.audio_info

Module for [AudioInfo] class

class AudioInfo

Types 1

Information describing audio properties. This information can be filled in from GstCaps with [gstaudio.audio_info.AudioInfo.fromCaps].

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

Methods
void * _cPtr(Flag!"Dup" dup = No.Dup)
GType _gType() @property
AudioInfo self()Returns `this`, for use in `with` statements.
gstaudio.audio_format_info.AudioFormatInfo finfo() @propertyGet `finfo` field. Returns: the format info of the audio
gstaudio.types.AudioFlags flags() @propertyGet `flags` field. Returns: additional audio flags
void flags(gstaudio.types.AudioFlags propval) @propertySet `flags` field. Params: propval = additional audio flags
gstaudio.types.AudioLayout layout() @propertyGet `layout` field. Returns: audio layout
void layout(gstaudio.types.AudioLayout propval) @propertySet `layout` field. Params: propval = audio layout
int rate() @propertyGet `rate` field. Returns: the audio sample rate
void rate(int propval) @propertySet `rate` field. Params: propval = the audio sample rate
int channels() @propertyGet `channels` field. Returns: the number of channels
void channels(int propval) @propertySet `channels` field. Params: propval = the number of channels
int bpf() @propertyGet `bpf` field. Returns: the number of bytes for one frame, this is the size of one sample * @channels
void bpf(int propval) @propertySet `bpf` field. Params: propval = the number of bytes for one frame, this is the size of one sample * @channels
gstaudio.audio_info.AudioInfo newFromCaps(gst.caps.Caps caps)Parse caps to generate a #GstAudioInfo.
bool convert(gst.types.Format srcFmt, long srcVal, gst.types.Format destFmt, out long destVal)Converts among various #GstFormat types. This function handles GSTFORMATBYTES, GSTFORMATTIME, and GSTFORMATDEFAULT. For raw audio, GSTFORMATDEFAULT corresponds to audio frames. This function can...
gstaudio.audio_info.AudioInfo copy()Copy a GstAudioInfo structure. Returns: a new #GstAudioInfo. free with gstaudioinfo_free.
bool isEqual(gstaudio.audio_info.AudioInfo other)Compares two #GstAudioInfo and returns whether they are equal or not
void setFormat(gstaudio.types.AudioFormat format, int rate, int channels, gstaudio.types.AudioChannelPosition[] position = null)Set the default info for the audio info of format and rate and channels.
gst.caps.Caps toCaps()Convert the values of info into a #GstCaps. Returns: the new #GstCaps containing the info of info.
bool fromCaps(out gstaudio.audio_info.AudioInfo info, gst.caps.Caps caps)Parse caps and update info.
void init_(out gstaudio.audio_info.AudioInfo info)Initialize info with default values.
Constructors
this(void * ptr, Flag!"Take" take)
this()Allocate a new #GstAudioInfo that is also initialized with [gstaudio.audioinfo.AudioInfo.init]. Returns: a new #GstAudioInfo. free with [gstaudio.audio_info.AudioInfo.free].