diff options
author | Justin Ruggles <justin.ruggles@gmail.com> | 2011-06-10 14:57:19 -0400 |
---|---|---|
committer | Justin Ruggles <justin.ruggles@gmail.com> | 2011-06-13 16:49:35 -0400 |
commit | e0cc66df61664bb6f9271d9aae3c778e1f906b4c (patch) | |
tree | e727a74f9c318b4c40f83e22d4ddaa7282c54c94 /libavcodec/eac3enc.c | |
parent | e754dfc0bba4f81fe797f240fca94fea5dfd925e (diff) | |
download | ffmpeg-e0cc66df61664bb6f9271d9aae3c778e1f906b4c.tar.gz |
ac3enc: split templated float vs. fixed functions into a separate file.
Function pointers are used for templated functions instead of needlessly
duplicating many functions.
Diffstat (limited to 'libavcodec/eac3enc.c')
-rw-r--r-- | libavcodec/eac3enc.c | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/libavcodec/eac3enc.c b/libavcodec/eac3enc.c index 20f4b879c6..d37acaf20b 100644 --- a/libavcodec/eac3enc.c +++ b/libavcodec/eac3enc.c @@ -28,6 +28,13 @@ #include "ac3enc.h" #include "eac3enc.h" + +#define AC3ENC_TYPE AC3ENC_TYPE_EAC3 +#include "ac3enc_opts_template.c" +static AVClass eac3enc_class = { "E-AC-3 Encoder", av_default_item_name, + eac3_options, LIBAVUTIL_VERSION_INT }; + + void ff_eac3_set_cpl_states(AC3EncodeContext *s) { int ch, blk; @@ -129,3 +136,20 @@ void ff_eac3_output_frame_header(AC3EncodeContext *s) /* block start info */ put_bits(&s->pb, 1, 0); } + + +#if CONFIG_EAC3_ENCODER +AVCodec ff_eac3_encoder = { + .name = "eac3", + .type = AVMEDIA_TYPE_AUDIO, + .id = CODEC_ID_EAC3, + .priv_data_size = sizeof(AC3EncodeContext), + .init = ff_ac3_encode_init, + .encode = ff_ac3_encode_frame, + .close = ff_ac3_encode_close, + .sample_fmts = (const enum AVSampleFormat[]){AV_SAMPLE_FMT_FLT,AV_SAMPLE_FMT_NONE}, + .long_name = NULL_IF_CONFIG_SMALL("ATSC A/52 E-AC-3"), + .priv_class = &eac3enc_class, + .channel_layouts = ff_ac3_channel_layouts, +}; +#endif |