Libav
Data Structures | Macros | Functions | Variables
libvorbis.c File Reference

Vorbis encoding support via libvorbisenc. More...

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

Go to the source code of this file.

Data Structures

struct  LibvorbisContext
 

Macros

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

Functions

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)
 

Variables

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

Detailed Description

Vorbis encoding 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 LIBVORBIS_FRAME_SIZE   64

Definition at line 46 of file libvorbis.c.

Referenced by libvorbis_encode_init().

#define BUFFER_SIZE   (1024 * 64)

Definition at line 48 of file libvorbis.c.

Referenced by libvorbis_encode_init().

Function Documentation

static int vorbis_error_to_averror ( int  ov_err)
static

Definition at line 78 of file libvorbis.c.

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

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

Definition at line 88 of file libvorbis.c.

Referenced by libvorbis_encode_init().

static int xiph_len ( int  l)
static

Definition at line 145 of file libvorbis.c.

Referenced by libvorbis_encode_init().

static av_cold int libvorbis_encode_close ( AVCodecContext avctx)
static

Definition at line 150 of file libvorbis.c.

Referenced by libvorbis_encode_init().

static av_cold int libvorbis_encode_init ( AVCodecContext avctx)
static

Definition at line 169 of file libvorbis.c.

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

Definition at line 246 of file libvorbis.c.

Variable Documentation

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:269
NULL
Definition: eval.c:55
#define AV_OPT_FLAG_ENCODING_PARAM
a generic parameter which can be set by the user for muxing or encoding
Definition: opt.h:264

Definition at line 65 of file libvorbis.c.

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

Definition at line 70 of file libvorbis.c.

libvorbis

Definition at line 75 of file libvorbis.c.

Referenced by avcodec_register_all().

av_default_item_name

Definition at line 75 of file libvorbis.c.

const { ... }
AVCodec ff_libvorbis_encoder
Initial value:
= {
.name = "libvorbis",
.long_name = NULL_IF_CONFIG_SMALL("libvorbis Vorbis"),
.priv_data_size = sizeof(LibvorbisContext),
.capabilities = CODEC_CAP_DELAY,
.priv_class = &class,
.defaults = defaults,
}
static const AVCodecDefault defaults[]
Definition: libvorbis.c:70
float, planar
Definition: samplefmt.h:72
static av_cold int libvorbis_encode_close(AVCodecContext *avctx)
Definition: libvorbis.c:150
static av_cold int libvorbis_encode_init(AVCodecContext *avctx)
Definition: libvorbis.c:169
#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:713
sample_fmts
Definition: avconv_filter.c:68
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. ...
Definition: internal.h:150
static int libvorbis_encode_frame(AVCodecContext *avctx, AVPacket *avpkt, const AVFrame *frame, int *got_packet_ptr)
Definition: libvorbis.c:246
AVSampleFormat
Audio Sample Formats.
Definition: samplefmt.h:61
AV_SAMPLE_FMT_NONE
Definition: avconv_filter.c:68
static void close(AVCodecParserContext *s)
Definition: h264_parser.c:490
static av_cold int init(AVCodecParserContext *s)
Definition: h264_parser.c:499

Definition at line 337 of file libvorbis.c.