Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mpc-hc/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2011-09-18 00:25:13 +0400
committerMichael Niedermayer <michaelni@gmx.at>2011-09-18 00:36:43 +0400
commit9a9ceb8776264c799ff9669ed7e287a5daaab564 (patch)
tree25748ff74acaa620aa627ed7797a87e986959f19 /libavformat/pcmdec.c
parent979bea13003ef489d95d2538ac2fb1c26c6f103b (diff)
parentd763fb7d47fdbd107ea65cdf511f2f21558f6610 (diff)
Merge remote-tracking branch 'qatar/master'
* qatar/master: lavfi: add select filter oggdec: fix out of bound write in the ogg demuxer movenc: create an alternate group for each media type lavd: add libcdio-paranoia input device for audio CD grabbing rawdec: refactor private option for raw video demuxers pcmdec: use unique classes for all pcm demuxers. rawdec: g722 is always 1 channel/16kHz Conflicts: Changelog configure doc/filters.texi libavdevice/avdevice.h libavfilter/avfilter.h libavfilter/vf_select.c tests/ref/lavf/mov Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat/pcmdec.c')
-rw-r--r--libavformat/pcmdec.c16
1 files changed, 15 insertions, 1 deletions
diff --git a/libavformat/pcmdec.c b/libavformat/pcmdec.c
index ab3b739ccb..676e3a19d1 100644
--- a/libavformat/pcmdec.c
+++ b/libavformat/pcmdec.c
@@ -22,6 +22,8 @@
#include "avformat.h"
#include "rawdec.h"
#include "pcm.h"
+#include "libavutil/log.h"
+#include "libavutil/opt.h"
#define RAW_SAMPLES 1024
@@ -46,7 +48,19 @@ static int raw_read_packet(AVFormatContext *s, AVPacket *pkt)
return ret;
}
+static const AVOption pcm_options[] = {
+ { "sample_rate", "", offsetof(RawAudioDemuxerContext, sample_rate), FF_OPT_TYPE_INT, {.dbl = 0}, 0, INT_MAX, AV_OPT_FLAG_DECODING_PARAM },
+ { "channels", "", offsetof(RawAudioDemuxerContext, channels), FF_OPT_TYPE_INT, {.dbl = 0}, 0, INT_MAX, AV_OPT_FLAG_DECODING_PARAM },
+ { NULL },
+};
+
#define PCMDEF(name, long_name, ext, codec) \
+static const AVClass name ## _demuxer_class = {\
+ .class_name = #name " demuxer",\
+ .item_name = av_default_item_name,\
+ .option = pcm_options,\
+ .version = LIBAVUTIL_VERSION_INT,\
+};\
AVInputFormat ff_pcm_ ## name ## _demuxer = {\
#name,\
NULL_IF_CONFIG_SMALL(long_name),\
@@ -59,7 +73,7 @@ AVInputFormat ff_pcm_ ## name ## _demuxer = {\
.flags= AVFMT_GENERIC_INDEX,\
.extensions = ext,\
.value = codec,\
- .priv_class = &ff_rawaudio_demuxer_class,\
+ .priv_class = &name ## _demuxer_class,\
};
PCMDEF(f64be, "PCM 64 bit floating-point big-endian format",