69 gsm_option(avctx->
priv_data, GSM_OPT_WAV49, &one);
75 #if FF_API_OLD_ENCODE_AUDIO
87 #if FF_API_OLD_ENCODE_AUDIO
96 const AVFrame *frame,
int *got_packet_ptr)
158 s->
state = gsm_create();
167 gsm_option(s->
state, GSM_OPT_WAV49, &one);
182 gsm_destroy(s->
state);
188 int *got_frame_ptr,
AVPacket *avpkt)
193 int buf_size = avpkt->
size;
196 if (buf_size < avctx->block_align) {
210 if ((ret = gsm_decode(s->
state, buf, samples)) < 0)
226 gsm_destroy(s->
state);
227 s->
state = gsm_create();
229 gsm_option(s->
state, GSM_OPT_WAV49, &one);
This structure describes decoded (raw) audio or video data.
AVFrame * coded_frame
the picture in the bitstream
int block_align
number of bytes per packet if constant and known or 0 Used by some WAV based audio codecs...
void av_freep(void *arg)
Free a memory block which has been allocated with av_malloc(z)() or av_realloc() and set the pointer ...
static int decode(MimicContext *ctx, int quality, int num_coeffs, int is_iframe)
enum AVSampleFormat sample_fmt
audio sample format
#define GSM_MS_BLOCK_SIZE
static int init(AVCodecParserContext *s)
AVCodec ff_libgsm_ms_encoder
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. ...
AVCodec ff_libgsm_encoder
void av_log(void *avcl, int level, const char *fmt,...)
const char * name
Name of the codec implementation.
uint64_t channel_layout
Audio channel layout.
AVFrame * avcodec_alloc_frame(void)
Allocate an AVFrame and set its fields to default values.
static av_cold int libgsm_encode_close(AVCodecContext *avctx)
int bit_rate
the average bitrate
audio channel layout utility functions
int ff_get_buffer(AVCodecContext *avctx, AVFrame *frame)
Get a buffer for a frame.
AVCodec ff_libgsm_ms_decoder
int ff_alloc_packet(AVPacket *avpkt, int size)
Check AVPacket size and/or allocate data.
static av_cold int libgsm_decode_close(AVCodecContext *avctx)
int frame_size
Number of samples per channel in an audio frame.
int sample_rate
samples per second
main external API structure.
static void close(AVCodecParserContext *s)
void avcodec_get_frame_defaults(AVFrame *frame)
Set the fields of the given AVFrame to default values.
uint8_t * data[AV_NUM_DATA_POINTERS]
pointer to the picture/channel planes.
#define FF_COMPLIANCE_UNOFFICIAL
static void libgsm_flush(AVCodecContext *avctx)
common internal api header.
common internal and external API header
static av_cold int libgsm_encode_init(AVCodecContext *avctx)
static av_cold void flush(AVCodecContext *avctx)
Flush (reset) the frame ID after seeking.
#define AVERROR_INVALIDDATA
static int libgsm_encode_frame(AVCodecContext *avctx, AVPacket *avpkt, const AVFrame *frame, int *got_packet_ptr)
AVSampleFormat
Audio Sample Formats.
static av_cold int libgsm_decode_init(AVCodecContext *avctx)
static int libgsm_decode_frame(AVCodecContext *avctx, void *data, int *got_frame_ptr, AVPacket *avpkt)
as in Berlin toast format
int channels
number of audio channels
struct LibGSMDecodeContext LibGSMDecodeContext
#define AV_CH_LAYOUT_MONO
AVCodec ff_libgsm_decoder
This structure stores compressed data.
int nb_samples
number of audio samples (per channel) described by this frame
int strict_std_compliance
strictly follow the standard (MPEG4, ...).
if(!(ptr_align%ac->ptr_align)&&samples_align >=aligned_len)