libavcodec/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  OggVorbisContext

Defines

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

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)
static int oggvorbis_decode_init (AVCodecContext *avccontext)
static int conv (int samples, float **pcm, char *buf, int channels)
static int oggvorbis_decode_frame (AVCodecContext *avccontext, void *data, int *got_frame_ptr, AVPacket *avpkt)
static int oggvorbis_decode_close (AVCodecContext *avccontext)

Variables

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


Detailed Description

Vorbis encoding support via libvorbisenc.

Author:
Mark Hills <mark@pogo.org.uk>

Definition in file libvorbis.c.


Define Documentation

#define BUFFER_SIZE   (1024 * 64)

Definition at line 48 of file libvorbis.c.

#define OGGVORBIS_FRAME_SIZE   64

Definition at line 46 of file libvorbis.c.

Referenced by oggvorbis_encode_init().


Function Documentation

static int conv ( int  samples,
float **  pcm,
char *  buf,
int  channels 
) [inline, static]

static int oggvorbis_decode_close ( AVCodecContext avccontext  )  [static]

Definition at line 541 of file libvorbis.c.

static int oggvorbis_decode_frame ( AVCodecContext avccontext,
void *  data,
int *  got_frame_ptr,
AVPacket avpkt 
) [static]

Definition at line 489 of file libvorbis.c.

static int oggvorbis_decode_init ( AVCodecContext avccontext  )  [static]

Definition at line 396 of file libvorbis.c.

static av_cold int oggvorbis_encode_close ( AVCodecContext avctx  )  [static]

Definition at line 181 of file libvorbis.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 289 of file libvorbis.c.

static av_cold int oggvorbis_encode_init ( AVCodecContext avctx  )  [static]

Definition at line 203 of file libvorbis.c.

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

Definition at line 89 of file libvorbis.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 176 of file libvorbis.c.

Referenced by oggvorbis_encode_init().


Variable Documentation

const { ... } [static]

av_default_item_name

Definition at line 76 of file libvorbis.c.

const AVCodecDefault defaults[] [static]

Initial value:

 {
    { "b",  "0" },
    { NULL },
}

Definition at line 71 of file libvorbis.c.

Initial value:

 {
  .name           = "libvorbis",
  .type           = AVMEDIA_TYPE_AUDIO,
  .id             = CODEC_ID_VORBIS,
  .priv_data_size = sizeof(OggVorbisContext),
  .init           = oggvorbis_decode_init,
  .decode         = oggvorbis_decode_frame,
  .close          = oggvorbis_decode_close,
  .capabilities   = CODEC_CAP_DELAY,
}

Definition at line 551 of file libvorbis.c.

Initial value:

 {
    .name           = "libvorbis",
    .type           = AVMEDIA_TYPE_AUDIO,
    .id             = CODEC_ID_VORBIS,
    .priv_data_size = sizeof(OggVorbisContext),
    .init           = oggvorbis_encode_init,
    .encode2        = oggvorbis_encode_frame,
    .close          = oggvorbis_encode_close,
    .capabilities   = CODEC_CAP_DELAY,
    .sample_fmts    = (const enum AVSampleFormat[]) { AV_SAMPLE_FMT_FLT,
                                                      AV_SAMPLE_FMT_NONE },
    .long_name      = NULL_IF_CONFIG_SMALL("libvorbis Vorbis"),
    .priv_class     = &class,
    .defaults       = defaults,
}

Definition at line 380 of file libvorbis.c.

Definition at line 76 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 }
}

Definition at line 66 of file libvorbis.c.


Generated on Fri Oct 26 02:47:57 2012 for FFmpeg by  doxygen 1.5.8