-
public weak Buffer audio_buffer_clip (Buffer buffer, Segment segment, int rate, int frame_size)
Clip the the buffer to the given Segment
. After calling this function the caller does not own a reference to otherwise the clipped buffer is returned. If the buffer has
no timestamp, it is assumed to be inside the segment and is not clipped
-
public bool audio_check_channel_positions (AudioChannelPosition pos, uint channels)
This functions checks if the given channel positions are valid. Channel positions are valid if:
-
public List<Element> audio_default_registry_mixer_filter (AudioMixerFilterFunc filter_func, bool first)
Utility function to find audio mixer elements. Will traverse the default plugin registry in order of
plugin rank and find usable audio mixer elements. The caller may optionally fine-tune the selection by specifying a filter function.
element in the list by setting it to NULL state and calling unref
. After that the list itself should be freed using g_list_free.
-
public ClockTime audio_duration_from_pad_buffer (Pad pad, Buffer buf)
Calculate length in nanoseconds of audio buffer buf based on capabilities of
-
public AudioChannelPosition audio_fixate_channel_positions (Structure str)
Custom fixate function. Elements that implement some sort of channel conversion algorithm should use
this function for fixating on GstAudioChannelPosition properties. It will take care of equal channel positioning (left/right).
Caller g_frees the return value. The input properties may be (and are
supposed to be) unfixed. Note that this function is mostly a hack because we currently have no way to add default fixation functions
for new GTypes. set of AudioChannelPosition values.
-
public int audio_frame_byte_size (Pad pad)
Calculate byte size of an audio frame.
-
public long audio_frame_length (Pad pad, Buffer buf)
Calculate length of buffer in frames.
-
public AudioChannelPosition audio_get_channel_positions (Structure str)
Retrieves a number of (fixed!) audio channel positions from the provided
Structure and returns it as a newly allocated array. The caller
should g_free this array. The caller should also check that the members in
this Structure are indeed "fixed" before calling this function.
positions as provided in the given Structure. Returns NULL on
error.
-
public uint audio_iec61937_frame_size (RingBufferSpec spec)
-
public bool audio_iec61937_payload (uchar src, uint src_n, uchar dst, uint dst_n, RingBufferSpec spec)
-
public bool audio_is_buffer_framed (Pad pad, Buffer buf)
Check if the buffer size is a whole multiple of the frame size.
-
public void audio_set_caps_channel_positions_list (Caps caps, AudioChannelPosition pos, int num_positions)
Sets a (possibly non-fixed) list of possible audio channel positions (given in pos) on the given caps.
Each of the structures of the caps, after this function has been called, will contain a "channel-positions" field with an array.
Each value in the array will contain each of the values given in the pos array. Note that the size of the caps might be increased by
this, since each structure with a "channel- positions" field needs to have a fixed "channels" field. The input caps is not required
to have this.
-
public void audio_set_channel_positions (Structure str, AudioChannelPosition pos)
Adds a "channel-positions" field to the given
Structure, which will represent the channel positions as given in
the provided AudioChannelPosition array.
-
public void audio_set_structure_channel_positions_list (Structure str, AudioChannelPosition pos, int num_positions)
Sets a (possibly non-fixed) list of possible audio channel positions (given in pos) on the given
structure. The structure, after this function has been called, will contain a "channel-positions" field with an array of the size of
the "channels" field value in the given structure (note that this means that the channels field in the provided structure should be
fixed!). Each value in the array will contain each of the values given in the pos array.
-
public void audio_structure_set_int (Structure structure, AudioFieldFlag flag)
Do not use anymore.