## GstDsdInfo

Information describing DSD audio properties.

In DSD, the "sample format" is the bit. Unlike PCM, there are no further "sample formats" in DSD. However, in software, DSD bits are grouped into bytes (since dealing with individual bits is impractical), and these bytes in turn are grouped into words. This becomes relevant when interleaving channels and transmitting DSD data through audio APIs. The different types of grouping DSD bytes are referred to as the "DSD grouping forma" or just "DSD format". GstDsdFormat has a list of valid ways of grouping DSD bytes into words.

DSD rates are equivalent to PCM sample rates, except that they specify how many DSD bytes are consumed per second. This refers to the bytes per second per channel; the rate does not change when the number of channel changes. (Strictly speaking, it would be more correct to measure the bits per second, since the bit is the DSD "sample format", but it is more practical to use bytes.) In DSD, bit rates are always an integer multiple of the CD audio rate (44100) or the DAT rate (48000). DSD64-44x is 44100 * 64 = 2822400 bits per second, or 352800 bytes per second (the latter would be used in this info structure). DSD64-48x is 48000 * 64 = 3072000 bits per second, or 384000 bytes per second. GST_DSD_MAKE_DSD_RATE_44x can be used for specifying DSD-44x rates, *and GST_DSD_MAKE_DSD_RATE_48x can be used for specifying DSD-48x ones. Also, since DSD-48x is less well known, when the multiplier is given without the 44x/48x specifier, 44x is typically implied.

It is important to know that in DSD, different format widths correspond to different playtimes. That is, a word with 32 DSD bits covers two times as much playtime as a word with 16 DSD bits. This is in contrast to PCM, where one word (= one PCM sample) always covers a time period of 1/samplerate, no matter how many bits a PCM sample is made of. For this reason, DSD and PCM widths and strides cannot be used the same way.

Multiple channels are arranged in DSD data either interleaved or non- interleaved. This is similar to PCM. Interleaved layouts rotate between channels and words. First, word 0 of channel 0 is present. Then word 0 of channel 1 follows. Then word 0 of channel 2 etc. until all channels are through, then comes word 1 of channel 0 etc.

Non-interleaved data is planar. First, all words of channel 0 are present, then all words of channel 1 etc. Unlike interleaved data, non-interleaved data can be sparse, that is, there can be space in between the planes. the positions array specifies the plane offsets.

In uncommon cases, the DSD bits in the data bytes can be stored in reverse order. For example, normally, in DSDU8, the first byte contains DSD bits 0 to 7, and the most significant bit of that byte is DSD bit 0. If this order is reversed, then bit 7 is the first one instead. In that ase, reversed_bytes is set to TRUE.

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

### Members

`format` (GstDsdFormat) –

DSD grouping format

`rate` (gint) –

DSD rate

`channels` (gint) –

number of channels (must be at least 1)

`layout` (GstAudioLayout) –

audio layout

`reversed_bytes` (gboolean) –

true if the DSD bits in the data bytes are reversed, that is, the least significant bit comes first

`positions` (GstAudioChannelPosition *) –

positions for each channel

`flags` (GstAudioFlags) –
No description available

Since : 1.24

## GstAudio.DsdInfo

Information describing DSD audio properties.

In DSD, the "sample format" is the bit. Unlike PCM, there are no further "sample formats" in DSD. However, in software, DSD bits are grouped into bytes (since dealing with individual bits is impractical), and these bytes in turn are grouped into words. This becomes relevant when interleaving channels and transmitting DSD data through audio APIs. The different types of grouping DSD bytes are referred to as the "DSD grouping forma" or just "DSD format". GstAudio.DsdFormat has a list of valid ways of grouping DSD bytes into words.

DSD rates are equivalent to PCM sample rates, except that they specify how many DSD bytes are consumed per second. This refers to the bytes per second per channel; the rate does not change when the number of channel changes. (Strictly speaking, it would be more correct to measure the bits per second, since the bit is the DSD "sample format", but it is more practical to use bytes.) In DSD, bit rates are always an integer multiple of the CD audio rate (44100) or the DAT rate (48000). DSD64-44x is 44100 * 64 = 2822400 bits per second, or 352800 bytes per second (the latter would be used in this info structure). DSD64-48x is 48000 * 64 = 3072000 bits per second, or 384000 bytes per second. GST_DSD_MAKE_DSD_RATE_44x (not introspectable) can be used for specifying DSD-44x rates, *and GST_DSD_MAKE_DSD_RATE_48x (not introspectable) can be used for specifying DSD-48x ones. Also, since DSD-48x is less well known, when the multiplier is given without the 44x/48x specifier, 44x is typically implied.

It is important to know that in DSD, different format widths correspond to different playtimes. That is, a word with 32 DSD bits covers two times as much playtime as a word with 16 DSD bits. This is in contrast to PCM, where one word (= one PCM sample) always covers a time period of 1/samplerate, no matter how many bits a PCM sample is made of. For this reason, DSD and PCM widths and strides cannot be used the same way.

Multiple channels are arranged in DSD data either interleaved or non- interleaved. This is similar to PCM. Interleaved layouts rotate between channels and words. First, word 0 of channel 0 is present. Then word 0 of channel 1 follows. Then word 0 of channel 2 etc. until all channels are through, then comes word 1 of channel 0 etc.

Non-interleaved data is planar. First, all words of channel 0 are present, then all words of channel 1 etc. Unlike interleaved data, non-interleaved data can be sparse, that is, there can be space in between the planes. the positions array specifies the plane offsets.

In uncommon cases, the DSD bits in the data bytes can be stored in reverse order. For example, normally, in DSDU8, the first byte contains DSD bits 0 to 7, and the most significant bit of that byte is DSD bit 0. If this order is reversed, then bit 7 is the first one instead. In that ase, reversed_bytes is set to TRUE.

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

### Members

`format` (GstAudio.DsdFormat) –

DSD grouping format

`rate` (Number) –

DSD rate

`channels` (Number) –

number of channels (must be at least 1)

`layout` (GstAudio.AudioLayout) –

audio layout

`reversed_bytes` (Number) –

true if the DSD bits in the data bytes are reversed, that is, the least significant bit comes first

`positions` ([ GstAudio.AudioChannelPosition ]) –

positions for each channel

`flags` (GstAudio.AudioFlags) –
No description available

Since : 1.24

## GstAudio.DsdInfo

Information describing DSD audio properties.

In DSD, the "sample format" is the bit. Unlike PCM, there are no further "sample formats" in DSD. However, in software, DSD bits are grouped into bytes (since dealing with individual bits is impractical), and these bytes in turn are grouped into words. This becomes relevant when interleaving channels and transmitting DSD data through audio APIs. The different types of grouping DSD bytes are referred to as the "DSD grouping forma" or just "DSD format". GstAudio.DsdFormat has a list of valid ways of grouping DSD bytes into words.

DSD rates are equivalent to PCM sample rates, except that they specify how many DSD bytes are consumed per second. This refers to the bytes per second per channel; the rate does not change when the number of channel changes. (Strictly speaking, it would be more correct to measure the bits per second, since the bit is the DSD "sample format", but it is more practical to use bytes.) In DSD, bit rates are always an integer multiple of the CD audio rate (44100) or the DAT rate (48000). DSD64-44x is 44100 * 64 = 2822400 bits per second, or 352800 bytes per second (the latter would be used in this info structure). DSD64-48x is 48000 * 64 = 3072000 bits per second, or 384000 bytes per second. GST_DSD_MAKE_DSD_RATE_44x (not introspectable) can be used for specifying DSD-44x rates, *and GST_DSD_MAKE_DSD_RATE_48x (not introspectable) can be used for specifying DSD-48x ones. Also, since DSD-48x is less well known, when the multiplier is given without the 44x/48x specifier, 44x is typically implied.

It is important to know that in DSD, different format widths correspond to different playtimes. That is, a word with 32 DSD bits covers two times as much playtime as a word with 16 DSD bits. This is in contrast to PCM, where one word (= one PCM sample) always covers a time period of 1/samplerate, no matter how many bits a PCM sample is made of. For this reason, DSD and PCM widths and strides cannot be used the same way.

Multiple channels are arranged in DSD data either interleaved or non- interleaved. This is similar to PCM. Interleaved layouts rotate between channels and words. First, word 0 of channel 0 is present. Then word 0 of channel 1 follows. Then word 0 of channel 2 etc. until all channels are through, then comes word 1 of channel 0 etc.

Non-interleaved data is planar. First, all words of channel 0 are present, then all words of channel 1 etc. Unlike interleaved data, non-interleaved data can be sparse, that is, there can be space in between the planes. the positions array specifies the plane offsets.

In uncommon cases, the DSD bits in the data bytes can be stored in reverse order. For example, normally, in DSDU8, the first byte contains DSD bits 0 to 7, and the most significant bit of that byte is DSD bit 0. If this order is reversed, then bit 7 is the first one instead. In that ase, reversed_bytes is set to TRUE.

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

### Members

`format` (GstAudio.DsdFormat) –

DSD grouping format

`rate` (int) –

DSD rate

`channels` (int) –

number of channels (must be at least 1)

`layout` (GstAudio.AudioLayout) –

audio layout

`reversed_bytes` (bool) –

true if the DSD bits in the data bytes are reversed, that is, the least significant bit comes first

`positions` ([ GstAudio.AudioChannelPosition ]) –

positions for each channel

`flags` (GstAudio.AudioFlags) –
No description available

Since : 1.24

### Constructors

#### gst_dsd_info_new

    GstDsdInfo *
    gst_dsd_info_new ()

Allocate a new GstDsdInfo that is also initialized with gst_dsd_info_init.

Returns –

a new GstDsdInfo. free with gst_dsd_info_free.

Since : 1.24

#### GstAudio.DsdInfo.prototype.new

    function GstAudio.DsdInfo.prototype.new(): {
        // javascript wrapper for 'gst_dsd_info_new'
    }

Allocate a new GstAudio.DsdInfo that is also initialized with GstAudio.prototype.dsd_info_init.

Returns (GstAudio.DsdInfo) –

a new GstAudio.DsdInfo. free with GstAudio.DsdInfo.prototype.free.

Since : 1.24

#### GstAudio.DsdInfo.new

    def GstAudio.DsdInfo.new ():
        #python wrapper for 'gst_dsd_info_new'

Allocate a new GstAudio.DsdInfo that is also initialized with GstAudio.dsd_info_init.

Returns (GstAudio.DsdInfo) –

a new GstAudio.DsdInfo. free with GstAudio.DsdInfo.free.

Since : 1.24

#### gst_dsd_info_new_from_caps

    GstDsdInfo *
    gst_dsd_info_new_from_caps (const GstCaps * caps)

Parse caps to generate a GstDsdInfo.

Parameters:

`caps` –

a GstCaps

Returns –

A GstDsdInfo, or NULL if caps couldn't be parsed

Since : 1.24

#### GstAudio.DsdInfo.prototype.new_from_caps

    function GstAudio.DsdInfo.prototype.new_from_caps(caps: Gst.Caps): {
        // javascript wrapper for 'gst_dsd_info_new_from_caps'
    }

Parse caps to generate a GstAudio.DsdInfo.

Parameters:

`caps` (Gst.Caps) –

a Gst.Caps

Returns (GstAudio.DsdInfo) –

A GstAudio.DsdInfo, or NULL if caps couldn't be parsed

Since : 1.24

#### GstAudio.DsdInfo.new_from_caps

    def GstAudio.DsdInfo.new_from_caps (caps):
        #python wrapper for 'gst_dsd_info_new_from_caps'

Parse caps to generate a GstAudio.DsdInfo.

Parameters:

`caps` (Gst.Caps) –

a Gst.Caps

Returns (GstAudio.DsdInfo) –

A GstAudio.DsdInfo, or NULL if caps couldn't be parsed

Since : 1.24

### Methods

#### gst_dsd_info_copy

    GstDsdInfo *
    gst_dsd_info_copy (const GstDsdInfo * info)

Copy a GstDsdInfo structure.

Parameters:

`info` –

a GstDsdInfo

Returns –

a new GstDsdInfo. free with gst_dsd_info_free.

Since : 1.24

#### GstAudio.DsdInfo.prototype.copy

    function GstAudio.DsdInfo.prototype.copy(): {
        // javascript wrapper for 'gst_dsd_info_copy'
    }

Copy a GstDsdInfo structure.

Parameters:

`info` (GstAudio.DsdInfo) –

a GstAudio.DsdInfo

Returns (GstAudio.DsdInfo) –

a new GstAudio.DsdInfo. free with gst_dsd_info_free.

Since : 1.24

#### GstAudio.DsdInfo.copy

    def GstAudio.DsdInfo.copy (self):
        #python wrapper for 'gst_dsd_info_copy'

Copy a GstDsdInfo structure.

Parameters:

`info` (GstAudio.DsdInfo) –

a GstAudio.DsdInfo

Returns (GstAudio.DsdInfo) –

a new GstAudio.DsdInfo. free with gst_dsd_info_free.

Since : 1.24

#### gst_dsd_info_free

    gst_dsd_info_free (GstDsdInfo * info)

Free a GstDsdInfo structure previously allocated with gst_dsd_info_new or gst_dsd_info_copy.

Parameters:

`info` –

a GstDsdInfo

Since : 1.24

#### GstAudio.DsdInfo.prototype.free

    function GstAudio.DsdInfo.prototype.free(): {
        // javascript wrapper for 'gst_dsd_info_free'
    }

Free a GstDsdInfo structure previously allocated with GstAudio.DsdInfo.prototype.new or GstAudio.DsdInfo.prototype.copy.

Parameters:

`info` (GstAudio.DsdInfo) –

a GstAudio.DsdInfo

Since : 1.24

#### GstAudio.DsdInfo.free

    def GstAudio.DsdInfo.free (self):
        #python wrapper for 'gst_dsd_info_free'

Free a GstDsdInfo structure previously allocated with GstAudio.DsdInfo.new or GstAudio.DsdInfo.copy.

Parameters:

`info` (GstAudio.DsdInfo) –

a GstAudio.DsdInfo

Since : 1.24

#### gst_dsd_info_is_equal

    gboolean
    gst_dsd_info_is_equal (const GstDsdInfo * info,
                           const GstDsdInfo * other)

Compares two GstDsdInfo and returns whether they are equal or not

Parameters:

`info` –

a GstDsdInfo

`other` –

a GstDsdInfo

Returns –

TRUE if info and other are equal, else FALSE.

Since : 1.24

#### GstAudio.DsdInfo.prototype.is_equal

    function GstAudio.DsdInfo.prototype.is_equal(other: GstAudio.DsdInfo): {
        // javascript wrapper for 'gst_dsd_info_is_equal'
    }

Compares two GstAudio.DsdInfo and returns whether they are equal or not

Parameters:

`info` (GstAudio.DsdInfo) –

a GstAudio.DsdInfo

`other` (GstAudio.DsdInfo) –

a GstAudio.DsdInfo

Returns (Number) –

TRUE if info and other are equal, else FALSE.

Since : 1.24

#### GstAudio.DsdInfo.is_equal

    def GstAudio.DsdInfo.is_equal (self, other):
        #python wrapper for 'gst_dsd_info_is_equal'

Compares two GstAudio.DsdInfo and returns whether they are equal or not

Parameters:

`info` (GstAudio.DsdInfo) –

a GstAudio.DsdInfo

`other` (GstAudio.DsdInfo) –

a GstAudio.DsdInfo

Returns (bool) –

TRUE if info and other are equal, else FALSE.

Since : 1.24

#### gst_dsd_info_set_format

    gst_dsd_info_set_format (GstDsdInfo * info,
                             GstDsdFormat format,
                             gint rate,
                             gint channels,
                             const GstAudioChannelPosition * positions)

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

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

Parameters:

`info` –

a GstDsdInfo

`format` –

the format

`rate` –

the DSD rate

`channels` –

the number of channels

`positions` ( [arrayfixed-size=64][nullable]) –

the channel positions

Since : 1.24

#### GstAudio.DsdInfo.prototype.set_format

    function GstAudio.DsdInfo.prototype.set_format(format: GstAudio.DsdFormat, rate: Number, channels: Number, positions: [ GstAudio.AudioChannelPosition ]): {
        // javascript wrapper for 'gst_dsd_info_set_format'
    }

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

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

Parameters:

`info` (GstAudio.DsdInfo) –

a GstAudio.DsdInfo

`format` (GstAudio.DsdFormat) –

the format

`rate` (Number) –

the DSD rate

`channels` (Number) –

the number of channels

`positions` ([ GstAudio.AudioChannelPosition ]) –

the channel positions

Since : 1.24

#### GstAudio.DsdInfo.set_format

    def GstAudio.DsdInfo.set_format (self, format, rate, channels, positions):
        #python wrapper for 'gst_dsd_info_set_format'

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

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

Parameters:

`info` (GstAudio.DsdInfo) –

a GstAudio.DsdInfo

`format` (GstAudio.DsdFormat) –

the format

`rate` (int) –

the DSD rate

`channels` (int) –

the number of channels

`positions` ([ GstAudio.AudioChannelPosition ]) –

the channel positions

Since : 1.24

#### gst_dsd_info_to_caps

    GstCaps *
    gst_dsd_info_to_caps (const GstDsdInfo * info)

Convert the values of info into a GstCaps.

Parameters:

`info` –

a GstDsdInfo

Returns ( [transfer: full]) –

the new GstCaps containing the info of info.

Since : 1.24

#### GstAudio.DsdInfo.prototype.to_caps

    function GstAudio.DsdInfo.prototype.to_caps(): {
        // javascript wrapper for 'gst_dsd_info_to_caps'
    }

Convert the values of info into a Gst.Caps.

Parameters:

`info` (GstAudio.DsdInfo) –

a GstAudio.DsdInfo

Returns (Gst.Caps) –

the new Gst.Caps containing the info of info.

Since : 1.24

#### GstAudio.DsdInfo.to_caps

    def GstAudio.DsdInfo.to_caps (self):
        #python wrapper for 'gst_dsd_info_to_caps'

Convert the values of info into a Gst.Caps.

Parameters:

`info` (GstAudio.DsdInfo) –

a GstAudio.DsdInfo

Returns (Gst.Caps) –

the new Gst.Caps containing the info of info.

Since : 1.24

### Functions

#### gst_dsd_info_from_caps

    gboolean
    gst_dsd_info_from_caps (GstDsdInfo * info,
                            const GstCaps * caps)

Parse caps and update info.

Parameters:

`info` ( [out]) –

a GstDsdInfo

`caps` –

a GstCaps

Returns –

TRUE if caps could be parsed

Since : 1.24

#### GstAudio.prototype.dsd_info_from_caps

    function GstAudio.prototype.dsd_info_from_caps(caps: Gst.Caps): {
        // javascript wrapper for 'gst_dsd_info_from_caps'
    }

Parse caps and update info.

Parameters:

`caps` (Gst.Caps) –

a Gst.Caps

Returns a tuple made of:

(Number ) –

TRUE if caps could be parsed

`info` (GstAudio.DsdInfo ) –

TRUE if caps could be parsed

Since : 1.24

#### GstAudio.dsd_info_from_caps

    def GstAudio.dsd_info_from_caps (caps):
        #python wrapper for 'gst_dsd_info_from_caps'

Parse caps and update info.

Parameters:

`caps` (Gst.Caps) –

a Gst.Caps

Returns a tuple made of:

(bool ) –

TRUE if caps could be parsed

`info` (GstAudio.DsdInfo ) –

TRUE if caps could be parsed

Since : 1.24

#### gst_dsd_info_init

    gst_dsd_info_init (GstDsdInfo * info)

Initialize info with default values.

Parameters:

`info` ( [out]) –

a GstDsdInfo

Since : 1.24

#### GstAudio.prototype.dsd_info_init

    function GstAudio.prototype.dsd_info_init(): {
        // javascript wrapper for 'gst_dsd_info_init'
    }

Initialize info with default values.

Since : 1.24

#### GstAudio.dsd_info_init

    def GstAudio.dsd_info_init ():
        #python wrapper for 'gst_dsd_info_init'

Initialize info with default values.

Since : 1.24

## GstDsdPlaneOffsetMeta

Buffer metadata describing planar DSD contents in the buffer. This is not needed for interleaved DSD data, and is required for non-interleaved (= planar) data.

The different channels in offsets are always in the GStreamer channel order. Zero-copy channel reordering can be implemented by swapping the values in offsets.

It is not allowed for channels to overlap in memory, i.e. for each i in [0, channels), the range [@offsets[i], offsets[i] + num_bytes_per_channel) must not overlap with any other such range.

It is, however, allowed to have parts of the buffer memory unused, by using offsets and num_bytes_per_channel in such a way that leave gaps on it. This is used to implement zero-copy clipping in non-interleaved buffers.

Obviously, due to the above, it is not safe to infer the number of valid bytes from the size of the buffer. You should always use the num_bytes_per_channel variable of this metadata.

### Members

`meta` (GstMeta) –

parent GstMeta

`num_channels` (gint) –

number of channels in the DSD data

`num_bytes_per_channel` (gsize) –

the number of valid bytes per channel in the buffer

`offsets` (gsize*) –

the offsets (in bytes) where each channel plane starts in the buffer

Since : 1.24

## GstAudio.DsdPlaneOffsetMeta

Buffer metadata describing planar DSD contents in the buffer. This is not needed for interleaved DSD data, and is required for non-interleaved (= planar) data.

The different channels in offsets are always in the GStreamer channel order. Zero-copy channel reordering can be implemented by swapping the values in offsets.

It is not allowed for channels to overlap in memory, i.e. for each i in [0, channels), the range [@offsets[i], offsets[i] + num_bytes_per_channel) must not overlap with any other such range.

It is, however, allowed to have parts of the buffer memory unused, by using offsets and num_bytes_per_channel in such a way that leave gaps on it. This is used to implement zero-copy clipping in non-interleaved buffers.

Obviously, due to the above, it is not safe to infer the number of valid bytes from the size of the buffer. You should always use the num_bytes_per_channel variable of this metadata.

### Members

`meta` (Gst.Meta) –

parent Gst.Meta

`num_channels` (Number) –

number of channels in the DSD data

`num_bytes_per_channel` (Number) –

the number of valid bytes per channel in the buffer

`offsets` (Number) –

the offsets (in bytes) where each channel plane starts in the buffer

Since : 1.24

## GstAudio.DsdPlaneOffsetMeta

Buffer metadata describing planar DSD contents in the buffer. This is not needed for interleaved DSD data, and is required for non-interleaved (= planar) data.

The different channels in offsets are always in the GStreamer channel order. Zero-copy channel reordering can be implemented by swapping the values in offsets.

It is not allowed for channels to overlap in memory, i.e. for each i in [0, channels), the range [@offsets[i], offsets[i] + num_bytes_per_channel) must not overlap with any other such range.

It is, however, allowed to have parts of the buffer memory unused, by using offsets and num_bytes_per_channel in such a way that leave gaps on it. This is used to implement zero-copy clipping in non-interleaved buffers.

Obviously, due to the above, it is not safe to infer the number of valid bytes from the size of the buffer. You should always use the num_bytes_per_channel variable of this metadata.

### Members

`meta` (Gst.Meta) –

parent Gst.Meta

`num_channels` (int) –

number of channels in the DSD data

`num_bytes_per_channel` (int) –

the number of valid bytes per channel in the buffer

`offsets` (int) –

the offsets (in bytes) where each channel plane starts in the buffer

Since : 1.24

### Functions

#### gst_dsd_plane_offset_meta_get_info

    const GstMetaInfo *
    gst_dsd_plane_offset_meta_get_info ()

Returns –
No description available

#### GstAudio.prototype.dsd_plane_offset_meta_get_info

    function GstAudio.prototype.dsd_plane_offset_meta_get_info(): {
        // javascript wrapper for 'gst_dsd_plane_offset_meta_get_info'
    }

Returns (Gst.MetaInfo) –
No description available

#### GstAudio.dsd_plane_offset_meta_get_info

    def GstAudio.dsd_plane_offset_meta_get_info ():
        #python wrapper for 'gst_dsd_plane_offset_meta_get_info'

Returns (Gst.MetaInfo) –
No description available

## Functions

### gst_buffer_add_dsd_plane_offset_meta

    GstDsdPlaneOffsetMeta *
    gst_buffer_add_dsd_plane_offset_meta (GstBuffer * buffer,
                                          gint num_channels,
                                          gsize num_bytes_per_channel,
                                          gsize* offsets)

Allocates and attaches a GstDsdPlaneOffsetMeta on buffer, which must be writable for that purpose. The fields of the GstDsdPlaneOffsetMeta 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, num_bytes_per_channel can be set to 0, but only if offsets 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], offsets[i] + num_bytes_per_channel) 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 the buffer before adding this meta.

This meta is only needed for non-interleaved (= planar) DSD data.

Parameters:

`buffer` –

a GstBuffer

`num_channels` –

Number of channels in the DSD data

`num_bytes_per_channel` –

Number of bytes per channel

`offsets` ( [nullable]) –

the offsets (in bytes) where each channel plane starts in the buffer

Returns ( [transfer: none]) –

the GstDsdPlaneOffsetMeta that was attached on the buffer

Since : 1.24

### GstAudio.prototype.buffer_add_dsd_plane_offset_meta

    function GstAudio.prototype.buffer_add_dsd_plane_offset_meta(buffer: Gst.Buffer, num_channels: Number, num_bytes_per_channel: Number, offsets: Number): {
        // javascript wrapper for 'gst_buffer_add_dsd_plane_offset_meta'
    }

Allocates and attaches a GstAudio.DsdPlaneOffsetMeta on buffer, which must be writable for that purpose. The fields of the GstAudio.DsdPlaneOffsetMeta 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, num_bytes_per_channel can be set to 0, but only if offsets 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], offsets[i] + num_bytes_per_channel) 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 the buffer before adding this meta.

This meta is only needed for non-interleaved (= planar) DSD data.

Parameters:

`buffer` (Gst.Buffer) –

a Gst.Buffer

`num_channels` (Number) –

Number of channels in the DSD data

`num_bytes_per_channel` (Number) –

Number of bytes per channel

`offsets` (Number) –

the offsets (in bytes) where each channel plane starts in the buffer

Returns (GstAudio.DsdPlaneOffsetMeta) –

the GstAudio.DsdPlaneOffsetMeta that was attached on the buffer

Since : 1.24

### GstAudio.buffer_add_dsd_plane_offset_meta

    def GstAudio.buffer_add_dsd_plane_offset_meta (buffer, num_channels, num_bytes_per_channel, offsets):
        #python wrapper for 'gst_buffer_add_dsd_plane_offset_meta'

Allocates and attaches a GstAudio.DsdPlaneOffsetMeta on buffer, which must be writable for that purpose. The fields of the GstAudio.DsdPlaneOffsetMeta 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, num_bytes_per_channel can be set to 0, but only if offsets 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], offsets[i] + num_bytes_per_channel) 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 the buffer before adding this meta.

This meta is only needed for non-interleaved (= planar) DSD data.

Parameters:

`buffer` (Gst.Buffer) –

a Gst.Buffer

`num_channels` (int) –

Number of channels in the DSD data

`num_bytes_per_channel` (int) –

Number of bytes per channel

`offsets` (int) –

the offsets (in bytes) where each channel plane starts in the buffer

Returns (GstAudio.DsdPlaneOffsetMeta) –

the GstAudio.DsdPlaneOffsetMeta that was attached on the buffer

Since : 1.24

### gst_dsd_convert

    gst_dsd_convert (const guint8* input_data,
                     guint8* output_data,
                     GstDsdFormat input_format,
                     GstDsdFormat output_format,
                     GstAudioLayout input_layout,
                     GstAudioLayout output_layout,
                     const gsize* input_plane_offsets,
                     const gsize* output_plane_offsets,
                     gsize num_dsd_bytes,
                     gint num_channels,
                     gboolean reverse_byte_bits)

Converts DSD data from one layout and grouping format to another. num_bytes 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, then num_bytes must be an integer multiple of both 4 (U32LE width) and 2 (U16BE width).

reverse_byte_bits 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).

input_plane_offsets must not be NULL if input_layout is set to GST_AUDIO_LAYOUT_NON_INTERLEAVED. The same applies to output_plane_offsets. These plane offsets define the starting offset of the planes (there is exactly one plane per channel) within input_data and output_data respectively. If GST_AUDIO_LAYOUT_INTERLEAVED is used, the plane offsets are ignored.

Parameters:

`input_data` –

the DSD format conversion's input source

`output_data` –

the DSD format conversion's output destination

`input_format` –

DSD format of the input data to convert from

`output_format` –

DSD format of the output data to convert to

`input_layout` –

Input data layout

`output_layout` –

Output data layout

`input_plane_offsets` –

Plane offsets for non-interleaved input data

`output_plane_offsets` –

Plane offsets for non-interleaved output data

`num_dsd_bytes` –

How many bytes with DSD data to convert

`num_channels` –

Number of channels (must be at least 1)

`reverse_byte_bits` –

If TRUE, reverse the bits in each DSD byte

Since : 1.24

### GstAudio.prototype.dsd_convert

    function GstAudio.prototype.dsd_convert(input_data: Number, output_data: Number, input_format: GstAudio.DsdFormat, output_format: GstAudio.DsdFormat, input_layout: GstAudio.AudioLayout, output_layout: GstAudio.AudioLayout, input_plane_offsets: Number, output_plane_offsets: Number, num_dsd_bytes: Number, num_channels: Number, reverse_byte_bits: Number): {
        // javascript wrapper for 'gst_dsd_convert'
    }

Converts DSD data from one layout and grouping format to another. num_bytes 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, then num_bytes must be an integer multiple of both 4 (U32LE width) and 2 (U16BE width).

reverse_byte_bits 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).

input_plane_offsets must not be NULL if input_layout is set to GstAudio.AudioLayout.NON_INTERLEAVED. The same applies to output_plane_offsets. These plane offsets define the starting offset of the planes (there is exactly one plane per channel) within input_data and output_data respectively. If GST_AUDIO_LAYOUT_INTERLEAVED is used, the plane offsets are ignored.

Parameters:

`input_data` (Number) –

the DSD format conversion's input source

`output_data` (Number) –

the DSD format conversion's output destination

`input_format` (GstAudio.DsdFormat) –

DSD format of the input data to convert from

`output_format` (GstAudio.DsdFormat) –

DSD format of the output data to convert to

`input_layout` (GstAudio.AudioLayout) –

Input data layout

`output_layout` (GstAudio.AudioLayout) –

Output data layout

`input_plane_offsets` (Number) –

Plane offsets for non-interleaved input data

`output_plane_offsets` (Number) –

Plane offsets for non-interleaved output data

`num_dsd_bytes` (Number) –

How many bytes with DSD data to convert

`num_channels` (Number) –

Number of channels (must be at least 1)

`reverse_byte_bits` (Number) –

If TRUE, reverse the bits in each DSD byte

Since : 1.24

### GstAudio.dsd_convert

    def GstAudio.dsd_convert (input_data, output_data, input_format, output_format, input_layout, output_layout, input_plane_offsets, output_plane_offsets, num_dsd_bytes, num_channels, reverse_byte_bits):
        #python wrapper for 'gst_dsd_convert'

Converts DSD data from one layout and grouping format to another. num_bytes 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, then num_bytes must be an integer multiple of both 4 (U32LE width) and 2 (U16BE width).

reverse_byte_bits 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).

input_plane_offsets must not be NULL if input_layout is set to GstAudio.AudioLayout.NON_INTERLEAVED. The same applies to output_plane_offsets. These plane offsets define the starting offset of the planes (there is exactly one plane per channel) within input_data and output_data respectively. If GST_AUDIO_LAYOUT_INTERLEAVED is used, the plane offsets are ignored.

Parameters:

`input_data` (int) –

the DSD format conversion's input source

`output_data` (int) –

the DSD format conversion's output destination

`input_format` (GstAudio.DsdFormat) –

DSD format of the input data to convert from

`output_format` (GstAudio.DsdFormat) –

DSD format of the output data to convert to

`input_layout` (GstAudio.AudioLayout) –

Input data layout

`output_layout` (GstAudio.AudioLayout) –

Output data layout

`input_plane_offsets` (int) –

Plane offsets for non-interleaved input data

`output_plane_offsets` (int) –

Plane offsets for non-interleaved output data

`num_dsd_bytes` (int) –

How many bytes with DSD data to convert

`num_channels` (int) –

Number of channels (must be at least 1)

`reverse_byte_bits` (bool) –

If TRUE, reverse the bits in each DSD byte

Since : 1.24

### gst_dsd_plane_offset_meta_api_get_type

    GType
    gst_dsd_plane_offset_meta_api_get_type ()

Returns –
No description available

### GstAudio.prototype.dsd_plane_offset_meta_api_get_type

    function GstAudio.prototype.dsd_plane_offset_meta_api_get_type(): {
        // javascript wrapper for 'gst_dsd_plane_offset_meta_api_get_type'
    }

Returns (GObject.Type) –
No description available

### GstAudio.dsd_plane_offset_meta_api_get_type

    def GstAudio.dsd_plane_offset_meta_api_get_type ():
        #python wrapper for 'gst_dsd_plane_offset_meta_api_get_type'

Returns (GObject.Type) –
No description available

## Function Macros

### GST_DSD_CAPS_MAKE

    #define GST_DSD_CAPS_MAKE(format)                          \
      GST_DSD_MEDIA_TYPE ", "                                  \
      "format = (string) " format ", "                         \
      "rate = " GST_AUDIO_RATE_RANGE ", "                      \
      "layout = (string) { interleaved, non-interleaved }, "   \
      "reversed-bytes = (gboolean) { false, true }, "          \
      "channels = " GST_AUDIO_CHANNELS_RANGE

Generic caps string for DSD audio, for use in pad templates.

Parameters:

`format` –

string format that describes the DSD bits grouping, as string (e.g. "DSDU32BE", "DSDU8", etc.)

Since : 1.24

### GST_DSD_INFO_CHANNELS

    #define GST_DSD_INFO_CHANNELS(info)        ((info)->channels)

### GST_DSD_INFO_FORMAT

    #define GST_DSD_INFO_FORMAT(info)          ((info)->format)

### GST_DSD_INFO_IS_VALID

    #define GST_DSD_INFO_IS_VALID(i)           ((i)->format < GST_NUM_DSD_FORMATS && (i)->rate > 0 && (i)->channels > 0)

### GST_DSD_INFO_LAYOUT

    #define GST_DSD_INFO_LAYOUT(info)          ((info)->layout)

### GST_DSD_INFO_POSITION

    #define GST_DSD_INFO_POSITION(info,c)      ((info)->position[c])

### GST_DSD_INFO_RATE

    #define GST_DSD_INFO_RATE(info)            ((info)->rate)

### GST_DSD_INFO_REVERSED_BYTES

    #define GST_DSD_INFO_REVERSED_BYTES(info)  ((info)->reversed_bytes)

### GST_DSD_INFO_STRIDE

    #define GST_DSD_INFO_STRIDE(info)          (gst_dsd_format_get_width((info)->format) * (info)->channels)

Calculates the stride for a given GstDsdInfo.

Note that this is only useful if the info's audio layout is GST_AUDIO_LAYOUT_INTERLEAVED.

Since : 1.24

### GST_DSD_MAKE_DSD_RATE_44x

    #define GST_DSD_MAKE_DSD_RATE_44x(multiplier) \
        ((gint) ((gint64) multiplier) * 44100 / 8)

Calculates a valid DSD-44x rate (in bytes) from commonly used rate multiplier specifications like DSD64, DSD128 etc.

For example, to get the rate for DSD64-44x, use 64 as the multiplier argument.

Since : 1.24

### GST_DSD_MAKE_DSD_RATE_48x

    #define GST_DSD_MAKE_DSD_RATE_48x(multiplier) \
        ((gint) ((gint64) multiplier) * 48000 / 8)

Calculates a valid DSD-48x rate (in bytes) from commonly used rate multiplier specifications like DSD64, DSD128 etc.

For example, to get the rate for DSD64-48x, use 64 as the multiplier argument.

Since : 1.24

### gst_buffer_get_dsd_plane_offset_meta

    #define gst_buffer_get_dsd_plane_offset_meta(b) \
        ((GstDsdPlaneOffsetMeta*)gst_buffer_get_meta((b), GST_DSD_PLANE_OFFSET_META_API_TYPE))

## Constants

### GST_DSD_MEDIA_TYPE

    #define GST_DSD_MEDIA_TYPE    "audio/x-dsd"

The GStreamer media type for DSD.

Since : 1.24

### GstAudio.DSD_MEDIA_TYPE

The GStreamer media type for DSD.

Since : 1.24

### GstAudio.DSD_MEDIA_TYPE

The GStreamer media type for DSD.

Since : 1.24

### GST_DSD_PLANE_OFFSET_META_API_TYPE

    #define GST_DSD_PLANE_OFFSET_META_API_TYPE (gst_dsd_plane_offset_meta_api_get_type())

### GST_DSD_PLANE_OFFSET_META_INFO

    #define GST_DSD_PLANE_OFFSET_META_INFO (gst_dsd_plane_offset_meta_get_info())

### GST_DSD_SILENCE_PATTERN_BYTE

    #define GST_DSD_SILENCE_PATTERN_BYTE       (0x69)

Silence 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.

Since : 1.24

### GstAudio.DSD_SILENCE_PATTERN_BYTE

Silence 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.

Since : 1.24

### GstAudio.DSD_SILENCE_PATTERN_BYTE

Silence 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.

Since : 1.24

### GST_META_TAG_DSD_PLANE_OFFSETS_STR

    #define GST_META_TAG_DSD_PLANE_OFFSETS_STR "dsdplaneoffsets"

This metadata stays relevant as long as the DSD plane offsets are unchanged.

Since : 1.24

### GstAudio.META_TAG_DSD_PLANE_OFFSETS_STR

This metadata stays relevant as long as the DSD plane offsets are unchanged.

Since : 1.24

### GstAudio.META_TAG_DSD_PLANE_OFFSETS_STR

This metadata stays relevant as long as the DSD plane offsets are unchanged.

Since : 1.24

The results of the search are