26 memset(&avctx, 0,
sizeof(avctx));
27 memset(&enc_ctx, 0,
sizeof(enc_ctx));
35 void setCodecID(AVCodecID
id) { avctx.codec_id =
id; }
37 AVCodecID codecID() {
return avctx.codec_id; }
41 virtual void setBlockSize(
int size) { enc_ctx.block_size = size; }
43 int blockSize() {
return enc_ctx.block_size; }
47 int channels() {
return avctx.nb_channels; }
50 for (AVSampleFormat
fmt: sample_formats){
51 if (
fmt == AV_SAMPLE_FMT_S16P)
return true;
61 int av_get_bits_per_sample() {
62 switch (avctx.codec_id) {
63 case AV_CODEC_ID_ADPCM_SBPRO_2:
65 case AV_CODEC_ID_ADPCM_SBPRO_3:
67 case AV_CODEC_ID_ADPCM_SBPRO_4:
68 case AV_CODEC_ID_ADPCM_IMA_WAV:
69 case AV_CODEC_ID_ADPCM_IMA_QT:
70 case AV_CODEC_ID_ADPCM_SWF:
71 case AV_CODEC_ID_ADPCM_MS:
72 case AV_CODEC_ID_ADPCM_ARGO:
73 case AV_CODEC_ID_ADPCM_CT:
74 case AV_CODEC_ID_ADPCM_IMA_ALP:
75 case AV_CODEC_ID_ADPCM_IMA_AMV:
76 case AV_CODEC_ID_ADPCM_IMA_APC:
77 case AV_CODEC_ID_ADPCM_IMA_APM:
78 case AV_CODEC_ID_ADPCM_IMA_EA_SEAD:
79 case AV_CODEC_ID_ADPCM_IMA_OKI:
80 case AV_CODEC_ID_ADPCM_IMA_WS:
81 case AV_CODEC_ID_ADPCM_IMA_SSI:
82 case AV_CODEC_ID_ADPCM_G722:
83 case AV_CODEC_ID_ADPCM_YAMAHA:
84 case AV_CODEC_ID_ADPCM_AICA:
102 void avpriv_request_sample(
void *
avc,
const char *
msg, ...) {
C API context for encoder and decoder.
Definition adpcm.h:215
int frame_size
Number of samples per channel in an audio frame.
Definition adpcm.h:218