xine-lib: xine-lib-1.2.13/src/combined/flac_decoder.c File Reference

xine-lib 1.2.13-20230125hg15249

Data Structures | Macros | Typedefs | Functions | Variables
flac_decoder.c File Reference
`#include <stdlib.h>`
`#include <string.h>`
`#include <FLAC/stream_decoder.h>`
`#include <FLAC/seekable_stream_decoder.h>`
`#include <xine/xine_internal.h>`
`#include <xine/audio_out.h>`
`#include <xine/buffer.h>`
`#include "flac_demuxer.h"`

## Data Structures
struct | flac_decoder_s

## Macros
#define | LEGACY_FLAC
#define | LOG_MODULE "flac_decoder"
#define | LOG_VERBOSE

## Typedefs
typedef struct flac_decoder_s | flac_decoder_t

## Functions
static FLAC__StreamDecoderReadStatus | flac_read_callback (const FLAC__StreamDecoder *decoder, FLAC__byte buffer[], unsigned *bytes, void *client_data)
static FLAC__StreamDecoderWriteStatus | flac_write_callback (const FLAC__StreamDecoder *decoder, const FLAC__Frame *frame, const FLAC__int32 *const buffer[], void *client_data)
static void | flac_metadata_callback (const FLAC__StreamDecoder *decoder, const FLAC__StreamMetadata *metadata, void *client_data)
static void | flac_error_callback (const FLAC__StreamDecoder *decoder, FLAC__StreamDecoderErrorStatus status, void *client_data)
static void | flac_reset (audio_decoder_t *this_gen)
static void | flac_discontinuity (audio_decoder_t *this_gen)
static void | flac_decode_data (audio_decoder_t *this_gen, buf_element_t *buf)
static void | flac_dispose (audio_decoder_t *this_gen)
static audio_decoder_t * | open_plugin (audio_decoder_class_t *class_gen, xine_stream_t *stream)
static void * | init_plugin (xine_t *xine, const void *data)

## Variables
static const uint32_t | audio_types []
static const decoder_info_t | dec_info_audio
const plugin_info_t xine_plugin_info[] | EXPORTED

## Macro Definition Documentation

## ◆ LEGACY_FLAC

#define LEGACY_FLAC

## ◆ LOG_MODULE

#define LOG_MODULE "flac_decoder"

## ◆ LOG_VERBOSE

#define LOG_VERBOSE

## Typedef Documentation

## ◆ flac_decoder_t

typedef struct flac_decoder_s flac_decoder_t

## Function Documentation

## ◆ flac_decode_data()

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

References _x_ao_channels2mode(), bits, BUF_FLAG_STDHEADER, buf_element_s::content, buf_element_s::decoder_flags, buf_element_s::decoder_info, lprintf, mode(), buf_element_s::pts, buf_element_s::size, and xine_fast_memcpy.

Referenced by open_plugin().

## ◆ flac_discontinuity()

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

References lprintf.

Referenced by open_plugin().

## ◆ flac_dispose()

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

Referenced by open_plugin().

## ◆ flac_error_callback()

static void flac_error_callback | ( | const FLAC__StreamDecoder * | decoder,
|  | FLAC__StreamDecoderErrorStatus | status,
|  | void * | client_data )
| static

References lprintf.

Referenced by open_plugin().

## ◆ flac_metadata_callback()

static void flac_metadata_callback | ( | const FLAC__StreamDecoder * | decoder,
|  | const FLAC__StreamMetadata * | metadata,
|  | void * | client_data )
| static

References lprintf, and metadata.

Referenced by open_plugin().

## ◆ flac_read_callback()

static FLAC__StreamDecoderReadStatus flac_read_callback | ( | const FLAC__StreamDecoder * | decoder,
|  | FLAC__byte | buffer[],
|  | unsigned * | bytes,
|  | void * | client_data )
| static

References lprintf, and xine_fast_memcpy.

Referenced by open_plugin().

## ◆ flac_reset()

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

Referenced by open_plugin().

## ◆ flac_write_callback()

static FLAC__StreamDecoderWriteStatus flac_write_callback | ( | const FLAC__StreamDecoder * | decoder,
|  | const FLAC__Frame * | frame,
|  | const FLAC__int32 *const | buffer[],
|  | void * | client_data )
| static

References lprintf, audio_buffer_s::mem, audio_buffer_s::mem_size, NULL, audio_buffer_s::num_frames, audio_buffer_s::stream, and audio_buffer_s::vpts.

Referenced by open_plugin().

## ◆ init_plugin()

static void * init_plugin | ( | xine_t * | xine,
|  | const void * | data )
| static

References audio_decoder_s::dispose, N_, NULL, audio_decoder_class_s::open_plugin, and open_plugin().

## ◆ open_plugin()

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

References flac_decode_data(), flac_discontinuity(), flac_dispose(), flac_error_callback(), flac_metadata_callback(), flac_read_callback(), flac_reset(), flac_write_callback(), and NULL.

Referenced by init_plugin().

## Variable Documentation

## ◆ audio_types

const uint32_t audio_types[]
| static

Initial value:
= {
BUF_AUDIO_FLAC, 0
}
BUF_AUDIO_FLAC
#define BUF_AUDIO_FLAC
Definition buffer.h:254

## ◆ dec_info_audio

const decoder_info_t dec_info_audio
| static

Initial value:
= {
.supported_types = audio_types,
.priority = 8,
}
audio_types
static const uint32_t audio_types[]
Definition flac_decoder.c:427

## ◆ EXPORTED

const plugin_info_t xine_plugin_info [] EXPORTED

Initial value:
= {
{ PLUGIN_DEMUX, 27, "flac", XINE_VERSION_CODE, NULL, demux_flac_init_class },
{ PLUGIN_AUDIO_DECODER, 16, "flacdec", XINE_VERSION_CODE, &dec_info_audio, init_plugin },
{ PLUGIN_NONE, 0, NULL, 0, NULL, NULL }
}
init_plugin
static void * init_plugin(xine_t *xine, const void *data)
Definition flac_decoder.c:415
dec_info_audio
static const decoder_info_t dec_info_audio
Definition flac_decoder.c:431
demux_flac_init_class
void * demux_flac_init_class(xine_t *xine, const void *data)
Definition flac_demuxer.c:723
XINE_VERSION_CODE
#define XINE_VERSION_CODE
Definition xine_internal.h:57
NULL
NULL
Definition xine_plugin.c:78
PLUGIN_DEMUX
#define PLUGIN_DEMUX
Definition xine_plugin.h:31
PLUGIN_AUDIO_DECODER
#define PLUGIN_AUDIO_DECODER
Definition xine_plugin.h:32
PLUGIN_NONE
#define PLUGIN_NONE
Definition xine_plugin.h:29