File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -45,6 +45,12 @@ config FFMPEG_DEC_OPUS
4545 Opus (SILK+CELT) decoder. Pulls in the single-precision float math
4646 layer. Enables --enable-decoder=opus in the libavcodec build.
4747
48+ config FFMPEG_DEC_MP3
49+ bool "MP3 decoder"
50+ help
51+ MPEG-1/2 Layer III decoder. Enables --enable-decoder=mp3 and the
52+ mpegaudio parser in the libavcodec build. Uses the float math layer.
53+
4854comment "FFmpeg audio filters (libavfilter; need the avfilter-graph backend to run)"
4955
5056config FFMPEG_FILTER_AFFTDN
@@ -75,7 +81,7 @@ config FFMPEG_BUILD_AVFILTER
7581# built. Gates compilation of the fast single-precision libm (fastmathf.c).
7682config FFMPEG_DEC_FLOAT_MATH
7783 bool
78- default y if FFMPEG_DEC_AAC || FFMPEG_DEC_OPUS || FFMPEG_FILTER_AFFTDN
84+ default y if FFMPEG_DEC_AAC || FFMPEG_DEC_OPUS || FFMPEG_DEC_MP3 || FFMPEG_FILTER_AFFTDN
7985
8086config FFMPEG_DEC_COLD_SPLIT
8187 bool "Place cold FFmpeg code (av_cold init/setup) in DRAM [EXPERIMENTAL]"
Original file line number Diff line number Diff line change @@ -38,6 +38,10 @@ if(CONFIG_FFMPEG_DEC_OPUS)
3838 list (APPEND _ff_decoders opus)
3939 list (APPEND _ff_parsers opus)
4040endif ()
41+ if (CONFIG_FFMPEG_DEC_MP3)
42+ list (APPEND _ff_decoders mp3)
43+ list (APPEND _ff_parsers mpegaudio)
44+ endif ()
4145if (NOT _ff_decoders)
4246 message (FATAL_ERROR "ffmpeg_dec: no decoder selected (Kconfig FFMPEG_DEC_*)" )
4347endif ()
Original file line number Diff line number Diff line change @@ -100,6 +100,10 @@ static enum AVCodecID ffmpeg_dec_av_codec_id(enum ffmpeg_dec_codec codec)
100100#if defined(CONFIG_FFMPEG_DEC_OPUS )
101101 case FFMPEG_DEC_CODEC_OPUS :
102102 return AV_CODEC_ID_OPUS ;
103+ #endif
104+ #if defined(CONFIG_FFMPEG_DEC_MP3 )
105+ case FFMPEG_DEC_CODEC_MP3 :
106+ return AV_CODEC_ID_MP3 ;
103107#endif
104108 default :
105109 return AV_CODEC_ID_NONE ;
Original file line number Diff line number Diff line change @@ -32,6 +32,7 @@ enum ffmpeg_dec_codec {
3232 FFMPEG_DEC_CODEC_FLAC ,
3333 FFMPEG_DEC_CODEC_AAC ,
3434 FFMPEG_DEC_CODEC_OPUS ,
35+ FFMPEG_DEC_CODEC_MP3 ,
3536};
3637
3738/* Default codec for a new instance, picked from the Kconfig selection until the
@@ -43,6 +44,8 @@ enum ffmpeg_dec_codec {
4344#define FFMPEG_DEC_DEFAULT_CODEC FFMPEG_DEC_CODEC_AAC
4445#elif defined(CONFIG_FFMPEG_DEC_OPUS )
4546#define FFMPEG_DEC_DEFAULT_CODEC FFMPEG_DEC_CODEC_OPUS
47+ #elif defined(CONFIG_FFMPEG_DEC_MP3 )
48+ #define FFMPEG_DEC_DEFAULT_CODEC FFMPEG_DEC_CODEC_MP3
4649#else
4750#define FFMPEG_DEC_DEFAULT_CODEC FFMPEG_DEC_CODEC_NONE
4851#endif
You can’t perform that action at this time.
0 commit comments