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:
authorJustin Ruggles <justin.ruggles@gmail.com>2011-05-24 23:20:56 +0400
committerJustin Ruggles <justin.ruggles@gmail.com>2011-05-28 00:25:22 +0400
commitaa47c35dff263f19f64f10a93ea9e4da4e395ede (patch)
tree5584a17a6d839c4638fa67a3175a3bf755615b37 /libavcodec/ac3enc_float.c
parentb1bf8c7887395b08a68072c80f11b0c53d8e785a (diff)
ac3enc: add support for E-AC-3 encoding.
This adds basic stream format support and allows for arbitrary bit rates rather than just those supported in AC-3.
Diffstat (limited to 'libavcodec/ac3enc_float.c')
-rw-r--r--libavcodec/ac3enc_float.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/libavcodec/ac3enc_float.c b/libavcodec/ac3enc_float.c
index 4f61440b52..012c31de5d 100644
--- a/libavcodec/ac3enc_float.c
+++ b/libavcodec/ac3enc_float.c
@@ -100,6 +100,7 @@ static void scale_coefficients(AC3EncodeContext *s)
}
+#if CONFIG_AC3_ENCODER
AVCodec ff_ac3_encoder = {
"ac3",
AVMEDIA_TYPE_AUDIO,
@@ -114,3 +115,20 @@ AVCodec ff_ac3_encoder = {
.priv_class = &ac3enc_class,
.channel_layouts = ac3_channel_layouts,
};
+#endif
+
+#if CONFIG_EAC3_ENCODER
+AVCodec ff_eac3_encoder = {
+ .name = "eac3",
+ .type = AVMEDIA_TYPE_AUDIO,
+ .id = CODEC_ID_EAC3,
+ .priv_data_size = sizeof(AC3EncodeContext),
+ .init = ac3_encode_init,
+ .encode = ac3_encode_frame,
+ .close = 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 = ac3_channel_layouts,
+};
+#endif