changeset 8586:d7d0cde5f308 libavcodec

Add dummy mp1_decoder to complement the existing dummy mp2/mp3 decoders.
author michael
date Tue, 13 Jan 2009 19:32:08 +0000
parents 2186f7c290dd
children b3f3d9ffab1c
files Makefile allcodecs.c mpegaudio_parser.c mpegaudiodec.c
diffstat 4 files changed, 19 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/Makefile	Tue Jan 13 19:13:08 2009 +0000
+++ b/Makefile	Tue Jan 13 19:32:08 2009 +0000
@@ -124,6 +124,7 @@
 OBJS-$(CONFIG_MLP_DECODER)             += mlpdec.o mlp_parser.o mlp.o
 OBJS-$(CONFIG_MMVIDEO_DECODER)         += mmvideo.o
 OBJS-$(CONFIG_MOTIONPIXELS_DECODER)    += motionpixels.o
+OBJS-$(CONFIG_MP1_DECODER)             += mpegaudiodec.o mpegaudiodecheader.o mpegaudio.o mpegaudiodata.o
 OBJS-$(CONFIG_MP2_DECODER)             += mpegaudiodec.o mpegaudiodecheader.o mpegaudio.o mpegaudiodata.o
 OBJS-$(CONFIG_MP2_ENCODER)             += mpegaudioenc.o mpegaudio.o mpegaudiodata.o
 OBJS-$(CONFIG_MP3_DECODER)             += mpegaudiodec.o mpegaudiodecheader.o mpegaudio.o mpegaudiodata.o
--- a/allcodecs.c	Tue Jan 13 19:13:08 2009 +0000
+++ b/allcodecs.c	Tue Jan 13 19:32:08 2009 +0000
@@ -189,6 +189,7 @@
     REGISTER_DECODER (MACE3, mace3);
     REGISTER_DECODER (MACE6, mace6);
     REGISTER_DECODER (MLP, mlp);
+    REGISTER_DECODER (MP1, mp1);
     REGISTER_ENCDEC  (MP2, mp2);
     REGISTER_DECODER (MP3, mp3);
     REGISTER_DECODER (MP3ADU, mp3adu);
--- a/mpegaudio_parser.c	Tue Jan 13 19:13:08 2009 +0000
+++ b/mpegaudio_parser.c	Tue Jan 13 19:32:08 2009 +0000
@@ -248,7 +248,7 @@
 
 
 AVCodecParser mpegaudio_parser = {
-    { CODEC_ID_MP2, CODEC_ID_MP3 },
+    { CODEC_ID_MP1, CODEC_ID_MP2, CODEC_ID_MP3 },
     sizeof(MpegAudioParseContext),
     mpegaudio_parse_init,
     mpegaudio_parse,
--- a/mpegaudiodec.c	Tue Jan 13 19:13:08 2009 +0000
+++ b/mpegaudiodec.c	Tue Jan 13 19:32:08 2009 +0000
@@ -2534,6 +2534,22 @@
 }
 #endif /* CONFIG_MP3ON4_DECODER */
 
+#ifdef CONFIG_MP1_DECODER
+AVCodec mp1_decoder =
+{
+    "mp1",
+    CODEC_TYPE_AUDIO,
+    CODEC_ID_MP1,
+    sizeof(MPADecodeContext),
+    decode_init,
+    NULL,
+    NULL,
+    decode_frame,
+    CODEC_CAP_PARSE_ONLY,
+    .flush= flush,
+    .long_name= NULL_IF_CONFIG_SMALL("MP1 (MPEG audio layer 1)"),
+};
+#endif
 #ifdef CONFIG_MP2_DECODER
 AVCodec mp2_decoder =
 {