![]() |
![]() |
![]() |
GStreamer Base Plugins 0.10 Library Reference Manual | ![]() |
---|---|---|---|---|
#include <gst/audio/audio.h> enum GstAudioFieldFlag; #define GST_FRAMES_TO_CLOCK_TIME (frames, rate) #define GST_CLOCK_TIME_TO_FRAMES (clocktime, rate) #define GST_AUDIO_DEF_RATE #define GST_AUDIO_FLOAT_PAD_TEMPLATE_CAPS #define GST_AUDIO_FLOAT_STANDARD_PAD_TEMPLATE_CAPS #define GST_AUDIO_INT_PAD_TEMPLATE_CAPS #define GST_AUDIO_INT_STANDARD_PAD_TEMPLATE_CAPS int gst_audio_frame_byte_size (GstPad *pad); long gst_audio_frame_length (GstPad *pad, GstBuffer *buf); GstClockTime gst_audio_duration_from_pad_buffer (GstPad *pad, GstBuffer *buf); gboolean gst_audio_is_buffer_framed (GstPad *pad, GstBuffer *buf); void gst_audio_structure_set_int (GstStructure *structure, GstAudioFieldFlag flag);
typedef enum { GST_AUDIO_FIELD_RATE = (1 << 0), GST_AUDIO_FIELD_CHANNELS = (1 << 1), GST_AUDIO_FIELD_ENDIANNESS = (1 << 2), GST_AUDIO_FIELD_WIDTH = (1 << 3), GST_AUDIO_FIELD_DEPTH = (1 << 4), GST_AUDIO_FIELD_SIGNED = (1 << 5), } GstAudioFieldFlag;
Do not use anymore. Deprecated: use gst_structure_set() directly
#define GST_FRAMES_TO_CLOCK_TIME(frames, rate)
Calculate clocktime from sample frames and rate.
frames : | sample frames |
rate : | sampling rate |
#define GST_CLOCK_TIME_TO_FRAMES(clocktime, rate)
Calculate frames from clocktime and sample rate.
clocktime : | clock time |
rate : | sampling rate |
int gst_audio_frame_byte_size (GstPad *pad);
Calculate byte size of an audio frame.
pad : | the GstPad to get the caps from |
Returns : | the byte size, or 0 if there was an error |
long gst_audio_frame_length (GstPad *pad, GstBuffer *buf);
Calculate length of buffer in frames.
pad : | the GstPad to get the caps from |
buf : | the GstBuffer |
Returns : | 0 if there's an error, or the number of frames if everything's ok |
GstClockTime gst_audio_duration_from_pad_buffer (GstPad *pad, GstBuffer *buf);
Calculate length in nanoseconds of audio buffer buf based on capabilities of pad.
Return: the length.
pad : | the GstPad to get the caps from |
buf : | the GstBuffer |
Returns : |
gboolean gst_audio_is_buffer_framed (GstPad *pad, GstBuffer *buf);
Check if the buffer size is a whole multiple of the frame size.
pad : | the GstPad to get the caps from |
buf : | the GstBuffer |
Returns : | TRUE if buffer size is multiple. |
void gst_audio_structure_set_int (GstStructure *structure, GstAudioFieldFlag flag);
Do not use anymore. Deprecated: use gst_structure_set()
structure : | a GstStructure |
flag : | a set of GstAudioFieldFlag |