summaryrefslogtreecommitdiffstats
path: root/gst/wavparse
diff options
context:
space:
mode:
authorRonald S. Bultje <rbultje@ronald.bitfreak.net>2004-04-16 01:20:44 +0000
committerRonald S. Bultje <rbultje@ronald.bitfreak.net>2004-04-16 01:20:44 +0000
commit26fe995a13344eb94b444b6356192681df7e41d4 (patch)
tree29efb3fbf2b506f5eafc0df146e4a851dd18314b /gst/wavparse
parent9369abcfa0aaee7626751778e98743817a42258a (diff)
gst/: Add MS RLE support. I added some functions to read out strf chunks into strf chunks and the data behind it. Thi...
Original commit message from CVS: reviewed by: <delete if not using a buddy> * gst-libs/gst/riff/riff-media.c: (gst_riff_create_video_caps_with_data), (gst_riff_create_video_caps), (gst_riff_create_audio_caps), (gst_riff_create_video_template_caps), (gst_riff_create_audio_template_caps): * gst-libs/gst/riff/riff-media.h: * gst-libs/gst/riff/riff-read.c: (gst_riff_read_strf_vids_with_data), (gst_riff_read_strf_vids): * gst-libs/gst/riff/riff-read.h: * gst/avi/gstavidemux.c: (gst_avi_demux_add_stream): Add MS RLE support. I added some functions to read out strf chunks into strf chunks and the data behind it. This is usually color palettes (as in RLE, but also in 8-bit RGB). Also use those during caps creation. Lastly, add ADPCM (similar to wavparse - which should eventually be rifflib based). * gst/matroska/matroska-demux.c: (gst_matroska_demux_class_init), (gst_matroska_demux_init), (gst_matroska_demux_reset): * gst/matroska/matroska-demux.h: Remove placeholders for some prehistoric tagging system. Didn't add support for any tag system really anyway. * gst/qtdemux/qtdemux.c: Add support for audio/x-m4a (MPEG-4) through spider. * gst/wavparse/gstwavparse.c: (gst_wavparse_parse_fmt), (gst_wavparse_loop): ADPCM support (#135862). Increase max. buffer size because we cannot split buffers for ADPCM (screws references) and I've seen files with 2048 byte chunks. 4096 seems safe for now.
Diffstat (limited to 'gst/wavparse')
-rw-r--r--gst/wavparse/gstwavparse.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/gst/wavparse/gstwavparse.c b/gst/wavparse/gstwavparse.c
index ca43bc58..f24c9321 100644
--- a/gst/wavparse/gstwavparse.c
+++ b/gst/wavparse/gstwavparse.c
@@ -80,6 +80,10 @@ static GstStaticPadTemplate src_template_factory =
"rate = (int) [ 8000, 48000 ], "
"channels = (int) [ 1, 2 ]; "
"audio/x-mulaw, "
+ "rate = (int) [ 8000, 48000 ], " "channels = (int) [ 1, 2 ];"
+ "audio/x-adpcm, "
+ "layout = (string) microsoft, "
+ "block_align = (int) [ 1, 8192 ], "
"rate = (int) [ 8000, 48000 ], " "channels = (int) [ 1, 2 ]")
);
@@ -621,6 +625,14 @@ gst_wavparse_parse_fmt (GstWavParse * wavparse, guint size)
"channels", G_TYPE_INT, wavparse->channels, NULL);
break;
+ case GST_RIFF_WAVE_FORMAT_ADPCM:
+ caps = gst_caps_new_simple ("audio/x-adpcm",
+ "layout", G_TYPE_STRING, "microsoft",
+ "block_align", G_TYPE_INT, wavparse->bps,
+ "rate", G_TYPE_INT, wavparse->rate,
+ "channels", G_TYPE_INT, wavparse->channels, NULL);
+ break;
+
case GST_RIFF_WAVE_FORMAT_MPEGL12:
case GST_RIFF_WAVE_FORMAT_MPEGL3:{
int layer = (wavparse->format == GST_RIFF_WAVE_FORMAT_MPEGL12) ? 2 : 3;
@@ -716,7 +728,7 @@ gst_wavparse_loop (GstElement * element)
Does anyone care about streaming wavs?
FIXME: Should we have a decent buffer size? */
-#define MAX_BUFFER_SIZE 1024
+#define MAX_BUFFER_SIZE 4096
if (wavparse->dataleft > 0) {
desired = MIN (wavparse->dataleft, MAX_BUFFER_SIZE);