1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-11-21 10:55:51 +02:00

g726: group the g726_encoder AVCodec with the other encoding functions

This commit is contained in:
Justin Ruggles 2011-10-27 20:50:41 -04:00
parent 50969c0f46
commit 437c11ca16

View File

@ -365,6 +365,19 @@ static int g726_encode_frame(AVCodecContext *avctx,
return put_bits_count(&pb)>>3; return put_bits_count(&pb)>>3;
} }
AVCodec ff_adpcm_g726_encoder = {
.name = "g726",
.type = AVMEDIA_TYPE_AUDIO,
.id = CODEC_ID_ADPCM_G726,
.priv_data_size = sizeof(G726Context),
.init = g726_encode_init,
.encode = g726_encode_frame,
.close = g726_encode_close,
.capabilities = CODEC_CAP_SMALL_LAST_FRAME,
.sample_fmts = (const enum AVSampleFormat[]){AV_SAMPLE_FMT_S16,AV_SAMPLE_FMT_NONE},
.long_name = NULL_IF_CONFIG_SMALL("G.726 ADPCM"),
};
#endif #endif
static av_cold int g726_decode_init(AVCodecContext *avctx) static av_cold int g726_decode_init(AVCodecContext *avctx)
@ -426,21 +439,6 @@ static int g726_decode_frame(AVCodecContext *avctx,
return buf_size; return buf_size;
} }
#if CONFIG_ADPCM_G726_ENCODER
AVCodec ff_adpcm_g726_encoder = {
.name = "g726",
.type = AVMEDIA_TYPE_AUDIO,
.id = CODEC_ID_ADPCM_G726,
.priv_data_size = sizeof(G726Context),
.init = g726_encode_init,
.encode = g726_encode_frame,
.close = g726_encode_close,
.capabilities = CODEC_CAP_SMALL_LAST_FRAME,
.sample_fmts = (const enum AVSampleFormat[]){AV_SAMPLE_FMT_S16,AV_SAMPLE_FMT_NONE},
.long_name = NULL_IF_CONFIG_SMALL("G.726 ADPCM"),
};
#endif
AVCodec ff_adpcm_g726_decoder = { AVCodec ff_adpcm_g726_decoder = {
.name = "g726", .name = "g726",
.type = AVMEDIA_TYPE_AUDIO, .type = AVMEDIA_TYPE_AUDIO,