#include <vorbis/vorbisenc.h>#include "avcodec.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 | oggvorbis_init_encoder (vorbis_info *vi, AVCodecContext *avccontext) |
| static int | oggvorbis_encode_init (AVCodecContext *avccontext) |
| static int | oggvorbis_encode_frame (AVCodecContext *avccontext, unsigned char *packets, int buf_size, void *data) |
| static int | oggvorbis_encode_close (AVCodecContext *avccontext) |
| 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 *data_size, uint8_t *buf, int buf_size) |
| static int | oggvorbis_decode_close (AVCodecContext *avccontext) |
Variables | |
| AVCodec | oggvorbis_encoder |
| AVCodec | oggvorbis_decoder |
Definition in file oggvorbis.c.
| #define BUFFER_SIZE (1024*64) |
Definition at line 16 of file oggvorbis.c.
| #define OGGVORBIS_FRAME_SIZE 64 |
Definition at line 14 of file oggvorbis.c.
Referenced by oggvorbis_encode_frame(), and oggvorbis_encode_init().
| static int conv | ( | int | samples, | |
| float ** | pcm, | |||
| char * | buf, | |||
| int | channels | |||
| ) | [inline, static] |
| static int oggvorbis_decode_close | ( | AVCodecContext * | avccontext | ) | [static] |
Definition at line 325 of file oggvorbis.c.
References context, AVCodecContext::priv_data, OggVorbisContext::vc, and OggVorbisContext::vi.
| static int oggvorbis_decode_frame | ( | AVCodecContext * | avccontext, | |
| void * | data, | |||
| int * | data_size, | |||
| uint8_t * | buf, | |||
| int | buf_size | |||
| ) | [static] |
Definition at line 284 of file oggvorbis.c.
References context, conv(), OggVorbisContext::op, AVCodecContext::priv_data, samples, OggVorbisContext::vb, OggVorbisContext::vd, and OggVorbisContext::vi.

| static int oggvorbis_decode_init | ( | AVCodecContext * | avccontext | ) | [static] |
Definition at line 183 of file oggvorbis.c.
References av_log(), AV_LOG_DEBUG, AV_LOG_ERROR, AVCodecContext::channels, context, AVCodecContext::extradata, AVCodecContext::extradata_size, offset, OggVorbisContext::op, AVCodecContext::priv_data, AVCodecContext::sample_rate, AVCodecContext::time_base, OggVorbisContext::vb, OggVorbisContext::vc, OggVorbisContext::vd, and OggVorbisContext::vi.

| static int oggvorbis_encode_close | ( | AVCodecContext * | avccontext | ) | [static] |
Definition at line 155 of file oggvorbis.c.
References av_freep(), AVCodecContext::coded_frame, context, AVCodecContext::extradata, AVCodecContext::priv_data, OggVorbisContext::vb, OggVorbisContext::vd, and OggVorbisContext::vi.

| static int oggvorbis_encode_frame | ( | AVCodecContext * | avccontext, | |
| unsigned char * | packets, | |||
| int | buf_size, | |||
| void * | data | |||
| ) | [static] |
Definition at line 98 of file oggvorbis.c.
References OggVorbisContext::buffer, OggVorbisContext::buffer_index, AVCodecContext::coded_frame, context, memcpy, NULL, OGGVORBIS_FRAME_SIZE, AVCodecContext::priv_data, samples, OggVorbisContext::vb, OggVorbisContext::vd, and OggVorbisContext::vi.
| static int oggvorbis_encode_init | ( | AVCodecContext * | avccontext | ) | [static] |
Definition at line 48 of file oggvorbis.c.
References av_log(), AV_LOG_ERROR, av_mallocz(), av_realloc(), av_xiphlacing(), avcodec_alloc_frame(), AVCodecContext::coded_frame, context, AVCodecContext::extradata, AVCodecContext::extradata_size, AVCodecContext::frame_size, header, LIBAVCODEC_IDENT, memcpy, offset, OGGVORBIS_FRAME_SIZE, oggvorbis_init_encoder(), AVCodecContext::priv_data, OggVorbisContext::vb, OggVorbisContext::vc, OggVorbisContext::vd, and OggVorbisContext::vi.

| static int oggvorbis_init_encoder | ( | vorbis_info * | vi, | |
| AVCodecContext * | avccontext | |||
| ) | [static] |
Definition at line 31 of file oggvorbis.c.
References AVCodecContext::bit_rate, AVCodecContext::channels, NULL, and AVCodecContext::sample_rate.
Referenced by oggvorbis_encode_init().
Initial value:
{
"vorbis",
CODEC_TYPE_AUDIO,
CODEC_ID_VORBIS,
sizeof(OggVorbisContext),
oggvorbis_decode_init,
NULL,
oggvorbis_decode_close,
oggvorbis_decode_frame,
.capabilities= CODEC_CAP_DELAY,
}
Definition at line 335 of file oggvorbis.c.
Referenced by avcodec_register_all().
Initial value:
{
"vorbis",
CODEC_TYPE_AUDIO,
CODEC_ID_VORBIS,
sizeof(OggVorbisContext),
oggvorbis_encode_init,
oggvorbis_encode_frame,
oggvorbis_encode_close,
.capabilities= CODEC_CAP_DELAY,
}
Definition at line 172 of file oggvorbis.c.
Referenced by avcodec_register_all().
1.5.5