All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions | Variables
libvorbisenc.c File Reference
#include <vorbis/vorbisenc.h>
#include "libavutil/avassert.h"
#include "libavutil/fifo.h"
#include "libavutil/opt.h"
#include "avcodec.h"
#include "audio_frame_queue.h"
#include "internal.h"
#include "vorbis.h"
#include "vorbis_parser.h"

Go to the source code of this file.

Data Structures

struct  LibvorbisEncContext


#define BUFFER_SIZE   (1024 * 64)


static int vorbis_error_to_averror (int ov_err)
static av_cold int libvorbis_setup (vorbis_info *vi, AVCodecContext *avctx)
static int xiph_len (int l)
static av_cold int libvorbis_encode_close (AVCodecContext *avctx)
static av_cold int libvorbis_encode_init (AVCodecContext *avctx)
static int libvorbis_encode_frame (AVCodecContext *avctx, AVPacket *avpkt, const AVFrame *frame, int *got_packet_ptr)


static const AVOption options []
static const AVCodecDefault defaults []
static const AVClass vorbis_class
AVCodec ff_libvorbis_encoder

Macro Definition Documentation


Definition at line 38 of file libvorbisenc.c.

Referenced by libvorbis_encode_init().

#define BUFFER_SIZE   (1024 * 64)

Definition at line 40 of file libvorbisenc.c.

Referenced by libvorbis_encode_init().

Function Documentation

static int vorbis_error_to_averror ( int  ov_err)

Definition at line 73 of file libvorbisenc.c.

Referenced by libvorbis_encode_frame(), libvorbis_encode_init(), and libvorbis_setup().

static av_cold int libvorbis_setup ( vorbis_info *  vi,
AVCodecContext avctx 

Definition at line 83 of file libvorbisenc.c.

Referenced by libvorbis_encode_init().

static int xiph_len ( int  l)

Definition at line 169 of file libvorbisenc.c.

Referenced by libvorbis_encode_init().

static av_cold int libvorbis_encode_close ( AVCodecContext avctx)

Definition at line 174 of file libvorbisenc.c.

Referenced by libvorbis_encode_init().

static av_cold int libvorbis_encode_init ( AVCodecContext avctx)

Definition at line 195 of file libvorbisenc.c.

static int libvorbis_encode_frame ( AVCodecContext avctx,
AVPacket avpkt,
const AVFrame frame,
int got_packet_ptr 

Definition at line 274 of file libvorbisenc.c.

Variable Documentation

const AVOption options[]
Initial value:
= {
{ "iblock", "Sets the impulse block bias", 0x42, AV_OPT_TYPE_DOUBLE, { .dbl = 0 }, -15, 0, AV_OPT_FLAG_AUDIO_PARAM | AV_OPT_FLAG_ENCODING_PARAM },
{ NULL }
#define NULL
Definition: coverity.c:32
Definition: opt.h:278
a generic parameter which can be set by the user for muxing or encoding
Definition: opt.h:276

Definition at line 56 of file libvorbisenc.c.

const AVCodecDefault defaults[]
Initial value:
= {
{ "b", "0" },
{ NULL },
#define NULL
Definition: coverity.c:32

Definition at line 61 of file libvorbisenc.c.

const AVClass vorbis_class
Initial value:
= {
.class_name = "libvorbis",
.item_name = av_default_item_name,
.option = options,
Definition: version.h:85
static const AVOption options[]
Definition: libvorbisenc.c:56
const char * av_default_item_name(void *ptr)
Return the context name.
Definition: log.c:191

Definition at line 66 of file libvorbisenc.c.

AVCodec ff_libvorbis_encoder
Initial value:
= {
.name = "libvorbis",
.long_name = NULL_IF_CONFIG_SMALL("libvorbis"),
.priv_data_size = sizeof(LibvorbisEncContext),
.priv_class = &vorbis_class,
.defaults = defaults,
.wrapper_name = "libvorbis",
float, planar
Definition: samplefmt.h:69
static av_cold int libvorbis_encode_close(AVCodecContext *avctx)
Definition: libvorbisenc.c:174
static av_cold int init(AVCodecContext *avctx)
Definition: avrndec.c:35
Encoder or decoder requires flushing with NULL input at the end in order to give the complete and cor...
Definition: avcodec.h:993
static const AVCodecDefault defaults[]
Definition: libvorbisenc.c:61
static av_cold int libvorbis_encode_init(AVCodecContext *avctx)
Definition: libvorbisenc.c:195
static const AVClass vorbis_class
Definition: libvorbisenc.c:66
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. ...
Definition: internal.h:186
static int libvorbis_encode_frame(AVCodecContext *avctx, AVPacket *avpkt, const AVFrame *frame, int *got_packet_ptr)
Definition: libvorbisenc.c:274
Codec can be fed a final frame with a smaller size.
Definition: avcodec.h:998
Audio sample formats.
Definition: samplefmt.h:58
static enum AVSampleFormat sample_fmts[]
Definition: adpcmenc.c:701

Definition at line 366 of file libvorbisenc.c.