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"
Include dependency graph for libvorbisenc.c:

Go to the source code of this file.

Data Structures

struct  OggVorbisEncContext
 

Macros

#define OGGVORBIS_FRAME_SIZE   64
 
#define BUFFER_SIZE   (1024 * 64)
 

Typedefs

typedef struct OggVorbisEncContext OggVorbisEncContext
 

Functions

static int vorbis_error_to_averror (int ov_err)
 
static av_cold int oggvorbis_init_encoder (vorbis_info *vi, AVCodecContext *avctx)
 
static int xiph_len (int l)
 
static av_cold int oggvorbis_encode_close (AVCodecContext *avctx)
 
static av_cold int oggvorbis_encode_init (AVCodecContext *avctx)
 
static int oggvorbis_encode_frame (AVCodecContext *avctx, AVPacket *avpkt, const AVFrame *frame, int *got_packet_ptr)
 

Variables

static const AVOption options []
 
static const AVCodecDefault defaults []
 
class {
      class_name = "libvorbis"
 
      item_name = av_default_item_name
 
      option = options
 
      version = LIBAVUTIL_VERSION_INT
 
}; 
 
AVCodec ff_libvorbis_encoder
 

Macro Definition Documentation

#define BUFFER_SIZE   (1024 * 64)

Definition at line 40 of file libvorbisenc.c.

Referenced by oggvorbis_encode_init().

#define OGGVORBIS_FRAME_SIZE   64

Definition at line 38 of file libvorbisenc.c.

Referenced by oggvorbis_encode_init().

Typedef Documentation

Function Documentation

static av_cold int oggvorbis_encode_close ( AVCodecContext avctx)
static

Definition at line 176 of file libvorbisenc.c.

Referenced by oggvorbis_encode_init().

static int oggvorbis_encode_frame ( AVCodecContext avctx,
AVPacket avpkt,
const AVFrame frame,
int *  got_packet_ptr 
)
static

Definition at line 273 of file libvorbisenc.c.

static av_cold int oggvorbis_encode_init ( AVCodecContext avctx)
static

Definition at line 195 of file libvorbisenc.c.

static av_cold int oggvorbis_init_encoder ( vorbis_info *  vi,
AVCodecContext avctx 
)
static

Definition at line 84 of file libvorbisenc.c.

Referenced by oggvorbis_encode_init().

static int vorbis_error_to_averror ( int  ov_err)
static
static int xiph_len ( int  l)
static

Definition at line 171 of file libvorbisenc.c.

Referenced by oggvorbis_encode_init().

Variable Documentation

const { ... }
class_name = "libvorbis"
private

Definition at line 68 of file libvorbisenc.c.

const AVCodecDefault defaults[]
static
Initial value:
= {
{ "b", "0" },
{ NULL },
}
NULL
Definition: eval.c:55

Definition at line 62 of file libvorbisenc.c.

AVCodec ff_libvorbis_encoder
Initial value:
= {
.name = "libvorbis",
.priv_data_size = sizeof(OggVorbisEncContext),
.capabilities = CODEC_CAP_DELAY,
.long_name = NULL_IF_CONFIG_SMALL("libvorbis"),
.priv_class = &class,
.defaults = defaults,
}
static av_cold int init(AVCodecContext *avctx)
Definition: avrndec.c:35
static av_cold int oggvorbis_encode_close(AVCodecContext *avctx)
Definition: libvorbisenc.c:176
static av_cold int oggvorbis_encode_init(AVCodecContext *avctx)
Definition: libvorbisenc.c:195
static const AVCodecDefault defaults[]
Definition: libvorbisenc.c:62
float, planar
Definition: samplefmt.h:60
#define CODEC_CAP_DELAY
Encoder or decoder requires flushing with NULL input at the end in order to give the complete and cor...
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. ...
struct OggVorbisEncContext OggVorbisEncContext
static void close(AVCodecParserContext *s)
Definition: h264_parser.c:375
static int oggvorbis_encode_frame(AVCodecContext *avctx, AVPacket *avpkt, const AVFrame *frame, int *got_packet_ptr)
Definition: libvorbisenc.c:273
AVSampleFormat
Audio Sample Formats.
Definition: samplefmt.h:49
static enum AVSampleFormat sample_fmts[]
Definition: adpcmenc.c:700

Definition at line 364 of file libvorbisenc.c.

item_name = av_default_item_name
private

Definition at line 69 of file libvorbisenc.c.

option = options
private

Definition at line 70 of file libvorbisenc.c.

const AVOption options[]
static
Initial value:
= {
{ "iblock", "Sets the impulse block bias", offsetof(OggVorbisEncContext, iblock), AV_OPT_TYPE_DOUBLE, { .dbl = 0 }, -15, 0, AV_OPT_FLAG_AUDIO_PARAM | AV_OPT_FLAG_ENCODING_PARAM },
{ NULL }
}
#define AV_OPT_FLAG_AUDIO_PARAM
Definition: opt.h:284
#define AV_OPT_FLAG_ENCODING_PARAM
a generic parameter which can be set by the user for muxing or encoding
Definition: opt.h:281
NULL
Definition: eval.c:55

Definition at line 57 of file libvorbisenc.c.

version = LIBAVUTIL_VERSION_INT
private

Definition at line 71 of file libvorbisenc.c.