xine-lib 1.2.11
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_topen_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 
)

◆ demux_flac_seek()

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

◆ demux_flac_send_chunk()

static int demux_flac_send_chunk ( demux_plugin_t this_gen)
static

◆ demux_flac_send_headers()

static void demux_flac_send_headers ( demux_plugin_t this_gen)
static

◆ 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