GstAudioRingBufferCallback
GstAudioRingBufferSegState
GstAudioRingBufferState
-GstBufferFormatType
+GstAudioRingBufferFormatType
GST_AUDIO_RING_BUFFER_BROADCAST
GST_AUDIO_RING_BUFFER_GET_COND
alsa->iec958 = FALSE;
switch (spec->type) {
- case GST_BUFTYPE_RAW:
+ case GST_AUDIO_RING_BUFFER_FORMAT_TYPE_RAW:
switch (GST_AUDIO_INFO_FORMAT (&spec->info)) {
case GST_AUDIO_FORMAT_U8:
alsa->format = SND_PCM_FORMAT_U8;
goto error;
}
break;
- case GST_BUFTYPE_A_LAW:
+ case GST_AUDIO_RING_BUFFER_FORMAT_TYPE_A_LAW:
alsa->format = SND_PCM_FORMAT_A_LAW;
break;
- case GST_BUFTYPE_MU_LAW:
+ case GST_AUDIO_RING_BUFFER_FORMAT_TYPE_MU_LAW:
alsa->format = SND_PCM_FORMAT_MU_LAW;
break;
- case GST_BUFTYPE_IEC958:
+ case GST_AUDIO_RING_BUFFER_FORMAT_TYPE_IEC958:
alsa->format = SND_PCM_FORMAT_S16_BE;
alsa->iec958 = TRUE;
break;
alsa = GST_ALSA_SINK (asink);
- if (spec->type == GST_BUFTYPE_IEC958) {
+ if (spec->type == GST_AUDIO_RING_BUFFER_FORMAT_TYPE_IEC958) {
snd_pcm_close (alsa->handle);
alsa->handle = gst_alsa_open_iec958_pcm (GST_OBJECT (alsa));
if (G_UNLIKELY (!alsa->handle)) {
alsasrc_parse_spec (GstAlsaSrc * alsa, GstAudioRingBufferSpec * spec)
{
switch (spec->type) {
- case GST_BUFTYPE_RAW:
+ case GST_AUDIO_RING_BUFFER_FORMAT_TYPE_RAW:
switch (GST_AUDIO_INFO_FORMAT (&spec->info)) {
case GST_AUDIO_FORMAT_U8:
alsa->format = SND_PCM_FORMAT_U8;
goto error;
}
break;
- case GST_BUFTYPE_A_LAW:
+ case GST_AUDIO_RING_BUFFER_FORMAT_TYPE_A_LAW:
alsa->format = SND_PCM_FORMAT_A_LAW;
break;
- case GST_BUFTYPE_MU_LAW:
+ case GST_AUDIO_RING_BUFFER_FORMAT_TYPE_MU_LAW:
alsa->format = SND_PCM_FORMAT_MU_LAW;
break;
default:
gst_audio_iec61937_frame_size (const GstAudioRingBufferSpec * spec)
{
switch (spec->type) {
- case GST_BUFTYPE_AC3:
+ case GST_AUDIO_RING_BUFFER_FORMAT_TYPE_AC3:
return IEC61937_PAYLOAD_SIZE_AC3;
- case GST_BUFTYPE_EAC3:
+ case GST_AUDIO_RING_BUFFER_FORMAT_TYPE_EAC3:
/* Check that the parser supports /some/ alignment. Need to be less
* strict about this at checking time since the alignment is dynamically
* set at the moment. */
else
return 0;
- case GST_BUFTYPE_DTS:
+ case GST_AUDIO_RING_BUFFER_FORMAT_TYPE_DTS:
{
gint dts_frame_size = caps_get_int_field (spec->caps, "frame-size");
gint iec_frame_size = caps_get_int_field (spec->caps, "block-size") * 4;
return 0;
}
- case GST_BUFTYPE_MPEG:
+ case GST_AUDIO_RING_BUFFER_FORMAT_TYPE_MPEG:
{
int version, layer, channels, frames;
dst[three] = 0x1F;
switch (spec->type) {
- case GST_BUFTYPE_AC3:
+ case GST_AUDIO_RING_BUFFER_FORMAT_TYPE_AC3:
{
g_return_val_if_fail (src_n >= 6, FALSE);
break;
}
- case GST_BUFTYPE_EAC3:
+ case GST_AUDIO_RING_BUFFER_FORMAT_TYPE_EAC3:
{
if (g_str_equal (caps_get_string_field (spec->caps, "alignment"),
"iec61937"))
break;
}
- case GST_BUFTYPE_DTS:
+ case GST_AUDIO_RING_BUFFER_FORMAT_TYPE_DTS:
{
int blocksize = caps_get_int_field (spec->caps, "block-size");
break;
}
- case GST_BUFTYPE_MPEG:
+ case GST_AUDIO_RING_BUFFER_FORMAT_TYPE_MPEG:
{
int version, layer;
if (!gst_audio_info_from_caps (&info, caps))
goto parse_error;
- spec->type = GST_BUFTYPE_RAW;
+ spec->type = GST_AUDIO_RING_BUFFER_FORMAT_TYPE_RAW;
} else if (g_str_equal (mimetype, "audio/x-alaw")) {
/* extract the needed information from the cap */
if (!(gst_structure_get_int (structure, "rate", &info.rate) &&
gst_structure_get_int (structure, "channels", &info.channels)))
goto parse_error;
- spec->type = GST_BUFTYPE_A_LAW;
+ spec->type = GST_AUDIO_RING_BUFFER_FORMAT_TYPE_A_LAW;
info.bpf = info.channels;
} else if (g_str_equal (mimetype, "audio/x-mulaw")) {
/* extract the needed information from the cap */
gst_structure_get_int (structure, "channels", &info.channels)))
goto parse_error;
- spec->type = GST_BUFTYPE_MU_LAW;
+ spec->type = GST_AUDIO_RING_BUFFER_FORMAT_TYPE_MU_LAW;
info.bpf = info.channels;
} else if (g_str_equal (mimetype, "audio/x-iec958")) {
/* extract the needed information from the cap */
if (!(gst_structure_get_int (structure, "rate", &info.rate)))
goto parse_error;
- spec->type = GST_BUFTYPE_IEC958;
+ spec->type = GST_AUDIO_RING_BUFFER_FORMAT_TYPE_IEC958;
info.bpf = 4;
} else if (g_str_equal (mimetype, "audio/x-ac3")) {
/* extract the needed information from the cap */
if (!(gst_structure_get_int (structure, "rate", &info.rate)))
goto parse_error;
- spec->type = GST_BUFTYPE_AC3;
+ spec->type = GST_AUDIO_RING_BUFFER_FORMAT_TYPE_AC3;
info.bpf = 4;
} else if (g_str_equal (mimetype, "audio/x-eac3")) {
/* extract the needed information from the cap */
if (!(gst_structure_get_int (structure, "rate", &info.rate)))
goto parse_error;
- spec->type = GST_BUFTYPE_EAC3;
+ spec->type = GST_AUDIO_RING_BUFFER_FORMAT_TYPE_EAC3;
info.bpf = 16;
} else if (g_str_equal (mimetype, "audio/x-dts")) {
/* extract the needed information from the cap */
if (!(gst_structure_get_int (structure, "rate", &info.rate)))
goto parse_error;
- spec->type = GST_BUFTYPE_DTS;
+ spec->type = GST_AUDIO_RING_BUFFER_FORMAT_TYPE_DTS;
info.bpf = 4;
} else if (g_str_equal (mimetype, "audio/mpeg") &&
gst_structure_get_int (structure, "mpegaudioversion", &i) &&
if (!(gst_structure_get_int (structure, "rate", &info.rate)))
goto parse_error;
- spec->type = GST_BUFTYPE_MPEG;
+ spec->type = GST_AUDIO_RING_BUFFER_FORMAT_TYPE_MPEG;
info.bpf = 4;
} else {
goto parse_error;
g_free (buf->empty_seg);
buf->empty_seg = g_malloc (segsize);
- if (buf->spec.type == GST_BUFTYPE_RAW) {
+ if (buf->spec.type == GST_AUDIO_RING_BUFFER_FORMAT_TYPE_RAW) {
gst_audio_format_fill_silence (buf->spec.info.finfo, buf->empty_seg,
segsize);
} else {
} GstAudioRingBufferState;
/**
- * GstBufferFormatType:
- * @GST_BUFTYPE_RAW: samples in linear or float
- * @GST_BUFTYPE_MU_LAW: samples in mulaw
- * @GST_BUFTYPE_A_LAW: samples in alaw
- * @GST_BUFTYPE_IMA_ADPCM: samples in ima adpcm
- * @GST_BUFTYPE_MPEG: samples in mpeg audio (but not AAC) format
- * @GST_BUFTYPE_GSM: samples in gsm format
- * @GST_BUFTYPE_IEC958: samples in IEC958 frames (e.g. AC3)
- * @GST_BUFTYPE_AC3: samples in AC3 format
- * @GST_BUFTYPE_EAC3: samples in EAC3 format
- * @GST_BUFTYPE_DTS: samples in DTS format
- * @GST_BUFTYPE_MPEG2_AAC: samples in MPEG-2 AAC format
- * @GST_BUFTYPE_MPEG4_AAC: samples in MPEG-4 AAC format
+ * GstAudioRingBufferFormatType:
+ * @GST_AUDIO_RING_BUFFER_FORMAT_TYPE_RAW: samples in linear or float
+ * @GST_AUDIO_RING_BUFFER_FORMAT_TYPE_MU_LAW: samples in mulaw
+ * @GST_AUDIO_RING_BUFFER_FORMAT_TYPE_A_LAW: samples in alaw
+ * @GST_AUDIO_RING_BUFFER_FORMAT_TYPE_IMA_ADPCM: samples in ima adpcm
+ * @GST_AUDIO_RING_BUFFER_FORMAT_TYPE_MPEG: samples in mpeg audio (but not AAC) format
+ * @GST_AUDIO_RING_BUFFER_FORMAT_TYPE_GSM: samples in gsm format
+ * @GST_AUDIO_RING_BUFFER_FORMAT_TYPE_IEC958: samples in IEC958 frames (e.g. AC3)
+ * @GST_AUDIO_RING_BUFFER_FORMAT_TYPE_AC3: samples in AC3 format
+ * @GST_AUDIO_RING_BUFFER_FORMAT_TYPE_EAC3: samples in EAC3 format
+ * @GST_AUDIO_RING_BUFFER_FORMAT_TYPE_DTS: samples in DTS format
+ * @GST_AUDIO_RING_BUFFER_FORMAT_TYPE_MPEG2_AAC: samples in MPEG-2 AAC format
+ * @GST_AUDIO_RING_BUFFER_FORMAT_TYPE_MPEG4_AAC: samples in MPEG-4 AAC format
*
* The format of the samples in the ringbuffer.
*/
typedef enum
{
- GST_BUFTYPE_RAW,
- GST_BUFTYPE_MU_LAW,
- GST_BUFTYPE_A_LAW,
- GST_BUFTYPE_IMA_ADPCM,
- GST_BUFTYPE_MPEG,
- GST_BUFTYPE_GSM,
- GST_BUFTYPE_IEC958,
- GST_BUFTYPE_AC3,
- GST_BUFTYPE_EAC3,
- GST_BUFTYPE_DTS,
- GST_BUFTYPE_MPEG2_AAC,
- GST_BUFTYPE_MPEG4_AAC,
-} GstBufferFormatType;
+ GST_AUDIO_RING_BUFFER_FORMAT_TYPE_RAW,
+ GST_AUDIO_RING_BUFFER_FORMAT_TYPE_MU_LAW,
+ GST_AUDIO_RING_BUFFER_FORMAT_TYPE_A_LAW,
+ GST_AUDIO_RING_BUFFER_FORMAT_TYPE_IMA_ADPCM,
+ GST_AUDIO_RING_BUFFER_FORMAT_TYPE_MPEG,
+ GST_AUDIO_RING_BUFFER_FORMAT_TYPE_GSM,
+ GST_AUDIO_RING_BUFFER_FORMAT_TYPE_IEC958,
+ GST_AUDIO_RING_BUFFER_FORMAT_TYPE_AC3,
+ GST_AUDIO_RING_BUFFER_FORMAT_TYPE_EAC3,
+ GST_AUDIO_RING_BUFFER_FORMAT_TYPE_DTS,
+ GST_AUDIO_RING_BUFFER_FORMAT_TYPE_MPEG2_AAC,
+ GST_AUDIO_RING_BUFFER_FORMAT_TYPE_MPEG4_AAC
+} GstAudioRingBufferFormatType;
/**
* GstAudioRingBufferSpec:
GstCaps *caps; /* the caps of the buffer */
/* in/out */
- GstBufferFormatType type;
- GstAudioInfo info;
+ GstAudioRingBufferFormatType type;
+ GstAudioInfo info;
guint64 latency_time; /* the required/actual latency time, this is the
* actual the size of one segment and the