libvorbis.c File Reference

Ogg Vorbis codec support via libvorbisenc. More...

#include <vorbis/vorbisenc.h>
#include "libavutil/opt.h"
#include "avcodec.h"
#include "bytestream.h"
#include "internal.h"
#include "vorbis.h"
#include "libavutil/mathematics.h"
#include <assert.h>

Go to the source code of this file.

Data Structures

struct  OggVorbisContext
 

Macros

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

Typedefs

typedef struct OggVorbisContext OggVorbisContext
 

Functions

static av_cold int oggvorbis_init_encoder (vorbis_info *vi, AVCodecContext *avccontext)
 
static int xiph_len (int l)
 
static av_cold int oggvorbis_encode_init (AVCodecContext *avccontext)
 
static int oggvorbis_encode_frame (AVCodecContext *avccontext, unsigned char *packets, int buf_size, void *data)
 
static av_cold int oggvorbis_encode_close (AVCodecContext *avccontext)
 

Variables

static const AVOption options []
 
static const AVCodecDefault defaults []
 
class {
      libvorbis
 
      av_default_item_name
 
      options
 
}; 
 
AVCodec ff_libvorbis_encoder
 

Detailed Description

Ogg Vorbis codec support via libvorbisenc.

Author
Mark Hills mark@.nosp@m.pogo.nosp@m..org..nosp@m.uk

Definition in file libvorbis.c.

Macro Definition Documentation

#define BUFFER_SIZE   (1024 * 64)

Definition at line 41 of file libvorbis.c.

Referenced by oggvorbis_encode_frame().

#define OGGVORBIS_FRAME_SIZE   64

Definition at line 39 of file libvorbis.c.

Referenced by oggvorbis_encode_init().

Typedef Documentation

Function Documentation

static av_cold int oggvorbis_encode_close ( AVCodecContext avccontext)
static

Definition at line 250 of file libvorbis.c.

static int oggvorbis_encode_frame ( AVCodecContext avccontext,
unsigned char *  packets,
int  buf_size,
void data 
)
static

Definition at line 178 of file libvorbis.c.

static av_cold int oggvorbis_encode_init ( AVCodecContext avccontext)
static

Definition at line 125 of file libvorbis.c.

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

Definition at line 71 of file libvorbis.c.

Referenced by oggvorbis_encode_init().

static int xiph_len ( int  l)
static

Definition at line 120 of file libvorbis.c.

Referenced by oggvorbis_encode_init().

Variable Documentation

const { ... }
av_default_item_name

Definition at line 69 of file libvorbis.c.

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

Definition at line 64 of file libvorbis.c.

AVCodec ff_libvorbis_encoder
Initial value:
= {
.name = "libvorbis",
.priv_data_size = sizeof(OggVorbisContext),
.capabilities = CODEC_CAP_DELAY,
.sample_fmts = (const enum AVSampleFormat[]) { AV_SAMPLE_FMT_S16, AV_SAMPLE_FMT_NONE },
.long_name = NULL_IF_CONFIG_SMALL("libvorbis Vorbis"),
.priv_class = &class,
.defaults = defaults,
}
static const AVCodecDefault defaults[]
Definition: libvorbis.c:64
struct OggVorbisContext OggVorbisContext
signed 16 bits
Definition: samplefmt.h:30
static int oggvorbis_encode_frame(AVCodecContext *avccontext, unsigned char *packets, int buf_size, void *data)
Definition: libvorbis.c:178
static int init(AVCodecParserContext *s)
Definition: h264_parser.c:336
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. ...
Definition: internal.h:191
static av_cold int oggvorbis_encode_close(AVCodecContext *avccontext)
Definition: libvorbis.c:250
static void close(AVCodecParserContext *s)
Definition: h264_parser.c:327
static av_cold int oggvorbis_encode_init(AVCodecContext *avccontext)
Definition: libvorbis.c:125
AVSampleFormat
all in native-endian format
Definition: samplefmt.h:27
#define CODEC_CAP_DELAY
Encoder or decoder requires flushing with NULL input at the end in order to give the complete and cor...
Definition: avcodec.h:750

Definition at line 267 of file libvorbis.c.

libvorbis

Definition at line 69 of file libvorbis.c.

Referenced by avcodec_register_all().

options
static
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 AV_OPT_FLAG_AUDIO_PARAM
Definition: opt.h:277
#define AV_OPT_FLAG_ENCODING_PARAM
a generic parameter which can be set by the user for muxing or encoding
Definition: opt.h:274
NULL
Definition: eval.c:50

Definition at line 59 of file libvorbis.c.