Top |
Description
GstAudioDownmixMeta defines an audio downmix matrix to be send along with audio buffers. These functions in this module help to create and attach the meta as well as extracting it.
Functions
gst_buffer_add_audio_downmix_meta ()
GstAudioDownmixMeta * gst_buffer_add_audio_downmix_meta (GstBuffer *buffer
,const GstAudioChannelPosition *from_position
,gint from_channels
,const GstAudioChannelPosition *to_position
,gint to_channels
,const gfloat **matrix
);
Attaches GstAudioDownmixMeta metadata to buffer
with the given parameters.
matrix
is an two-dimensional array of to_channels
times from_channels
coefficients, i.e. the i-th output channels is constructed by multiplicating
the input channels with the coefficients in matrix
[i] and taking the sum
of the results.
Parameters
buffer |
||
from_position |
the channel positions of the source. |
[array length=from_channels] |
from_channels |
The number of channels of the source |
|
to_position |
the channel positions of the destination. |
[array length=to_channels] |
to_channels |
The number of channels of the destination |
|
matrix |
The matrix coefficients. |
gst_buffer_get_audio_downmix_meta()
#define gst_buffer_get_audio_downmix_meta(b) ((GstAudioDownmixMeta*)gst_buffer_get_meta((b), GST_AUDIO_DOWNMIX_META_API_TYPE))
gst_buffer_get_audio_downmix_meta_for_channels ()
GstAudioDownmixMeta * gst_buffer_get_audio_downmix_meta_for_channels (GstBuffer *buffer
,const GstAudioChannelPosition *to_position
,gint to_channels
);
Find the GstAudioDownmixMeta on buffer
for the given destination
channel positions.
gst_buffer_add_audio_clipping_meta ()
GstAudioClippingMeta * gst_buffer_add_audio_clipping_meta (GstBuffer *buffer
,GstFormat format
,guint64 start
,guint64 end
);
Attaches GstAudioClippingMeta metadata to buffer
with the given parameters.
Parameters
buffer |
||
format |
GstFormat of |
|
start |
Amount of audio to clip from start of buffer |
|
end |
Amount of to clip from end of buffer |
Since: 1.8
Types and Values
struct GstAudioDownmixMeta
struct GstAudioDownmixMeta { GstMeta meta; GstAudioChannelPosition *from_position; GstAudioChannelPosition *to_position; gint from_channels, to_channels; gfloat **matrix; };
Extra buffer metadata describing audio downmixing matrix. This metadata is
attached to audio buffers and contains a matrix to downmix the buffer number
of channels to channels
.
matrix
is an two-dimensional array of to_channels
times from_channels
coefficients, i.e. the i-th output channels is constructed by multiplicating
the input channels with the coefficients in matrix
[i] and taking the sum
of the results.
Members
GstMeta |
parent GstMeta |
|
GstAudioChannelPosition * |
the channel positions of the source |
|
GstAudioChannelPosition * |
the channel positions of the destination |
|
gint |
the number of channels of the source |
|
gint |
the number of channels of the destination |
|
gfloat ** |
the matrix coefficients. |
struct GstAudioClippingMeta
struct GstAudioClippingMeta { GstMeta meta; GstFormat format; guint64 start; guint64 end; };
Extra buffer metadata describing how much audio has to be clipped from the start or end of a buffer. This is used for compressed formats, where the first frame usually has some additional samples due to encoder and decoder delays, and the last frame usually has some additional samples to be able to fill the complete last frame.
This is used to ensure that decoded data in the end has the same amount of samples, and multiply decoded streams can be gaplessly concatenated.
Note: If clipping of the start is done by adjusting the segment, this meta has to be dropped from buffers as otherwise clipping could happen twice.
Since: 1.8