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.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.
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.
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.
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
–
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:
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 None.
Parameters:
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
–
GstBadAudio.PlanarAudioAdapter.prototype.clear
function GstBadAudio.PlanarAudioAdapter.prototype.clear(): {
// javascript wrapper for 'gst_planar_audio_adapter_clear'
}
Removes all buffers from adapter.
Parameters:
GstBadAudio.PlanarAudioAdapter.clear
def GstBadAudio.PlanarAudioAdapter.clear (self):
#python wrapper for 'gst_planar_audio_adapter_clear'
Removes all buffers from adapter.
Parameters:
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.
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.
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.
gst_planar_audio_adapter_distance_from_discont
guint64 gst_planar_audio_adapter_distance_from_discont (GstPlanarAudioAdapter * adapter)
Parameters:
adapter
–
GstBadAudio.PlanarAudioAdapter.prototype.distance_from_discont
function GstBadAudio.PlanarAudioAdapter.prototype.distance_from_discont(): {
// javascript wrapper for 'gst_planar_audio_adapter_distance_from_discont'
}
Parameters:
GstBadAudio.PlanarAudioAdapter.distance_from_discont
def GstBadAudio.PlanarAudioAdapter.distance_from_discont (self):
#python wrapper for 'gst_planar_audio_adapter_distance_from_discont'
Parameters:
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
–
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:
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:
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.
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:
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:
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
–
nsamples
–
the number of samples to get
flags
–
hint the intended use of the returned buffer
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:
the number of samples to get
hint the intended use of the returned 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:
the number of samples to get
hint the intended use of the returned buffer
a Gst.Buffer containing the first nsamples of the adapter, or None 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
–
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:
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:
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.
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:
Returns a tuple made of:
The previously seen dts.
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:
Returns a tuple made of:
The previously seen dts.
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.
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:
Returns a tuple made of:
The previous seen offset.
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:
Returns a tuple made of:
The previous seen offset.
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.
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:
Returns a tuple made of:
The previously seen pts.
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:
Returns a tuple made of:
The previously seen pts.
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
–
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:
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:
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.
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.
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.
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
–
nsamples
–
the number of samples to take
flags
–
hint the intended use of the returned buffer
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:
the number of samples to take
hint the intended use of the returned 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:
the number of samples to take
hint the intended use of the returned buffer
a Gst.Buffer containing the first nsamples of the adapter, or None 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