Note that the same comments also apply to the libvo-aac encoder
patch you sent, i'm just too lazy to repeat...

On Fri, May 20, 2011 at 03:14:21PM +0300, Martin Storsjö wrote:
> ---
>  configure              |    1 +
>  libavcodec/Makefile    |    3 ++-
>  libavcodec/allcodecs.c |    1 +
>  libavcodec/libfaac.c   |   22 +++++++++++++++++++++-
>  4 files changed, 25 insertions(+), 2 deletions(-)
> 
> --- a/configure
> +++ b/configure
> @@ -1376,6 +1376,7 @@ h264_parser_select="golomb h264dsp h264pred"
>  libfaac_encoder_deps="libfaac"
> +libfaac_latm_encoder_deps="libfaac"
>  libgsm_decoder_deps="libgsm"
> --- a/libavcodec/Makefile
> +++ b/libavcodec/Makefile
> @@ -552,7 +552,8 @@ OBJS-$(CONFIG_WTV_DEMUXER)             += mpeg4audio.o 
> mpegaudiodata.o
>  # external codec libraries
>  OBJS-$(CONFIG_LIBDIRAC_ENCODER)           += libdiracenc.o 
> libdirac_libschro.o
> -OBJS-$(CONFIG_LIBFAAC_ENCODER)            += libfaac.o
> +OBJS-$(CONFIG_LIBFAAC_ENCODER)            += libfaac.o mpeg4audio.o
> +OBJS-$(CONFIG_LIBFAAC_LATM_ENCODER)       += libfaac.o mpeg4audio.o
>  OBJS-$(CONFIG_LIBGSM_DECODER)             += libgsm.o

I wonder if you couldn't just make the libfaac-latm encoder depend on
the libfaac encoder.  Is there any point in enabling the former without
the latter?

> --- a/libavcodec/libfaac.c
> +++ b/libavcodec/libfaac.c
> @@ -167,3 +173,17 @@ AVCodec ff_libfaac_encoder = {
> +
> +AVCodec ff_libfaac_latm_encoder = {
> +    "libfaac_latm",
> +    AVMEDIA_TYPE_AUDIO,
> +    CODEC_ID_AAC_LATM,
> +    sizeof(FaacAudioContext),
> +    Faac_encode_init,
> +    Faac_encode_frame,
> +    Faac_encode_close,
> +    .capabilities = CODEC_CAP_SMALL_LAST_FRAME | CODEC_CAP_DELAY,
> +    .sample_fmts = (const enum 
> AVSampleFormat[]){AV_SAMPLE_FMT_S16,AV_SAMPLE_FMT_NONE},
> +    .long_name = NULL_IF_CONFIG_SMALL("libfaac AAC (Advanced Audio Codec)"),
> +    .profiles = NULL_IF_CONFIG_SMALL(profiles),
> +};

All the cool kids use explicit initializers these days...

Diego
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to