xine-lib: xine-lib-1.2.12/src/combined/xine_vorbis_decoder.c File Reference

xine-lib 1.2.12

Data Structures | Macros | Typedefs | Functions | Variables
xine_vorbis_decoder.c File Reference
`#include <stdlib.h>`
`#include <string.h>`
`#include <xine/xine_internal.h>`
`#include <xine/audio_out.h>`
`#include <xine/buffer.h>`
`#include <ogg/ogg.h>`
`#include <vorbis/codec.h>`
`#include "ogg_combined.h"`

## Data Structures
struct | vorbis_class_t
struct | vorbis_decoder_s

## Macros
#define | LOG_MODULE "vorbis_decoder"
#define | LOG_VERBOSE
#define | MAX_NUM_SAMPLES 4096
#define | INIT_BUFSIZE 8192

## Typedefs
typedef struct vorbis_decoder_s | vorbis_decoder_t

## Functions
static void | vorbis_reset (audio_decoder_t *this_gen)
static void | vorbis_discontinuity (audio_decoder_t *this_gen)
static void | get_metadata (vorbis_decoder_t *this)
static void | vorbis_check_bufsize (vorbis_decoder_t *this, int size)
static void | vorbis_decode_data (audio_decoder_t *this_gen, buf_element_t *buf)
static void | vorbis_dispose (audio_decoder_t *this_gen)
static audio_decoder_t * | open_plugin (audio_decoder_class_t *class_gen, xine_stream_t *stream)
void * | vorbis_init_plugin (xine_t *xine, const void *data)

## Variables
struct {
const char * key
int xine_metainfo_index
} | vorbis_comment_keys []

## Macro Definition Documentation

## ◆ INIT_BUFSIZE

#define INIT_BUFSIZE 8192

## ◆ LOG_MODULE

#define LOG_MODULE "vorbis_decoder"

## ◆ LOG_VERBOSE

#define LOG_VERBOSE

## ◆ MAX_NUM_SAMPLES

#define MAX_NUM_SAMPLES 4096

## Typedef Documentation

## ◆ vorbis_decoder_t

typedef struct vorbis_decoder_s vorbis_decoder_t

## Function Documentation

## ◆ get_metadata()

static void get_metadata | ( | vorbis_decoder_t * | this | ) |
| static

References _x_meta_info_set_utf8(), key, lprintf, NULL, vorbis_comment_keys, XINE_META_INFO_AUDIOCODEC, and xine_metainfo_index.

Referenced by vorbis_decode_data().

## ◆ open_plugin()

static audio_decoder_t * open_plugin | ( | audio_decoder_class_t * | class_gen,
|  | xine_stream_t * | stream
| ) |  |
| static

References INIT_BUFSIZE, lprintf, NULL, vorbis_decode_data(), vorbis_discontinuity(), vorbis_dispose(), and vorbis_reset().

Referenced by vorbis_init_plugin().

## ◆ vorbis_check_bufsize()

static void vorbis_check_bufsize | ( | vorbis_decoder_t * | this,
|  | int | size
| ) |  |
| static

References _, XINE_VERBOSITY_LOG, and xprintf.

Referenced by vorbis_decode_data().

## ◆ vorbis_decode_data()

static void vorbis_decode_data | ( | audio_decoder_t * | this_gen,
|  | buf_element_t * | buf
| ) |  |
| static

References _x_ao_channels2mode(), _x_stream_info_set(), AO_CAP_MODE_MONO, BUF_FLAG_FRAME_END, BUF_FLAG_HEADER, BUF_FLAG_SPECIAL, BUF_FLAG_STDHEADER, BUF_SPECIAL_DECODER_CONFIG, buf_element_s::content, buf_element_s::decoder_flags, buf_element_s::decoder_info, buf_element_s::decoder_info_ptr, get_metadata(), lprintf, MAX_NUM_SAMPLES, audio_buffer_s::mem, mode(), audio_buffer_s::num_frames, buf_element_s::pts, buf_element_s::size, audio_buffer_s::stream, vorbis_check_bufsize(), vorbis_decode_data(), audio_buffer_s::vpts, xine_fast_memcpy, xine_hexdump(), xine_log(), XINE_LOG_MSG, and XINE_STREAM_INFO_AUDIO_BITRATE.

Referenced by open_plugin(), and vorbis_decode_data().

## ◆ vorbis_discontinuity()

static void vorbis_discontinuity | ( | audio_decoder_t * | this_gen | ) |
| static

Referenced by open_plugin().

## ◆ vorbis_dispose()

static void vorbis_dispose | ( | audio_decoder_t * | this_gen | ) |
| static

References lprintf.

Referenced by open_plugin().

## ◆ vorbis_init_plugin()

void * vorbis_init_plugin | ( | xine_t * | xine,
|  | const void * | data
| ) |  |

References default_audio_decoder_class_dispose, N_, NULL, and open_plugin().

## ◆ vorbis_reset()

static void vorbis_reset | ( | audio_decoder_t * | this_gen | ) |
| static

Referenced by open_plugin().

## Variable Documentation

## ◆ key

const char* key

Referenced by get_metadata().

## ◆

const struct { ... } vorbis_comment_keys[]

Initial value:
= {
{"ARTIST=", XINE_META_INFO_ARTIST},
{"ALBUM=", XINE_META_INFO_ALBUM},
{"TITLE=", XINE_META_INFO_TITLE},
{"GENRE=", XINE_META_INFO_GENRE},
{"DESCRIPTION=", XINE_META_INFO_COMMENT},
{"COMMENT=", XINE_META_INFO_COMMENT},
{"DATE=", XINE_META_INFO_YEAR},
{"TRACKNUMBER=", XINE_META_INFO_TRACK_NUMBER},
{NULL, 0}
}
XINE_META_INFO_ARTIST
#define XINE_META_INFO_ARTIST
Definition: xine.h:1070
XINE_META_INFO_COMMENT
#define XINE_META_INFO_COMMENT
Definition: xine.h:1069
XINE_META_INFO_TRACK_NUMBER
#define XINE_META_INFO_TRACK_NUMBER
Definition: xine.h:1079
XINE_META_INFO_ALBUM
#define XINE_META_INFO_ALBUM
Definition: xine.h:1072
XINE_META_INFO_TITLE
#define XINE_META_INFO_TITLE
Definition: xine.h:1068
XINE_META_INFO_YEAR
#define XINE_META_INFO_YEAR
Definition: xine.h:1073
XINE_META_INFO_GENRE
#define XINE_META_INFO_GENRE
Definition: xine.h:1071
NULL
NULL
Definition: xine_plugin.c:78

Referenced by get_metadata().

## ◆ xine_metainfo_index

int xine_metainfo_index

Referenced by get_metadata().