RingBuffer
Object Hierarchy:
Gst.Audio.RingBuffer
Gst.Audio.RingBuffer
Gst.Audio.RingBuffer
Gst.Object
Gst.Object
Gst.Object->Gst.Audio.RingBuffer
GLib.InitiallyUnowned
GLib.InitiallyUnowned
GLib.InitiallyUnowned->Gst.Object
GLib.Object
GLib.Object
GLib.Object->GLib.InitiallyUnowned
Description:
[ CCode ( type_id = "gst_audio_ring_buffer_get_type ()" ) ] [ GIR ( name = "AudioRingBuffer" ) ]public abstract class RingBuffer : Object
This object is the base class for audio ringbuffers used by the base audio source and sink classes.
The ringbuffer abstracts a circular buffer of data. One reader and one writer can operate on the data from different threads in a
lockfree manner. The base class is sufficiently flexible to be used as an abstraction for DMA based ringbuffers as well as a pure software
implementations.
Content:
Static methods:
Creation methods:
Methods:
public virtual bool acquire (RingBufferSpec spec)
Allocate the resources for the ringbuffer.
public virtual bool activate (bool active)
Activate this to start or stop
pulling data.
public void advance (uint advance)
Subclasses should call this function to notify the fact that
advance
segments are now processed by the device.
public void clear (int segment)
Clear the given segment of the buffer with silence samples.
public virtual void clear_all ()
Clear all samples from the ringbuffer.
public virtual bool close_device ()
Close the audio device associated with the ring buffer.
public virtual uint commit (ref uint64 sample, uint8 [] data, int out_samples, ref int accum)
Commit data.length
samples pointed to by data
to the ringbuffer this .
public bool convert (Format src_fmt, int64 src_val, Format dest_fmt, out int64 dest_val)
Convert src_val
in src_fmt
to the equivalent
value in dest_fmt
.
public virtual uint delay ()
Get the number of samples queued in the audio device.
public bool device_is_open ()
Checks the status of the device associated with the ring buffer.
public bool is_acquired ()
Check if the ringbuffer is acquired and ready to use.
public bool is_active ()
Check if this is activated.
public bool is_flushing ()
Check if this is flushing.
public void may_start (bool allowed)
Tell the ringbuffer that it is allowed to start playback when the
ringbuffer is filled with samples.
public virtual bool open_device ()
Open the audio device associated with the ring buffer.
public virtual bool pause ()
Pause processing samples from the ringbuffer.
public bool prepare_read (out int segment, out uint8 [] readptr)
Returns a pointer to memory where the data from segment segment
can be found.
public uint read (uint64 sample, uint8 [] data, out ClockTime timestamp)
Read data.length
samples from the ringbuffer into the
memory pointed to by data
.
public virtual bool release ()
Free the resources of the ringbuffer.
public virtual bool resume ()
public uint64 samples_done ()
Get the number of samples that were processed by the ringbuffer since
it was last started.
public void set_callback_full (owned RingBufferCallback ? cb)
Sets the given callback function on the buffer.
public void set_channel_positions (ChannelPosition [] position)
Tell the ringbuffer about the device's channel positions.
public void set_flushing (bool flushing)
Set the ringbuffer to flushing mode or normal mode.
public void set_sample (uint64 sample)
Make sure that the next sample written to the device is accounted for
as being the sample
sample written to the device.
public void set_timestamp (int readseg, ClockTime timestamp)
public virtual bool start ()
Start processing samples from the ringbuffer.
public virtual bool stop ()
Stop processing samples from the ringbuffer.
Fields:
Inherited Members:
All known members inherited from class Gst.Object
@lock
@ref
add_control_binding
check_uniqueness
deep_notify
default_deep_notify
default_error
flags
get_control_binding
get_control_rate
get_g_value_array
get_name
get_parent
get_path_string
get_value
has_active_control_bindings
has_ancestor
has_as_ancestor
has_as_parent
name
parent
remove_control_binding
replace
set_control_binding_disabled
set_control_bindings_disabled
set_control_rate
set_name
set_parent
suggest_next_sync
sync_values
unparent
unref
All known members inherited from class GLib.Object
@get
@new
@ref
@set
add_toggle_ref
add_weak_pointer
bind_property
connect
constructed
disconnect
dispose
dup_data
dup_qdata
force_floating
freeze_notify
get_class
get_data
get_property
get_qdata
get_type
getv
interface_find_property
interface_install_property
interface_list_properties
is_floating
new_valist
new_with_properties
newv
notify
notify_property
ref_count
ref_sink
remove_toggle_ref
remove_weak_pointer
replace_data
replace_qdata
set_data
set_data_full
set_property
set_qdata
set_qdata_full
set_valist
setv
steal_data
steal_qdata
thaw_notify
unref
watch_closure
weak_ref
weak_unref