# GstPlanarAudioAdapter

This class is similar to GstAdapter, but it is made to work with non-interleaved (planar) audio buffers. Before using, an audio format must be configured with gst_planar_audio_adapter_configure

## GstPlanarAudioAdapter

    GObject
        ╰──GstPlanarAudioAdapter

The opaque GstPlanarAudioAdapter data structure.

### Class structure

#### GstPlanarAudioAdapterClass

### GstBadAudio.PlanarAudioAdapterClass

## GstBadAudio.PlanarAudioAdapter

    GObject.Object
        ╰──GstBadAudio.PlanarAudioAdapter

The opaque GstBadAudio.PlanarAudioAdapter data structure.

## GstBadAudio.PlanarAudioAdapter

    GObject.Object
        ╰──GstBadAudio.PlanarAudioAdapter

The opaque GstBadAudio.PlanarAudioAdapter data structure.

### Constructors

#### gst_planar_audio_adapter_new

    GstPlanarAudioAdapter *
    gst_planar_audio_adapter_new ()

Creates a new GstPlanarAudioAdapter. Free with g_object_unref.

Returns ( [transfer: full]) –

a new GstPlanarAudioAdapter

#### GstBadAudio.PlanarAudioAdapter.prototype.new

    function GstBadAudio.PlanarAudioAdapter.prototype.new(): {
        // javascript wrapper for 'gst_planar_audio_adapter_new'
    }

Creates a new GstBadAudio.PlanarAudioAdapter. Free with GObject.Object.prototype.unref.

Returns (GstBadAudio.PlanarAudioAdapter) –

a new GstBadAudio.PlanarAudioAdapter

#### GstBadAudio.PlanarAudioAdapter.new

    def GstBadAudio.PlanarAudioAdapter.new ():
        #python wrapper for 'gst_planar_audio_adapter_new'

Creates a new GstBadAudio.PlanarAudioAdapter. Free with GObject.Object.unref.

Returns (GstBadAudio.PlanarAudioAdapter) –

a new GstBadAudio.PlanarAudioAdapter

### Methods

#### gst_planar_audio_adapter_available

    gsize
    gst_planar_audio_adapter_available (GstPlanarAudioAdapter * adapter)

Gets the maximum amount of samples available, that is it returns the maximum value that can be supplied to gst_planar_audio_adapter_get_buffer without that function returning NULL.

Parameters:

`adapter` –

a GstPlanarAudioAdapter

Returns –

number of samples available in adapter

#### GstBadAudio.PlanarAudioAdapter.prototype.available

    function GstBadAudio.PlanarAudioAdapter.prototype.available(): {
        // javascript wrapper for 'gst_planar_audio_adapter_available'
    }

Gets the maximum amount of samples available, that is it returns the maximum value that can be supplied to GstBadAudio.PlanarAudioAdapter.prototype.get_buffer without that function returning NULL.

Parameters:

`adapter` (GstBadAudio.PlanarAudioAdapter) –

a GstBadAudio.PlanarAudioAdapter

Returns (Number) –

number of samples available in adapter

#### GstBadAudio.PlanarAudioAdapter.available

    def GstBadAudio.PlanarAudioAdapter.available (self):
        #python wrapper for 'gst_planar_audio_adapter_available'

Gets the maximum amount of samples available, that is it returns the maximum value that can be supplied to GstBadAudio.PlanarAudioAdapter.get_buffer without that function returning NULL.

Parameters:

`adapter` (GstBadAudio.PlanarAudioAdapter) –

a GstBadAudio.PlanarAudioAdapter

Returns (int) –

number of samples available in adapter

#### gst_planar_audio_adapter_clear

    gst_planar_audio_adapter_clear (GstPlanarAudioAdapter * adapter)

Removes all buffers from adapter.

Parameters:

`adapter` –

a GstPlanarAudioAdapter

#### GstBadAudio.PlanarAudioAdapter.prototype.clear

    function GstBadAudio.PlanarAudioAdapter.prototype.clear(): {
        // javascript wrapper for 'gst_planar_audio_adapter_clear'
    }

Removes all buffers from adapter.

Parameters:

`adapter` (GstBadAudio.PlanarAudioAdapter) –

a GstBadAudio.PlanarAudioAdapter

#### GstBadAudio.PlanarAudioAdapter.clear

    def GstBadAudio.PlanarAudioAdapter.clear (self):
        #python wrapper for 'gst_planar_audio_adapter_clear'

Removes all buffers from adapter.

Parameters:

`adapter` (GstBadAudio.PlanarAudioAdapter) –

a GstBadAudio.PlanarAudioAdapter

#### gst_planar_audio_adapter_configure

    gst_planar_audio_adapter_configure (GstPlanarAudioAdapter * adapter,
                                        const GstAudioInfo * info)

Sets up the adapter to handle audio data of the specified audio format. Note that this will internally clear the adapter and re-initialize it.

Parameters:

`adapter` –

a GstPlanarAudioAdapter

`info` –

a GstAudioInfo describing the format of the audio data

#### GstBadAudio.PlanarAudioAdapter.prototype.configure

    function GstBadAudio.PlanarAudioAdapter.prototype.configure(info: GstAudio.AudioInfo): {
        // javascript wrapper for 'gst_planar_audio_adapter_configure'
    }

Sets up the adapter to handle audio data of the specified audio format. Note that this will internally clear the adapter and re-initialize it.

Parameters:

`adapter` (GstBadAudio.PlanarAudioAdapter) –

a GstBadAudio.PlanarAudioAdapter

`info` (GstAudio.AudioInfo) –

a GstAudio.AudioInfo describing the format of the audio data

#### GstBadAudio.PlanarAudioAdapter.configure

    def GstBadAudio.PlanarAudioAdapter.configure (self, info):
        #python wrapper for 'gst_planar_audio_adapter_configure'

Sets up the adapter to handle audio data of the specified audio format. Note that this will internally clear the adapter and re-initialize it.

Parameters:

`adapter` (GstBadAudio.PlanarAudioAdapter) –

a GstBadAudio.PlanarAudioAdapter

`info` (GstAudio.AudioInfo) –

a GstAudio.AudioInfo describing the format of the audio data

#### gst_planar_audio_adapter_distance_from_discont

    guint64
    gst_planar_audio_adapter_distance_from_discont (GstPlanarAudioAdapter * adapter)

Parameters:

`adapter` –
No description available
Returns –
No description available

#### GstBadAudio.PlanarAudioAdapter.prototype.distance_from_discont

    function GstBadAudio.PlanarAudioAdapter.prototype.distance_from_discont(): {
        // javascript wrapper for 'gst_planar_audio_adapter_distance_from_discont'
    }

Parameters:

`adapter` (GstBadAudio.PlanarAudioAdapter) –
No description available
Returns (Number) –
No description available

#### GstBadAudio.PlanarAudioAdapter.distance_from_discont

    def GstBadAudio.PlanarAudioAdapter.distance_from_discont (self):
        #python wrapper for 'gst_planar_audio_adapter_distance_from_discont'

Parameters:

`adapter` (GstBadAudio.PlanarAudioAdapter) –
No description available
Returns (int) –
No description available

#### gst_planar_audio_adapter_dts_at_discont

    GstClockTime
    gst_planar_audio_adapter_dts_at_discont (GstPlanarAudioAdapter * adapter)

Get the DTS that was on the last buffer with the GST_BUFFER_FLAG_DISCONT flag, or GST_CLOCK_TIME_NONE.

Parameters:

`adapter` –

a GstPlanarAudioAdapter

Returns –

The DTS at the last discont or GST_CLOCK_TIME_NONE.

#### GstBadAudio.PlanarAudioAdapter.prototype.dts_at_discont

    function GstBadAudio.PlanarAudioAdapter.prototype.dts_at_discont(): {
        // javascript wrapper for 'gst_planar_audio_adapter_dts_at_discont'
    }

Get the DTS that was on the last buffer with the GST_BUFFER_FLAG_DISCONT flag, or GST_CLOCK_TIME_NONE.

Parameters:

`adapter` (GstBadAudio.PlanarAudioAdapter) –

a GstBadAudio.PlanarAudioAdapter

Returns (Number) –

The DTS at the last discont or GST_CLOCK_TIME_NONE.

#### GstBadAudio.PlanarAudioAdapter.dts_at_discont

    def GstBadAudio.PlanarAudioAdapter.dts_at_discont (self):
        #python wrapper for 'gst_planar_audio_adapter_dts_at_discont'

Get the DTS that was on the last buffer with the GST_BUFFER_FLAG_DISCONT flag, or GST_CLOCK_TIME_NONE.

Parameters:

`adapter` (GstBadAudio.PlanarAudioAdapter) –

a GstBadAudio.PlanarAudioAdapter

Returns (int) –

The DTS at the last discont or GST_CLOCK_TIME_NONE.

#### gst_planar_audio_adapter_flush

    gst_planar_audio_adapter_flush (GstPlanarAudioAdapter * adapter,
                                    gsize to_flush)

Flushes the first to_flush samples in the adapter. The caller must ensure that at least this many samples are available.

Parameters:

`adapter` –

a GstPlanarAudioAdapter

`to_flush` –

the number of samples to flush

#### GstBadAudio.PlanarAudioAdapter.prototype.flush

    function GstBadAudio.PlanarAudioAdapter.prototype.flush(to_flush: Number): {
        // javascript wrapper for 'gst_planar_audio_adapter_flush'
    }

Flushes the first to_flush samples in the adapter. The caller must ensure that at least this many samples are available.

Parameters:

`adapter` (GstBadAudio.PlanarAudioAdapter) –

a GstBadAudio.PlanarAudioAdapter

`to_flush` (Number) –

the number of samples to flush

#### GstBadAudio.PlanarAudioAdapter.flush

    def GstBadAudio.PlanarAudioAdapter.flush (self, to_flush):
        #python wrapper for 'gst_planar_audio_adapter_flush'

Flushes the first to_flush samples in the adapter. The caller must ensure that at least this many samples are available.

Parameters:

`adapter` (GstBadAudio.PlanarAudioAdapter) –

a GstBadAudio.PlanarAudioAdapter

`to_flush` (int) –

the number of samples to flush

#### gst_planar_audio_adapter_get_buffer

    GstBuffer *
    gst_planar_audio_adapter_get_buffer (GstPlanarAudioAdapter * adapter,
                                         gsize nsamples,
                                         GstMapFlags flags)

Returns a GstBuffer containing the first nsamples of the adapter, but does not flush them from the adapter. Use gst_planar_audio_adapter_take_buffer for flushing at the same time.

The map flags can be used to give an optimization hint to this function. When the requested buffer is meant to be mapped only for reading, it might be possible to avoid copying memory in some cases.

Caller owns a reference to the returned buffer. gst_buffer_unref after usage.

Free-function: gst_buffer_unref

Parameters:

`adapter` –

a GstPlanarAudioAdapter

`nsamples` –

the number of samples to get

`flags` –

hint the intended use of the returned buffer

Returns ( [transfer: full][nullable]) –

a GstBuffer containing the first nsamples of the adapter, or NULL if nsamples samples are not available. gst_buffer_unref when no longer needed.

#### GstBadAudio.PlanarAudioAdapter.prototype.get_buffer

    function GstBadAudio.PlanarAudioAdapter.prototype.get_buffer(nsamples: Number, flags: Gst.MapFlags): {
        // javascript wrapper for 'gst_planar_audio_adapter_get_buffer'
    }

Returns a Gst.Buffer containing the first nsamples of the adapter, but does not flush them from the adapter. Use GstBadAudio.PlanarAudioAdapter.prototype.take_buffer for flushing at the same time.

The map flags can be used to give an optimization hint to this function. When the requested buffer is meant to be mapped only for reading, it might be possible to avoid copying memory in some cases.

Caller owns a reference to the returned buffer. gst_buffer_unref (not introspectable) after usage.

Free-function: gst_buffer_unref

Parameters:

`adapter` (GstBadAudio.PlanarAudioAdapter) –

a GstBadAudio.PlanarAudioAdapter

`nsamples` (Number) –

the number of samples to get

`flags` (Gst.MapFlags) –

hint the intended use of the returned buffer

Returns (Gst.Buffer) –

a Gst.Buffer containing the first nsamples of the adapter, or NULL if nsamples samples are not available. gst_buffer_unref (not introspectable) when no longer needed.

#### GstBadAudio.PlanarAudioAdapter.get_buffer

    def GstBadAudio.PlanarAudioAdapter.get_buffer (self, nsamples, flags):
        #python wrapper for 'gst_planar_audio_adapter_get_buffer'

Returns a Gst.Buffer containing the first nsamples of the adapter, but does not flush them from the adapter. Use GstBadAudio.PlanarAudioAdapter.take_buffer for flushing at the same time.

The map flags can be used to give an optimization hint to this function. When the requested buffer is meant to be mapped only for reading, it might be possible to avoid copying memory in some cases.

Caller owns a reference to the returned buffer. gst_buffer_unref (not introspectable) after usage.

Free-function: gst_buffer_unref

Parameters:

`adapter` (GstBadAudio.PlanarAudioAdapter) –

a GstBadAudio.PlanarAudioAdapter

`nsamples` (int) –

the number of samples to get

`flags` (Gst.MapFlags) –

hint the intended use of the returned buffer

Returns (Gst.Buffer) –

a Gst.Buffer containing the first nsamples of the adapter, or NULL if nsamples samples are not available. gst_buffer_unref (not introspectable) when no longer needed.

#### gst_planar_audio_adapter_offset_at_discont

    guint64
    gst_planar_audio_adapter_offset_at_discont (GstPlanarAudioAdapter * adapter)

Get the offset that was on the last buffer with the GST_BUFFER_FLAG_DISCONT flag, or GST_BUFFER_OFFSET_NONE.

Parameters:

`adapter` –

a GstPlanarAudioAdapter

Returns –

The offset at the last discont or GST_BUFFER_OFFSET_NONE.

#### GstBadAudio.PlanarAudioAdapter.prototype.offset_at_discont

    function GstBadAudio.PlanarAudioAdapter.prototype.offset_at_discont(): {
        // javascript wrapper for 'gst_planar_audio_adapter_offset_at_discont'
    }

Get the offset that was on the last buffer with the GST_BUFFER_FLAG_DISCONT flag, or GST_BUFFER_OFFSET_NONE.

Parameters:

`adapter` (GstBadAudio.PlanarAudioAdapter) –

a GstBadAudio.PlanarAudioAdapter

Returns (Number) –

The offset at the last discont or GST_BUFFER_OFFSET_NONE.

#### GstBadAudio.PlanarAudioAdapter.offset_at_discont

    def GstBadAudio.PlanarAudioAdapter.offset_at_discont (self):
        #python wrapper for 'gst_planar_audio_adapter_offset_at_discont'

Get the offset that was on the last buffer with the GST_BUFFER_FLAG_DISCONT flag, or GST_BUFFER_OFFSET_NONE.

Parameters:

`adapter` (GstBadAudio.PlanarAudioAdapter) –

a GstBadAudio.PlanarAudioAdapter

Returns (int) –

The offset at the last discont or GST_BUFFER_OFFSET_NONE.

#### gst_planar_audio_adapter_prev_dts

    GstClockTime
    gst_planar_audio_adapter_prev_dts (GstPlanarAudioAdapter * adapter,
                                       guint64* distance)

Get the dts that was before the current sample in the adapter. When distance is given, the amount of bytes between the dts and the current position is returned.

The dts is reset to GST_CLOCK_TIME_NONE and the distance is set to 0 when the adapter is first created or when it is cleared. This also means that before the first sample with a dts is removed from the adapter, the dts and distance returned are GST_CLOCK_TIME_NONE and 0 respectively.

Parameters:

`adapter` –

a GstPlanarAudioAdapter

`distance` ( [out][allow-none]) –

pointer to location for distance, or NULL

Returns –

The previously seen dts.

#### GstBadAudio.PlanarAudioAdapter.prototype.prev_dts

    function GstBadAudio.PlanarAudioAdapter.prototype.prev_dts(): {
        // javascript wrapper for 'gst_planar_audio_adapter_prev_dts'
    }

Get the dts that was before the current sample in the adapter. When distance is given, the amount of bytes between the dts and the current position is returned.

The dts is reset to GST_CLOCK_TIME_NONE and the distance is set to 0 when the adapter is first created or when it is cleared. This also means that before the first sample with a dts is removed from the adapter, the dts and distance returned are GST_CLOCK_TIME_NONE and 0 respectively.

Parameters:

`adapter` (GstBadAudio.PlanarAudioAdapter) –

a GstBadAudio.PlanarAudioAdapter

Returns a tuple made of:

(Number ) –

The previously seen dts.

`distance` (Number ) –

The previously seen dts.

#### GstBadAudio.PlanarAudioAdapter.prev_dts

    def GstBadAudio.PlanarAudioAdapter.prev_dts (self):
        #python wrapper for 'gst_planar_audio_adapter_prev_dts'

Get the dts that was before the current sample in the adapter. When distance is given, the amount of bytes between the dts and the current position is returned.

The dts is reset to GST_CLOCK_TIME_NONE and the distance is set to 0 when the adapter is first created or when it is cleared. This also means that before the first sample with a dts is removed from the adapter, the dts and distance returned are GST_CLOCK_TIME_NONE and 0 respectively.

Parameters:

`adapter` (GstBadAudio.PlanarAudioAdapter) –

a GstBadAudio.PlanarAudioAdapter

Returns a tuple made of:

(int ) –

The previously seen dts.

`distance` (int ) –

The previously seen dts.

#### gst_planar_audio_adapter_prev_offset

    guint64
    gst_planar_audio_adapter_prev_offset (GstPlanarAudioAdapter * adapter,
                                          guint64* distance)

Get the offset that was before the current sample in the adapter. When distance is given, the amount of samples between the offset and the current position is returned.

The offset is reset to GST_BUFFER_OFFSET_NONE and the distance is set to 0 when the adapter is first created or when it is cleared. This also means that before the first sample with an offset is removed from the adapter, the offset and distance returned are GST_BUFFER_OFFSET_NONE and 0 respectively.

Parameters:

`adapter` –

a GstPlanarAudioAdapter

`distance` ( [out][allow-none]) –

pointer to a location for distance, or NULL

Returns –

The previous seen offset.

#### GstBadAudio.PlanarAudioAdapter.prototype.prev_offset

    function GstBadAudio.PlanarAudioAdapter.prototype.prev_offset(): {
        // javascript wrapper for 'gst_planar_audio_adapter_prev_offset'
    }

Get the offset that was before the current sample in the adapter. When distance is given, the amount of samples between the offset and the current position is returned.

The offset is reset to GST_BUFFER_OFFSET_NONE and the distance is set to 0 when the adapter is first created or when it is cleared. This also means that before the first sample with an offset is removed from the adapter, the offset and distance returned are GST_BUFFER_OFFSET_NONE and 0 respectively.

Parameters:

`adapter` (GstBadAudio.PlanarAudioAdapter) –

a GstBadAudio.PlanarAudioAdapter

Returns a tuple made of:

(Number ) –

The previous seen offset.

`distance` (Number ) –

The previous seen offset.

#### GstBadAudio.PlanarAudioAdapter.prev_offset

    def GstBadAudio.PlanarAudioAdapter.prev_offset (self):
        #python wrapper for 'gst_planar_audio_adapter_prev_offset'

Get the offset that was before the current sample in the adapter. When distance is given, the amount of samples between the offset and the current position is returned.

The offset is reset to GST_BUFFER_OFFSET_NONE and the distance is set to 0 when the adapter is first created or when it is cleared. This also means that before the first sample with an offset is removed from the adapter, the offset and distance returned are GST_BUFFER_OFFSET_NONE and 0 respectively.

Parameters:

`adapter` (GstBadAudio.PlanarAudioAdapter) –

a GstBadAudio.PlanarAudioAdapter

Returns a tuple made of:

(int ) –

The previous seen offset.

`distance` (int ) –

The previous seen offset.

#### gst_planar_audio_adapter_prev_pts

    GstClockTime
    gst_planar_audio_adapter_prev_pts (GstPlanarAudioAdapter * adapter,
                                       guint64* distance)

Get the pts that was before the current sample in the adapter. When distance is given, the amount of samples between the pts and the current position is returned.

The pts is reset to GST_CLOCK_TIME_NONE and the distance is set to 0 when the adapter is first created or when it is cleared. This also means that before the first sample with a pts is removed from the adapter, the pts and distance returned are GST_CLOCK_TIME_NONE and 0 respectively.

Parameters:

`adapter` –

a GstPlanarAudioAdapter

`distance` ( [out][allow-none]) –

pointer to location for distance, or NULL

Returns –

The previously seen pts.

#### GstBadAudio.PlanarAudioAdapter.prototype.prev_pts

    function GstBadAudio.PlanarAudioAdapter.prototype.prev_pts(): {
        // javascript wrapper for 'gst_planar_audio_adapter_prev_pts'
    }

Get the pts that was before the current sample in the adapter. When distance is given, the amount of samples between the pts and the current position is returned.

The pts is reset to GST_CLOCK_TIME_NONE and the distance is set to 0 when the adapter is first created or when it is cleared. This also means that before the first sample with a pts is removed from the adapter, the pts and distance returned are GST_CLOCK_TIME_NONE and 0 respectively.

Parameters:

`adapter` (GstBadAudio.PlanarAudioAdapter) –

a GstBadAudio.PlanarAudioAdapter

Returns a tuple made of:

(Number ) –

The previously seen pts.

`distance` (Number ) –

The previously seen pts.

#### GstBadAudio.PlanarAudioAdapter.prev_pts

    def GstBadAudio.PlanarAudioAdapter.prev_pts (self):
        #python wrapper for 'gst_planar_audio_adapter_prev_pts'

Get the pts that was before the current sample in the adapter. When distance is given, the amount of samples between the pts and the current position is returned.

The pts is reset to GST_CLOCK_TIME_NONE and the distance is set to 0 when the adapter is first created or when it is cleared. This also means that before the first sample with a pts is removed from the adapter, the pts and distance returned are GST_CLOCK_TIME_NONE and 0 respectively.

Parameters:

`adapter` (GstBadAudio.PlanarAudioAdapter) –

a GstBadAudio.PlanarAudioAdapter

Returns a tuple made of:

(int ) –

The previously seen pts.

`distance` (int ) –

The previously seen pts.

#### gst_planar_audio_adapter_pts_at_discont

    GstClockTime
    gst_planar_audio_adapter_pts_at_discont (GstPlanarAudioAdapter * adapter)

Get the PTS that was on the last buffer with the GST_BUFFER_FLAG_DISCONT flag, or GST_CLOCK_TIME_NONE.

Parameters:

`adapter` –

a GstPlanarAudioAdapter

Returns –

The PTS at the last discont or GST_CLOCK_TIME_NONE.

#### GstBadAudio.PlanarAudioAdapter.prototype.pts_at_discont

    function GstBadAudio.PlanarAudioAdapter.prototype.pts_at_discont(): {
        // javascript wrapper for 'gst_planar_audio_adapter_pts_at_discont'
    }

Get the PTS that was on the last buffer with the GST_BUFFER_FLAG_DISCONT flag, or GST_CLOCK_TIME_NONE.

Parameters:

`adapter` (GstBadAudio.PlanarAudioAdapter) –

a GstBadAudio.PlanarAudioAdapter

Returns (Number) –

The PTS at the last discont or GST_CLOCK_TIME_NONE.

#### GstBadAudio.PlanarAudioAdapter.pts_at_discont

    def GstBadAudio.PlanarAudioAdapter.pts_at_discont (self):
        #python wrapper for 'gst_planar_audio_adapter_pts_at_discont'

Get the PTS that was on the last buffer with the GST_BUFFER_FLAG_DISCONT flag, or GST_CLOCK_TIME_NONE.

Parameters:

`adapter` (GstBadAudio.PlanarAudioAdapter) –

a GstBadAudio.PlanarAudioAdapter

Returns (int) –

The PTS at the last discont or GST_CLOCK_TIME_NONE.

#### gst_planar_audio_adapter_push

    gst_planar_audio_adapter_push (GstPlanarAudioAdapter * adapter,
                                   GstBuffer * buf)

Adds the data from buf to the data stored inside adapter and takes ownership of the buffer.

Parameters:

`adapter` –

a GstPlanarAudioAdapter

`buf` ( [transfer: full]) –

a GstBuffer to queue in the adapter

#### GstBadAudio.PlanarAudioAdapter.prototype.push

    function GstBadAudio.PlanarAudioAdapter.prototype.push(buf: Gst.Buffer): {
        // javascript wrapper for 'gst_planar_audio_adapter_push'
    }

Adds the data from buf to the data stored inside adapter and takes ownership of the buffer.

Parameters:

`adapter` (GstBadAudio.PlanarAudioAdapter) –

a GstBadAudio.PlanarAudioAdapter

`buf` (Gst.Buffer) –

a Gst.Buffer to queue in the adapter

#### GstBadAudio.PlanarAudioAdapter.push

    def GstBadAudio.PlanarAudioAdapter.push (self, buf):
        #python wrapper for 'gst_planar_audio_adapter_push'

Adds the data from buf to the data stored inside adapter and takes ownership of the buffer.

Parameters:

`adapter` (GstBadAudio.PlanarAudioAdapter) –

a GstBadAudio.PlanarAudioAdapter

`buf` (Gst.Buffer) –

a Gst.Buffer to queue in the adapter

#### gst_planar_audio_adapter_take_buffer

    GstBuffer *
    gst_planar_audio_adapter_take_buffer (GstPlanarAudioAdapter * adapter,
                                          gsize nsamples,
                                          GstMapFlags flags)

Returns a GstBuffer containing the first nsamples bytes of the adapter. The returned bytes will be flushed from the adapter.

See gst_planar_audio_adapter_get_buffer for more details.

Caller owns a reference to the returned buffer. gst_buffer_unref after usage.

Free-function: gst_buffer_unref

Parameters:

`adapter` –

a GstPlanarAudioAdapter

`nsamples` –

the number of samples to take

`flags` –

hint the intended use of the returned buffer

Returns ( [transfer: full][nullable]) –

a GstBuffer containing the first nsamples of the adapter, or NULL if nsamples samples are not available. gst_buffer_unref when no longer needed.

#### GstBadAudio.PlanarAudioAdapter.prototype.take_buffer

    function GstBadAudio.PlanarAudioAdapter.prototype.take_buffer(nsamples: Number, flags: Gst.MapFlags): {
        // javascript wrapper for 'gst_planar_audio_adapter_take_buffer'
    }

Returns a Gst.Buffer containing the first nsamples bytes of the adapter. The returned bytes will be flushed from the adapter.

See GstBadAudio.PlanarAudioAdapter.prototype.get_buffer for more details.

Caller owns a reference to the returned buffer. gst_buffer_unref (not introspectable) after usage.

Free-function: gst_buffer_unref

Parameters:

`adapter` (GstBadAudio.PlanarAudioAdapter) –

a GstBadAudio.PlanarAudioAdapter

`nsamples` (Number) –

the number of samples to take

`flags` (Gst.MapFlags) –

hint the intended use of the returned buffer

Returns (Gst.Buffer) –

a Gst.Buffer containing the first nsamples of the adapter, or NULL if nsamples samples are not available. gst_buffer_unref (not introspectable) when no longer needed.

#### GstBadAudio.PlanarAudioAdapter.take_buffer

    def GstBadAudio.PlanarAudioAdapter.take_buffer (self, nsamples, flags):
        #python wrapper for 'gst_planar_audio_adapter_take_buffer'

Returns a Gst.Buffer containing the first nsamples bytes of the adapter. The returned bytes will be flushed from the adapter.

See GstBadAudio.PlanarAudioAdapter.get_buffer for more details.

Caller owns a reference to the returned buffer. gst_buffer_unref (not introspectable) after usage.

Free-function: gst_buffer_unref

Parameters:

`adapter` (GstBadAudio.PlanarAudioAdapter) –

a GstBadAudio.PlanarAudioAdapter

`nsamples` (int) –

the number of samples to take

`flags` (Gst.MapFlags) –

hint the intended use of the returned buffer

Returns (Gst.Buffer) –

a Gst.Buffer containing the first nsamples of the adapter, or NULL if nsamples samples are not available. gst_buffer_unref (not introspectable) when no longer needed.

## Constants

### GST_TYPE_PLANAR_AUDIO_ADAPTER

    #define GST_TYPE_PLANAR_AUDIO_ADAPTER \
      (gst_planar_audio_adapter_get_type())

The results of the search are