mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 04:01:08 +00:00
gst-libs/gst/audio/gstringbuffer.*: Rename recently added buffer types to make more sense.
Original commit message from CVS: * gst-libs/gst/audio/gstringbuffer.c: (gst_ring_buffer_parse_caps): * gst-libs/gst/audio/gstringbuffer.h: Rename recently added buffer types to make more sense. * ext/alsa/gstalsasink.c: (alsasink_parse_spec), (gst_alsasink_write): Adapt for above API changes. Fixes bug #520523.
This commit is contained in:
parent
7b2c2c2dda
commit
15e209d20e
4 changed files with 25 additions and 12 deletions
10
ChangeLog
10
ChangeLog
|
@ -1,3 +1,13 @@
|
|||
2008-03-12 Michael Smith <msmith@fluendo.com>
|
||||
|
||||
* gst-libs/gst/audio/gstringbuffer.c: (gst_ring_buffer_parse_caps):
|
||||
* gst-libs/gst/audio/gstringbuffer.h:
|
||||
Rename recently added buffer types to make more sense.
|
||||
* ext/alsa/gstalsasink.c: (alsasink_parse_spec),
|
||||
(gst_alsasink_write):
|
||||
Adapt for above API changes.
|
||||
Fixes bug #520523.
|
||||
|
||||
2008-03-11 Sebastian Dröge <slomo@circular-chaos.org>
|
||||
|
||||
* win32/common/libgstnetbuffer.def:
|
||||
|
|
|
@ -645,12 +645,9 @@ alsasink_parse_spec (GstAlsaSink * alsa, GstRingBufferSpec * spec)
|
|||
case GST_BUFTYPE_MU_LAW:
|
||||
alsa->format = SND_PCM_FORMAT_MU_LAW;
|
||||
break;
|
||||
case GST_BUFTYPE_NONLINEAR:
|
||||
case GST_BUFTYPE_IEC958:
|
||||
alsa->format = SND_PCM_FORMAT_S16_BE;
|
||||
if (G_LIKELY (spec->format == GST_IEC958))
|
||||
alsa->iec958 = TRUE;
|
||||
else
|
||||
goto error;
|
||||
break;
|
||||
default:
|
||||
goto error;
|
||||
|
@ -888,8 +885,8 @@ gst_alsasink_write (GstAudioSink * asink, gpointer data, guint length)
|
|||
guint i;
|
||||
|
||||
GST_DEBUG_OBJECT (asink, "swapping bytes");
|
||||
for (i = 0; i < length; i += 2) {
|
||||
ptr[i / 2] = GUINT16_SWAP_LE_BE (ptr[i / 2]);
|
||||
for (i = 0; i < length / 2; i++) {
|
||||
ptr[i] = GUINT16_SWAP_LE_BE (ptr[i]);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -380,7 +380,7 @@ gst_ring_buffer_parse_caps (GstRingBufferSpec * spec, GstCaps * caps)
|
|||
if (!(gst_structure_get_int (structure, "rate", &spec->rate)))
|
||||
goto parse_error;
|
||||
|
||||
spec->type = GST_BUFTYPE_NONLINEAR;
|
||||
spec->type = GST_BUFTYPE_IEC958;
|
||||
spec->format = GST_IEC958;
|
||||
spec->width = 16;
|
||||
spec->depth = 16;
|
||||
|
@ -390,7 +390,7 @@ gst_ring_buffer_parse_caps (GstRingBufferSpec * spec, GstCaps * caps)
|
|||
if (!(gst_structure_get_int (structure, "rate", &spec->rate)))
|
||||
goto parse_error;
|
||||
|
||||
spec->type = GST_BUFTYPE_NONLINEAR;
|
||||
spec->type = GST_BUFTYPE_AC3;
|
||||
spec->format = GST_AC3;
|
||||
spec->width = 16;
|
||||
spec->depth = 16;
|
||||
|
|
|
@ -90,7 +90,10 @@ typedef enum {
|
|||
* @GST_BUFTYPE_IMA_ADPCM: samples in ima adpcm
|
||||
* @GST_BUFTYPE_MPEG: samples in mpeg audio format
|
||||
* @GST_BUFTYPE_GSM: samples in gsm format
|
||||
* @GST_BUFTYPE_NONLINEAR: samples in non linear format (ac3, ec3, dts, ...)
|
||||
* @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
|
||||
*
|
||||
* The format of the samples in the ringbuffer.
|
||||
*/
|
||||
|
@ -103,7 +106,10 @@ typedef enum
|
|||
GST_BUFTYPE_IMA_ADPCM,
|
||||
GST_BUFTYPE_MPEG,
|
||||
GST_BUFTYPE_GSM,
|
||||
GST_BUFTYPE_NONLINEAR
|
||||
GST_BUFTYPE_IEC958,
|
||||
GST_BUFTYPE_AC3,
|
||||
GST_BUFTYPE_EAC3,
|
||||
GST_BUFTYPE_DTS
|
||||
} GstBufferFormatType;
|
||||
|
||||
typedef enum
|
||||
|
@ -154,7 +160,7 @@ typedef enum
|
|||
GST_GSM,
|
||||
GST_IEC958,
|
||||
GST_AC3,
|
||||
GST_EC3,
|
||||
GST_EAC3,
|
||||
GST_DTS
|
||||
} GstBufferFormat;
|
||||
|
||||
|
|
Loading…
Reference in a new issue