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

xine-lib 1.2.12

Data Structures | Macros | Typedefs | Functions
flac_demuxer.c File Reference
`#include <stdio.h>`
`#include <fcntl.h>`
`#include <unistd.h>`
`#include <sched.h>`
`#include <string.h>`
`#include <stdlib.h>`
`#include <FLAC/stream_decoder.h>`
`#include <FLAC/seekable_stream_decoder.h>`
`#include <xine/xine_internal.h>`
`#include <xine/xineutils.h>`
`#include <xine/demux.h>`
`#include "flac_demuxer.h"`

## Data Structures
struct | demux_flac_s

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

## Typedefs
typedef struct demux_flac_s | demux_flac_t

## Functions
static FLAC__SeekableStreamDecoderReadStatus | flac_read_callback (const FLAC__SeekableStreamDecoder *decoder, FLAC__byte buffer[], unsigned *bytes, void *client_data)
static FLAC__SeekableStreamDecoderSeekStatus | flac_seek_callback (const FLAC__SeekableStreamDecoder *decoder, FLAC__uint64 absolute_byte_offset, void *client_data)
static FLAC__SeekableStreamDecoderTellStatus | flac_tell_callback (const FLAC__SeekableStreamDecoder *decoder, FLAC__uint64 *absolute_byte_offset, void *client_data)
static FLAC__SeekableStreamDecoderLengthStatus | flac_length_callback (const FLAC__SeekableStreamDecoder *decoder, FLAC__uint64 *stream_length, void *client_data)
static FLAC__bool | flac_eof_callback (const FLAC__SeekableStreamDecoder *decoder, void *client_data)
static FLAC__StreamDecoderWriteStatus | flac_write_callback (const FLAC__SeekableStreamDecoder *decoder, const FLAC__Frame *frame, const FLAC__int32 *const buffer[], void *client_data)
static void | flac_metadata_callback (const FLAC__SeekableStreamDecoder *decoder, const FLAC__StreamMetadata *metadata, void *client_data)
static void | flac_error_callback (const FLAC__SeekableStreamDecoder *decoder, FLAC__StreamDecoderErrorStatus status, void *client_data)
static int | demux_flac_send_chunk (demux_plugin_t *this_gen)
static void | demux_flac_send_headers (demux_plugin_t *this_gen)
static void | demux_flac_dispose (demux_plugin_t *this_gen)
static int | demux_flac_get_status (demux_plugin_t *this_gen)
static int | demux_flac_seek (demux_plugin_t *this_gen, off_t start_pos, int start_time, int playing)
static int | demux_flac_get_stream_length (demux_plugin_t *this_gen)
static uint32_t | demux_flac_get_capabilities (demux_plugin_t *this_gen)
static int | demux_flac_get_optional_data (demux_plugin_t *this_gen, void *data, int dtype)
static demux_plugin_t * | open_plugin (demux_class_t *class_gen, xine_stream_t *stream, input_plugin_t *input)
void * | demux_flac_init_class (xine_t *xine, const void *data)

## Macro Definition Documentation

## ◆ LEGACY_FLAC

#define LEGACY_FLAC

## ◆ LOG_MODULE

#define LOG_MODULE "demux_flac"

## ◆ LOG_VERBOSE

#define LOG_VERBOSE

## Typedef Documentation

## ◆ demux_flac_t

typedef struct demux_flac_s demux_flac_t

## Function Documentation

## ◆ demux_flac_dispose()

static void demux_flac_dispose | ( | demux_plugin_t * | this_gen | ) |
| static

References lprintf.

Referenced by open_plugin().

## ◆ demux_flac_get_capabilities()

static uint32_t demux_flac_get_capabilities | ( | demux_plugin_t * | this_gen | ) |
| static

References DEMUX_CAP_NOCAP, and lprintf.

Referenced by open_plugin().

## ◆ demux_flac_get_optional_data()

static int demux_flac_get_optional_data | ( | demux_plugin_t * | this_gen,
|  | void * | data,
|  | int | dtype
| ) |  |
| static

References DEMUX_OPTIONAL_UNSUPPORTED, and lprintf.

Referenced by open_plugin().

## ◆ demux_flac_get_status()

static int demux_flac_get_status | ( | demux_plugin_t * | this_gen | ) |
| static

References lprintf.

Referenced by open_plugin().

## ◆ demux_flac_get_stream_length()

static int demux_flac_get_stream_length | ( | demux_plugin_t * | this_gen | ) |
| static

References lprintf.

Referenced by open_plugin().

## ◆ demux_flac_init_class()

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

References lprintf, N_, NULL, open_plugin(), and demux_class_s::open_plugin.

## ◆ demux_flac_seek()

static int demux_flac_seek | ( | demux_plugin_t * | this_gen,
|  | off_t | start_pos,
|  | int | start_time,
|  | int | playing
| ) |  |
| static

References _x_demux_flush_engine(), DEMUX_FINISHED, input(), and lprintf.

Referenced by open_plugin().

## ◆ demux_flac_send_chunk()

static int demux_flac_send_chunk | ( | demux_plugin_t * | this_gen | ) |
| static

References _x_demux_control_newpts(), BUF_AUDIO_FLAC, BUF_FLAG_SEEK, buf_element_s::content, DEMUX_FINISHED, buf_element_s::extra_info, buf_element_s::free_buffer, input(), extra_info_s::input_normpos, extra_info_s::input_time, lprintf, buf_element_s::max_size, NULL, buf_element_s::pts, buf_element_s::size, and buf_element_s::type.

Referenced by open_plugin().

## ◆ demux_flac_send_headers()

static void demux_flac_send_headers | ( | demux_plugin_t * | this_gen | ) |
| static

References _x_demux_control_start(), _x_stream_info_set(), BUF_AUDIO_FLAC, BUF_FLAG_FRAME_END, BUF_FLAG_HEADER, BUF_FLAG_STDHEADER, buf_element_s::decoder_flags, buf_element_s::decoder_info, DEMUX_OK, lprintf, buf_element_s::size, buf_element_s::type, XINE_STREAM_INFO_AUDIO_BITS, XINE_STREAM_INFO_AUDIO_CHANNELS, XINE_STREAM_INFO_AUDIO_SAMPLERATE, XINE_STREAM_INFO_HAS_AUDIO, and XINE_STREAM_INFO_HAS_VIDEO.

Referenced by open_plugin().

## ◆ flac_eof_callback()

static FLAC__bool flac_eof_callback | ( | const FLAC__SeekableStreamDecoder * | decoder,
|  | void * | client_data
| ) |  |
| static

References DEMUX_FINISHED, and lprintf.

Referenced by open_plugin().

## ◆ flac_error_callback()

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

References DEMUX_FINISHED, XINE_VERBOSITY_DEBUG, and xprintf.

Referenced by open_plugin().

## ◆ flac_length_callback()

static FLAC__SeekableStreamDecoderLengthStatus flac_length_callback | ( | const FLAC__SeekableStreamDecoder * | decoder,
|  | FLAC__uint64 * | stream_length,
|  | void * | client_data
| ) |  |
| static

References input(), and lprintf.

Referenced by open_plugin().

## ◆ flac_metadata_callback()

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

References lprintf, and metadata.

Referenced by open_plugin().

## ◆ flac_read_callback()

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

References DEMUX_FINISHED, input(), and lprintf.

Referenced by open_plugin().

## ◆ flac_seek_callback()

static FLAC__SeekableStreamDecoderSeekStatus flac_seek_callback | ( | const FLAC__SeekableStreamDecoder * | decoder,
|  | FLAC__uint64 | absolute_byte_offset,
|  | void * | client_data
| ) |  |
| static

References input(), and lprintf.

Referenced by open_plugin().

## ◆ flac_tell_callback()

static FLAC__SeekableStreamDecoderTellStatus flac_tell_callback | ( | const FLAC__SeekableStreamDecoder * | decoder,
|  | FLAC__uint64 * | absolute_byte_offset,
|  | void * | client_data
| ) |  |
| static

References input(), and lprintf.

Referenced by open_plugin().

## ◆ flac_write_callback()

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

References lprintf.

Referenced by open_plugin().

## ◆ open_plugin()

static demux_plugin_t * open_plugin | ( | demux_class_t * | class_gen,
|  | xine_stream_t * | stream,
|  | input_plugin_t * | input
| ) |  |
| static

References _x_demux_read_header(), xine_stream_s::content_detection_method, demux_flac_dispose(), demux_flac_get_capabilities(), demux_flac_get_optional_data(), demux_flac_get_status(), demux_flac_get_stream_length(), demux_flac_seek(), demux_flac_send_chunk(), demux_flac_send_headers(), DEMUX_OK, flac_eof_callback(), flac_error_callback(), flac_length_callback(), flac_metadata_callback(), flac_read_callback(), flac_seek_callback(), flac_tell_callback(), flac_write_callback(), input_plugin_s::get_current_pos, input_plugin_s::get_length, input(), lprintf, METHOD_BY_CONTENT, METHOD_BY_MRL, METHOD_EXPLICIT, and NULL.

Referenced by demux_flac_init_class().