* AMR Audio decoder stub
* Copyright (c) 2003 the ffmpeg project
*
- * This file is part of FFmpeg.
+ * This file is part of Libav.
*
- * FFmpeg is free software; you can redistribute it and/or
+ * Libav is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
- * FFmpeg is distributed in the hope that it will be useful,
+ * Libav is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
- * License along with FFmpeg; if not, write to the Free Software
+ * License along with Libav; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
avctx->channels = 1;
avctx->frame_size = 160 * is_amr_wb;
- avctx->sample_fmt = SAMPLE_FMT_S16;
+ avctx->sample_fmt = AV_SAMPLE_FMT_S16;
}
#if CONFIG_LIBOPENCORE_AMRNB
typedef struct AMRContext {
int frameCount;
void *decState;
- int *enstate;
+ void *enstate;
int enc_bitrate;
} AMRContext;
return packet_size;
}
-AVCodec libopencore_amrnb_decoder = {
+AVCodec ff_libopencore_amrnb_decoder = {
"libopencore_amrnb",
- CODEC_TYPE_AUDIO,
+ AVMEDIA_TYPE_AUDIO,
CODEC_ID_AMR_NB,
sizeof(AMRContext),
amr_nb_decode_init,
return written;
}
-AVCodec libopencore_amrnb_encoder = {
+AVCodec ff_libopencore_amrnb_encoder = {
"libopencore_amrnb",
- CODEC_TYPE_AUDIO,
+ AVMEDIA_TYPE_AUDIO,
CODEC_ID_AMR_NB,
sizeof(AMRContext),
amr_nb_encode_init,
amr_nb_encode_frame,
amr_nb_encode_close,
NULL,
- .sample_fmts = (enum SampleFormat[]){SAMPLE_FMT_S16,SAMPLE_FMT_NONE},
+ .sample_fmts = (const enum AVSampleFormat[]){AV_SAMPLE_FMT_S16,AV_SAMPLE_FMT_NONE},
.long_name = NULL_IF_CONFIG_SMALL("OpenCORE Adaptive Multi-Rate (AMR) Narrow-Band"),
};
#include <opencore-amrwb/dec_if.h>
#include <opencore-amrwb/if_rom.h>
-static const char wb_bitrate_unsupported[] =
- "bitrate not supported: use one of 6.6k, 8.85k, 12.65k, 14.25k, 15.85k, 18.25k, 19.85k, 23.05k, or 23.85k\n";
-
-/* Common code for fixed and float version*/
-typedef struct AMRWB_bitrates {
- int rate;
- int mode;
-} AMRWB_bitrates;
-
typedef struct AMRWBContext {
int frameCount;
void *state;
- int mode;
- Word16 allow_dtx;
} AMRWBContext;
static av_cold int amr_wb_decode_init(AVCodecContext *avctx)
return 0;
}
-AVCodec libopencore_amrwb_decoder = {
+AVCodec ff_libopencore_amrwb_decoder = {
"libopencore_amrwb",
- CODEC_TYPE_AUDIO,
+ AVMEDIA_TYPE_AUDIO,
CODEC_ID_AMR_WB,
sizeof(AMRWBContext),
amr_wb_decode_init,