All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions | Variables
libopusdec.c File Reference
#include <opus.h>
#include <opus_multistream.h>
#include "libavutil/internal.h"
#include "libavutil/intreadwrite.h"
#include "libavutil/ffmath.h"
#include "libavutil/opt.h"
#include "avcodec.h"
#include "internal.h"
#include "vorbis.h"
#include "mathops.h"
#include "libopus.h"

Go to the source code of this file.

Data Structures

struct  libopus_context


#define OPUS_HEAD_SIZE   19
#define MAX_FRAME_SIZE   (960 * 6)
#define OFFSET(x)   offsetof(struct libopus_context, x)


static av_cold int libopus_decode_init (AVCodecContext *avc)
static av_cold int libopus_decode_close (AVCodecContext *avc)
static int libopus_decode (AVCodecContext *avc, void *data, int *got_frame_ptr, AVPacket *pkt)
static void libopus_flush (AVCodecContext *avc)


static const AVOption libopusdec_options []
static const AVClass libopusdec_class
AVCodec ff_libopus_decoder

Macro Definition Documentation

#define OPUS_HEAD_SIZE   19

Definition at line 48 of file libopusdec.c.

Referenced by libopus_decode_init().

#define MAX_FRAME_SIZE   (960 * 6)

Definition at line 170 of file libopusdec.c.

Referenced by libopus_decode().

#define OFFSET (   x)    offsetof(struct libopus_context, x)

Definition at line 230 of file libopusdec.c.

Definition at line 231 of file libopusdec.c.

Function Documentation

static av_cold int libopus_decode_init ( AVCodecContext avc)

Definition at line 50 of file libopusdec.c.

static av_cold int libopus_decode_close ( AVCodecContext avc)

Definition at line 159 of file libopusdec.c.

static int libopus_decode ( AVCodecContext avc,
void data,
int got_frame_ptr,
AVPacket pkt 

Definition at line 172 of file libopusdec.c.

static void libopus_flush ( AVCodecContext avc)

Definition at line 219 of file libopusdec.c.

Variable Documentation

const AVOption libopusdec_options[]
Initial value:
= {
{ NULL },
#define NULL
Definition: coverity.c:32

Definition at line 232 of file libopusdec.c.

const AVClass libopusdec_class
Initial value:
= {
.class_name = "libopusdec",
.item_name = av_default_item_name,
.option = libopusdec_options,
Definition: version.h:85
const char * av_default_item_name(void *ptr)
Return the context name.
Definition: log.c:191
static const AVOption libopusdec_options[]
Definition: libopusdec.c:232

Definition at line 239 of file libopusdec.c.

AVCodec ff_libopus_decoder
Initial value:
= {
.name = "libopus",
.long_name = NULL_IF_CONFIG_SMALL("libopus Opus"),
.priv_data_size = sizeof(struct libopus_context),
.decode = libopus_decode,
.flush = libopus_flush,
.capabilities = AV_CODEC_CAP_DR1,
.caps_internal = FF_CODEC_CAP_INIT_CLEANUP,
.sample_fmts = (const enum AVSampleFormat[]){ AV_SAMPLE_FMT_FLT,
.priv_class = &libopusdec_class,
.wrapper_name = "libopus",
The codec allows calling the close function for deallocation even if the init function returned a fai...
Definition: internal.h:48
static int libopus_decode(AVCodecContext *avc, void *data, int *got_frame_ptr, AVPacket *pkt)
Definition: libopusdec.c:172
static av_cold int init(AVCodecContext *avctx)
Definition: avrndec.c:35
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. ...
Definition: internal.h:186
static av_cold int libopus_decode_init(AVCodecContext *avc)
Definition: libopusdec.c:50
Audio sample formats.
Definition: samplefmt.h:58
static void libopus_flush(AVCodecContext *avc)
Definition: libopusdec.c:219
static const AVClass libopusdec_class
Definition: libopusdec.c:239
signed 16 bits
Definition: samplefmt.h:61
static av_cold int libopus_decode_close(AVCodecContext *avc)
Definition: libopusdec.c:159
#define AV_CODEC_CAP_DR1
Codec uses get_buffer() for allocating buffers and supports custom allocators.
Definition: avcodec.h:960

Definition at line 247 of file libopusdec.c.