Class GstAudio
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
Maximum range of allowed channels, for use in template caps strings.static final String
GstAudioDitherMethod
, The dither method to use when changing bit depth.static final String
Threshold for the output bit depth at/below which to apply dithering.static final String
GST_TYPE_LIST
, The channel mapping matrix.static final String
GstAudioNoiseShapingMethod
, The noise shaping method to use to mask noise from quantization errors.static final String
G_TYPE_UINT
, The quantization amount.static final String
GstAudioResamplerMethod
, The resampler method to use when changing sample rates.static final int
Default maximum number of errors tolerated before signaling error.static final String
The name of the templates for the sink pad.static final String
The name of the templates for the source pad.static final int
Standard number of channels used in consumer audio.static final String
Standard format used in consumer audio.static final int
Standard sampling rate used in consumer audio.static final String
the name of the templates for the sink padstatic final String
the name of the templates for the source padstatic final String
List of all audio formats, for use in template caps strings.static final String
Maximum range of allowed sample rates, for use in template caps strings.static final String
G_TYPE_DOUBLE, B parameter of the cubic filter.static final String
G_TYPE_DOUBLE, C parameter of the cubic filter.static final String
G_TYPE_DOUBLE, Cutoff parameter for the filter.static final String
GST_TYPE_AUDIO_RESAMPLER_INTERPOLATION: how the filter coefficients should be interpolated.static final String
GST_TYPE_AUDIO_RESAMPLER_FILTER_MODE: how the filter tables should be constructed.static final String
G_TYPE_UINT: the amount of memory to use for full filter tables before switching to interpolated filter tables.static final String
G_TYPE_UINT, oversampling to use when interpolating filters 8 is the default.static final String
G_TYPE_DOUBLE: The maximum allowed phase error when switching sample rates.static final String
G_TYPE_INT: the number of taps to use for the filter.static final String
G_TYPE_DOUBLE, stopband attenuation in decibels.static final String
G_TYPE_DOUBLE, transition bandwidth.static final int
static final int
static final int
static final String
List of all DSD formats, for use in template caps strings.static final String
The GStreamer media type for DSD.static final int
Silence pattern for DSD data.static final String
This metadata stays relevant as long as channels are unchanged.static final String
This metadata stays relevant as long as sample rate is unchanged.static final String
This metadata is relevant for audio streams.static final String
This metadata stays relevant as long as the DSD plane offsets are unchanged. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic long
audioChannelGetFallbackMask
(int channels) Get the fallback channel-mask for the given number of channels.static boolean
audioChannelPositionsFromMask
(long channelMask, AudioChannelPosition[] position) Convert thechannels
present inchannelMask
to aposition
array (which should have at leastchannels
entries ensured by caller).static boolean
audioChannelPositionsToMask
(AudioChannelPosition[] position, boolean forceOrder, Out<Long> channelMask) Convert theposition
array ofchannels
channels to a bitmask.static String
audioChannelPositionsToString
(AudioChannelPosition[] position) Convertsposition
to a human-readable string representation for debugging purposes.static boolean
Reorders the channel positions inposition
from any order to the GStreamer channel order.static boolean
audioCheckValidChannelPositions
(AudioChannelPosition[] position, boolean forceOrder) Checks ifposition
contains valid channel positions forchannels
channels.static Type
static Type
static AudioFormat[]
Return all the raw audio formats supported by GStreamer.static boolean
audioGetChannelReorderMap
(AudioChannelPosition[] from, AudioChannelPosition[] to, int[] reorderMap) Returns a reorder map forfrom
toto
that can be used in custom channel reordering code, e.g.static int
Calculated the size of the buffer expected by gst_audio_iec61937_payload() for payloading type fromspec
.static boolean
audioIec61937Payload
(byte[] src, byte[] dst, AudioRingBufferSpec spec, int endianness) Payloadssrc
in the form specified by IEC 61937 for the type fromspec
and stores the result indst
.static Type
Return theGType
associated withGstAudioLevelMeta
.static Caps
audioMakeRawCaps
(@Nullable AudioFormat[] formats, AudioLayout layout) Return a generic raw audio caps for formats defined informats
.static Type
static boolean
audioReorderChannels
(byte[] data, AudioFormat format, AudioChannelPosition[] from, AudioChannelPosition[] to) Reordersdata
from the channel positionsfrom
to the channel positionsto
.static AudioClippingMeta
bufferAddAudioClippingMeta
(Buffer buffer, Format format, long start, long end) AttachesGstAudioClippingMeta
metadata tobuffer
with the given parameters.static AudioDownmixMeta
bufferAddAudioDownmixMeta
(Buffer buffer, AudioChannelPosition[] fromPosition, AudioChannelPosition[] toPosition, MemorySegment[] matrix) AttachesGstAudioDownmixMeta
metadata tobuffer
with the given parameters.static AudioLevelMeta
bufferAddAudioLevelMeta
(Buffer buffer, byte level, boolean voiceActivity) Attaches audio level information tobuffer
.static AudioMeta
bufferAddAudioMeta
(Buffer buffer, AudioInfo info, long samples, @Nullable MemorySegment offsets) Allocates and attaches aGstAudioMeta
onbuffer
, which must be writable for that purpose.static DsdPlaneOffsetMeta
bufferAddDsdPlaneOffsetMeta
(Buffer buffer, int numChannels, long numBytesPerChannel, @Nullable MemorySegment offsets) Allocates and attaches aGstDsdPlaneOffsetMeta
onbuffer
, which must be writable for that purpose.static AudioDownmixMeta
bufferGetAudioDownmixMetaForChannels
(Buffer buffer, AudioChannelPosition[] toPosition) Find theGstAudioDownmixMeta
onbuffer
for the given destination channel positions.static AudioLevelMeta
bufferGetAudioLevelMeta
(Buffer buffer) Find theGstAudioLevelMeta
onbuffer
.static void
dsdConvert
(MemorySegment inputData, MemorySegment outputData, DsdFormat inputFormat, DsdFormat outputFormat, AudioLayout inputLayout, AudioLayout outputLayout, MemorySegment inputPlaneOffsets, MemorySegment outputPlaneOffsets, long numDsdBytes, int numChannels, boolean reverseByteBits) Converts DSD data from one layout and grouping format to another.static Type
static void
-
Field Details
-
AUDIO_CHANNELS_RANGE
Maximum range of allowed channels, for use in template caps strings.- See Also:
-
AUDIO_CONVERTER_OPT_DITHER_METHOD
GstAudioDitherMethod
, The dither method to use when changing bit depth. Default isGST_AUDIO_DITHER_NONE
.- See Also:
-
AUDIO_CONVERTER_OPT_DITHER_THRESHOLD
Threshold for the output bit depth at/below which to apply dithering.Default is 20 bit.
- See Also:
-
AUDIO_CONVERTER_OPT_MIX_MATRIX
GST_TYPE_LIST
, The channel mapping matrix.The matrix coefficients must be between -1 and 1: the number of rows is equal to the number of output channels and the number of columns is equal to the number of input channels.
Example matrix generation code
To generate the matrix using code:GValue v = G_VALUE_INIT; GValue v2 = G_VALUE_INIT; GValue v3 = G_VALUE_INIT; g_value_init (&v2, GST_TYPE_ARRAY); g_value_init (&v3, G_TYPE_DOUBLE); g_value_set_double (&v3, 1); gst_value_array_append_value (&v2, &v3); g_value_unset (&v3); [ Repeat for as many double as your input channels - unset and reinit v3 ] g_value_init (&v, GST_TYPE_ARRAY); gst_value_array_append_value (&v, &v2); g_value_unset (&v2); [ Repeat for as many v2's as your output channels - unset and reinit v2] g_object_set_property (G_OBJECT (audiomixmatrix), "matrix", &v); g_value_unset (&v);
- See Also:
-
AUDIO_CONVERTER_OPT_NOISE_SHAPING_METHOD
GstAudioNoiseShapingMethod
, The noise shaping method to use to mask noise from quantization errors. Default isGST_AUDIO_NOISE_SHAPING_NONE
.- See Also:
-
AUDIO_CONVERTER_OPT_QUANTIZATION
G_TYPE_UINT
, The quantization amount. Components will be quantized to multiples of this value. Default is 1- See Also:
-
AUDIO_CONVERTER_OPT_RESAMPLER_METHOD
GstAudioResamplerMethod
, The resampler method to use when changing sample rates. Default isGST_AUDIO_RESAMPLER_METHOD_BLACKMAN_NUTTALL
.- See Also:
-
AUDIO_DECODER_MAX_ERRORS
public static final int AUDIO_DECODER_MAX_ERRORSDefault maximum number of errors tolerated before signaling error.- See Also:
-
AUDIO_DECODER_SINK_NAME
The name of the templates for the sink pad.- See Also:
-
AUDIO_DECODER_SRC_NAME
The name of the templates for the source pad.- See Also:
-
AUDIO_DEF_CHANNELS
public static final int AUDIO_DEF_CHANNELSStandard number of channels used in consumer audio.- See Also:
-
AUDIO_DEF_FORMAT
-
AUDIO_DEF_RATE
public static final int AUDIO_DEF_RATEStandard sampling rate used in consumer audio.- See Also:
-
AUDIO_ENCODER_SINK_NAME
the name of the templates for the sink pad- See Also:
-
AUDIO_ENCODER_SRC_NAME
the name of the templates for the source pad- See Also:
-
AUDIO_FORMATS_ALL
List of all audio formats, for use in template caps strings.Formats are sorted by decreasing "quality", using these criteria by priority:
- depth
- width
- Float > Signed > Unsigned
- native endianness preferred
- See Also:
-
AUDIO_RATE_RANGE
Maximum range of allowed sample rates, for use in template caps strings.- See Also:
-
AUDIO_RESAMPLER_OPT_CUBIC_B
G_TYPE_DOUBLE, B parameter of the cubic filter. Values between 0.0 and 2.0 are accepted. 1.0 is the default.Below are some values of popular filters: B C Hermite 0.0 0.0 Spline 1.0 0.0 Catmull-Rom 0.0 1/2
- See Also:
-
AUDIO_RESAMPLER_OPT_CUBIC_C
G_TYPE_DOUBLE, C parameter of the cubic filter. Values between 0.0 and 2.0 are accepted. 0.0 is the default.See
GST_AUDIO_RESAMPLER_OPT_CUBIC_B
for some more common values- See Also:
-
AUDIO_RESAMPLER_OPT_CUTOFF
G_TYPE_DOUBLE, Cutoff parameter for the filter. 0.940 is the default.- See Also:
-
AUDIO_RESAMPLER_OPT_FILTER_INTERPOLATION
GST_TYPE_AUDIO_RESAMPLER_INTERPOLATION: how the filter coefficients should be interpolated. GST_AUDIO_RESAMPLER_FILTER_INTERPOLATION_CUBIC is default.- See Also:
-
AUDIO_RESAMPLER_OPT_FILTER_MODE
GST_TYPE_AUDIO_RESAMPLER_FILTER_MODE: how the filter tables should be constructed. GST_AUDIO_RESAMPLER_FILTER_MODE_AUTO is the default.- See Also:
-
AUDIO_RESAMPLER_OPT_FILTER_MODE_THRESHOLD
G_TYPE_UINT: the amount of memory to use for full filter tables before switching to interpolated filter tables. 1048576 is the default.- See Also:
-
AUDIO_RESAMPLER_OPT_FILTER_OVERSAMPLE
G_TYPE_UINT, oversampling to use when interpolating filters 8 is the default.- See Also:
-
AUDIO_RESAMPLER_OPT_MAX_PHASE_ERROR
G_TYPE_DOUBLE: The maximum allowed phase error when switching sample rates. 0.1 is the default.- See Also:
-
AUDIO_RESAMPLER_OPT_N_TAPS
G_TYPE_INT: the number of taps to use for the filter. 0 is the default and selects the taps automatically.- See Also:
-
AUDIO_RESAMPLER_OPT_STOP_ATTENUATION
G_TYPE_DOUBLE, stopband attenuation in decibels. The attenuation after the stopband for the kaiser window. 85 dB is the default.- See Also:
-
AUDIO_RESAMPLER_OPT_TRANSITION_BANDWIDTH
G_TYPE_DOUBLE, transition bandwidth. The width of the transition band for the kaiser window. 0.087 is the default.- See Also:
-
AUDIO_RESAMPLER_QUALITY_DEFAULT
public static final int AUDIO_RESAMPLER_QUALITY_DEFAULT- See Also:
-
AUDIO_RESAMPLER_QUALITY_MAX
public static final int AUDIO_RESAMPLER_QUALITY_MAX- See Also:
-
AUDIO_RESAMPLER_QUALITY_MIN
public static final int AUDIO_RESAMPLER_QUALITY_MIN- See Also:
-
DSD_FORMATS_ALL
List of all DSD formats, for use in template caps strings.Big endian formats are preferred, since little-endian ones flip around the DSD bytes, and most DSD hardware uses big endian formats.
- See Also:
-
DSD_MEDIA_TYPE
-
DSD_SILENCE_PATTERN_BYTE
public static final int DSD_SILENCE_PATTERN_BYTESilence pattern for DSD data.In DSD, a nullbyte does not correspond to silence. To fill memory regions with "DSD silence", these regions must be filled with byte 0x69 instead (this is the DSD silence pattern). This constant provides that pattern in a more readable fashion.
- See Also:
-
META_TAG_AUDIO_CHANNELS_STR
This metadata stays relevant as long as channels are unchanged.- See Also:
-
META_TAG_AUDIO_RATE_STR
This metadata stays relevant as long as sample rate is unchanged.- See Also:
-
META_TAG_AUDIO_STR
This metadata is relevant for audio streams.- See Also:
-
META_TAG_DSD_PLANE_OFFSETS_STR
This metadata stays relevant as long as the DSD plane offsets are unchanged.- See Also:
-
-
Constructor Details
-
GstAudio
public GstAudio()
-
-
Method Details
-
javagi$ensureInitialized
public static void javagi$ensureInitialized() -
audioChannelGetFallbackMask
public static long audioChannelGetFallbackMask(int channels) Get the fallback channel-mask for the given number of channels.This function returns a reasonable fallback channel-mask and should be called as a last resort when the specific channel map is unknown.
- Parameters:
channels
- the number of channels- Returns:
- a fallback channel-mask for
channels
or 0 when there is no mask and mono.
-
audioChannelPositionsFromMask
public static boolean audioChannelPositionsFromMask(long channelMask, AudioChannelPosition[] position) Convert thechannels
present inchannelMask
to aposition
array (which should have at leastchannels
entries ensured by caller). IfchannelMask
is set to 0, it is considered as 'not present' for purpose of conversion. A partially validchannelMask
with less bits set than the number of channels is considered valid.- Parameters:
channelMask
- The input channel_maskposition
- TheGstAudioChannelPosition
<!-- -->s- Returns:
true
if channel and channel mask are valid and could be converted
-
audioChannelPositionsToMask
public static boolean audioChannelPositionsToMask(AudioChannelPosition[] position, boolean forceOrder, Out<Long> channelMask) Convert theposition
array ofchannels
channels to a bitmask.If
forceOrder
istrue
it additionally checks if the channels are in the order required by GStreamer.- Parameters:
position
- TheGstAudioChannelPositions
forceOrder
- Only consider the GStreamer channel order.channelMask
- the output channel mask- Returns:
true
if the channel positions are valid and could be converted.
-
audioChannelPositionsToString
Convertsposition
to a human-readable string representation for debugging purposes.- Parameters:
position
- TheGstAudioChannelPositions
to convert.- Returns:
- a newly allocated string representing
position
-
audioChannelPositionsToValidOrder
Reorders the channel positions inposition
from any order to the GStreamer channel order.- Parameters:
position
- The channel positions to reorder to.- Returns:
true
if the channel positions are valid and reordering was successful.
-
audioCheckValidChannelPositions
public static boolean audioCheckValidChannelPositions(AudioChannelPosition[] position, boolean forceOrder) Checks ifposition
contains valid channel positions forchannels
channels. IfforceOrder
istrue
it additionally checks if the channels are in the order required by GStreamer.- Parameters:
position
- TheGstAudioChannelPositions
to check.forceOrder
- Only consider the GStreamer channel order.- Returns:
true
if the channel positions are valid.
-
audioClippingMetaApiGetType
-
audioDownmixMetaApiGetType
-
audioFormatsRaw
Return all the raw audio formats supported by GStreamer.- Returns:
- an array of
GstAudioFormat
-
audioGetChannelReorderMap
public static boolean audioGetChannelReorderMap(AudioChannelPosition[] from, AudioChannelPosition[] to, int[] reorderMap) Returns a reorder map forfrom
toto
that can be used in custom channel reordering code, e.g. to convert from or to the GStreamer channel order.from
andto
must contain the same number of positions and the same positions, only in a different order.The resulting
reorderMap
can be used for reordering by assigning channel i of the input to channel reorder_map[i] of the output.- Parameters:
from
- The channel positions to reorder from.to
- The channel positions to reorder to.reorderMap
- Pointer to the reorder map.- Returns:
true
if the channel positions are valid and reordering is possible.
-
audioIec61937FrameSize
Calculated the size of the buffer expected by gst_audio_iec61937_payload() for payloading type fromspec
.- Parameters:
spec
- the ringbufer spec- Returns:
- the size or 0 if the given
type
is not supported or cannot be payloaded.
-
audioIec61937Payload
public static boolean audioIec61937Payload(byte[] src, byte[] dst, AudioRingBufferSpec spec, int endianness) Payloadssrc
in the form specified by IEC 61937 for the type fromspec
and stores the result indst
.src
must contain exactly one frame of data and the frame is not checked for errors.- Parameters:
src
- a buffer containing the data to payloaddst
- the destination buffer to store the payloaded contents in. Should not overlap withsrc
spec
- the ringbufer spec forsrc
endianness
- the expected byte order of the payloaded data- Returns:
- transfer-full:
true
if the payloading was successful,false
otherwise.
-
audioLevelMetaApiGetType
Return theGType
associated withGstAudioLevelMeta
.- Returns:
- a
GType
-
audioMakeRawCaps
Return a generic raw audio caps for formats defined informats
. Ifformats
isnull
returns a caps for all the supported raw audio formats, see gst_audio_formats_raw().- Parameters:
formats
- an array of rawGstAudioFormat
, ornull
layout
- the layout of audio samples- Returns:
- an audio
GstCaps
-
audioMetaApiGetType
-
audioReorderChannels
public static boolean audioReorderChannels(byte[] data, AudioFormat format, AudioChannelPosition[] from, AudioChannelPosition[] to) Reordersdata
from the channel positionsfrom
to the channel positionsto
.from
andto
must contain the same number of positions and the same positions, only in a different order.Note: this function assumes the audio data is in interleaved layout
- Parameters:
data
- The pointer to the memory.format
- TheGstAudioFormat
of the buffer.from
- The channel positions in the buffer.to
- The channel positions to convert to.- Returns:
true
if the reordering was possible.
-
bufferAddAudioClippingMeta
public static AudioClippingMeta bufferAddAudioClippingMeta(Buffer buffer, Format format, long start, long end) AttachesGstAudioClippingMeta
metadata tobuffer
with the given parameters.- Parameters:
buffer
- aGstBuffer
format
- GstFormat ofstart
andstop
, GST_FORMAT_DEFAULT is samplesstart
- Amount of audio to clip from start of bufferend
- Amount of to clip from end of buffer- Returns:
- the
GstAudioClippingMeta
onbuffer
.
-
bufferAddAudioDownmixMeta
public static AudioDownmixMeta bufferAddAudioDownmixMeta(Buffer buffer, AudioChannelPosition[] fromPosition, AudioChannelPosition[] toPosition, MemorySegment[] matrix) AttachesGstAudioDownmixMeta
metadata tobuffer
with the given parameters.matrix
is an two-dimensional array oftoChannels
timesfromChannels
coefficients, i.e. the i-th output channels is constructed by multiplicating the input channels with the coefficients inmatrix
[i] and taking the sum of the results.- Parameters:
buffer
- aGstBuffer
fromPosition
- the channel positions of the sourcetoPosition
- the channel positions of the destinationmatrix
- The matrix coefficients.- Returns:
- the
GstAudioDownmixMeta
onbuffer
.
-
bufferAddAudioLevelMeta
public static AudioLevelMeta bufferAddAudioLevelMeta(Buffer buffer, byte level, boolean voiceActivity) Attaches audio level information tobuffer
. (RFC 6464)- Parameters:
buffer
- aGstBuffer
level
- the -dBov from 0-127 (127 is silence).voiceActivity
- whether the buffer contains voice activity.- Returns:
- the
GstAudioLevelMeta
onbuffer
.
-
bufferAddAudioMeta
public static AudioMeta bufferAddAudioMeta(Buffer buffer, AudioInfo info, long samples, @Nullable @Nullable MemorySegment offsets) Allocates and attaches aGstAudioMeta
onbuffer
, which must be writable for that purpose. The fields of theGstAudioMeta
are directly populated from the arguments of this function.When
info
->layout isAudioLayout.NON_INTERLEAVED
andoffsets
isnull
, the offsets are calculated with a formula that assumes the planes are tightly packed and in sequence: offsetssamples * sample_stride It is not allowed for channels to overlap in memory, i.e. for each i in [0, channels), the range [@offsets[i
,offsets
[i] +samples
* sample_stride) must not overlap with any other such range. This function will assert if the parameters specified cause this restriction to be violated.It is, obviously, also not allowed to specify parameters that would cause out-of-bounds memory access on
buffer
. This is also checked, which means that you must add enough memory on thebuffer
before adding this meta.- Parameters:
buffer
- aGstBuffer
info
- the audio properties of the buffersamples
- the number of valid samples in the bufferoffsets
- the offsets (in bytes) where each channel plane starts in the buffer ornull
to calculate it (see below); must benull
also wheninfo
->layout isAudioLayout.INTERLEAVED
- Returns:
- the
GstAudioMeta
that was attached on thebuffer
-
bufferAddDsdPlaneOffsetMeta
public static DsdPlaneOffsetMeta bufferAddDsdPlaneOffsetMeta(Buffer buffer, int numChannels, long numBytesPerChannel, @Nullable @Nullable MemorySegment offsets) Allocates and attaches aGstDsdPlaneOffsetMeta
onbuffer
, which must be writable for that purpose. The fields of theGstDsdPlaneOffsetMeta
are directly populated from the arguments of this function.If
offsets
is NULL, then the meta's offsets field is left uninitialized. This is useful if for example offset values are to be calculated in the meta's offsets field in-place. Similarly,numBytesPerChannel
can be set to 0, but only ifoffsets
is NULL. This is useful if the number of bytes per channel is known only later.It is not allowed for channels to overlap in memory, i.e. for each i in [0, channels), the range
offsets[i
+numBytesPerChannel
) must not overlap with any other such range. This function will assert if the parameters specified cause this restriction to be violated.It is, obviously, also not allowed to specify parameters that would cause out-of-bounds memory access on
buffer
. This is also checked, which means that you must add enough memory on thebuffer
before adding this meta.This meta is only needed for non-interleaved (= planar) DSD data.
- Parameters:
buffer
- aGstBuffer
numChannels
- Number of channels in the DSD datanumBytesPerChannel
- Number of bytes per channeloffsets
- the offsets (in bytes) where each channel plane starts in the buffer- Returns:
- the
GstDsdPlaneOffsetMeta
that was attached on thebuffer
-
bufferGetAudioDownmixMetaForChannels
public static AudioDownmixMeta bufferGetAudioDownmixMetaForChannels(Buffer buffer, AudioChannelPosition[] toPosition) Find theGstAudioDownmixMeta
onbuffer
for the given destination channel positions.- Parameters:
buffer
- aGstBuffer
toPosition
- the channel positions of the destination- Returns:
- the
GstAudioDownmixMeta
onbuffer
.
-
bufferGetAudioLevelMeta
Find theGstAudioLevelMeta
onbuffer
.- Parameters:
buffer
- aGstBuffer
- Returns:
- the
GstAudioLevelMeta
ornull
when there is no such metadata onbuffer
.
-
dsdConvert
public static void dsdConvert(MemorySegment inputData, MemorySegment outputData, DsdFormat inputFormat, DsdFormat outputFormat, AudioLayout inputLayout, AudioLayout outputLayout, MemorySegment inputPlaneOffsets, MemorySegment outputPlaneOffsets, long numDsdBytes, int numChannels, boolean reverseByteBits) Converts DSD data from one layout and grouping format to another.numBytes
must be an integer multiple of the width of both input and output format. For example, if the input format is GST_DSD_FORMAT_U32LE, and the output format is GST_DSD_FORMAT_U16BE, thennumBytes
must be an integer multiple of both 4 (U32LE width) and 2 (U16BE width).reverseByteBits
is necessary if the bit order within the DSD bytes needs to be reversed. This is rarely necessary, and is not to be confused with the endianness of formats (which determines the ordering of *bytes*).inputPlaneOffsets
must not be NULL ifinputLayout
is set toGST_AUDIO_LAYOUT_NON_INTERLEAVED
. The same applies tooutputPlaneOffsets
. These plane offsets define the starting offset of the planes (there is exactly one plane per channel) withininputData
andoutputData
respectively. If GST_AUDIO_LAYOUT_INTERLEAVED is used, the plane offsets are ignored.- Parameters:
inputData
- the DSD format conversion's input sourceoutputData
- the DSD format conversion's output destinationinputFormat
- DSD format of the input data to convert fromoutputFormat
- DSD format of the output data to convert toinputLayout
- Input data layoutoutputLayout
- Output data layoutinputPlaneOffsets
- Plane offsets for non-interleaved input dataoutputPlaneOffsets
- Plane offsets for non-interleaved output datanumDsdBytes
- How many bytes with DSD data to convertnumChannels
- Number of channels (must be at least 1)reverseByteBits
- If TRUE, reverse the bits in each DSD byte
-
dsdPlaneOffsetMetaApiGetType
-