xine-lib 1.2.11
Data Structures | Macros | Functions | Variables
demux_flac.c File Reference
#include <stdio.h>
#include <fcntl.h>
#include <unistd.h>
#include <string.h>
#include <stdlib.h>
#include <xine/xine_internal.h>
#include <xine/xineutils.h>
#include <xine/compat.h>
#include <xine/demux.h>
#include "bswap.h"
#include "group_audio.h"
#include "id3.h"
#include "flacutils.h"

Data Structures

struct  demux_flac_t
 

Macros

#define LOG_MODULE   "demux_flac"
 
#define LOG_VERBOSE
 
#define USE_FRAME_BUF
 

Functions

static void flac_init_frame_head (demux_flac_t *flac)
 
static void flac_reset_head (demux_flac_t *flac)
 
static uint32_t flac_test_frame_head (demux_flac_t *flac, uint32_t len)
 
static int flac_parse_frame_head (demux_flac_t *flac)
 
static int flac_get_frame (demux_flac_t *flac)
 
static int open_flac_file (demux_flac_t *flac)
 
static int demux_flac_send_chunk (demux_plugin_t *this_gen)
 
static void demux_flac_send_headers (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 void demux_flac_dispose (demux_plugin_t *this_gen)
 
static int demux_flac_get_status (demux_plugin_t *this_gen)
 
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 data_type)
 
static demux_plugin_topen_plugin (demux_class_t *class_gen, xine_stream_t *stream, input_plugin_t *input)
 
void * demux_flac_init_plugin (xine_t *xine, const void *data)
 

Variables

static const uint32_t flac_sample_rates [16]
 
static const uint32_t flac_blocksizes [16]
 
static const uint8_t flac_sample_sizes [8]
 
static const uint8_t flac_channels [16]
 

Macro Definition Documentation

◆ LOG_MODULE

#define LOG_MODULE   "demux_flac"

◆ LOG_VERBOSE

#define LOG_VERBOSE

◆ USE_FRAME_BUF

#define USE_FRAME_BUF

Function Documentation

◆ demux_flac_dispose()

static void demux_flac_dispose ( demux_plugin_t this_gen)
static

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.

Referenced by open_plugin().

◆ demux_flac_get_optional_data()

static int demux_flac_get_optional_data ( demux_plugin_t this_gen,
void *  data,
int  data_type 
)
static

References DEMUX_OPTIONAL_UNSUPPORTED.

Referenced by open_plugin().

◆ demux_flac_get_status()

static int demux_flac_get_status ( demux_plugin_t this_gen)
static

Referenced by open_plugin().

◆ demux_flac_get_stream_length()

static int demux_flac_get_stream_length ( demux_plugin_t this_gen)
static

Referenced by open_plugin().

◆ demux_flac_init_plugin()

void * demux_flac_init_plugin ( 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_get_frame()

static int flac_get_frame ( demux_flac_t flac)
static

◆ flac_init_frame_head()

static void flac_init_frame_head ( demux_flac_t flac)
static

References demux_flac_t::frame_head_crc_tab.

Referenced by open_plugin().

◆ flac_parse_frame_head()

static int flac_parse_frame_head ( demux_flac_t flac)
static

◆ flac_reset_head()

static void flac_reset_head ( demux_flac_t flac)
static

◆ flac_test_frame_head()

static uint32_t flac_test_frame_head ( demux_flac_t flac,
uint32_t  len 
)
static

◆ open_flac_file()

static int open_flac_file ( demux_flac_t flac)
static

◆ open_plugin()

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

Variable Documentation

◆ flac_blocksizes

const uint32_t flac_blocksizes[16]
static
Initial value:
= {
0, 192, 576, 2 * 576,
4 * 576, 8 * 576, 1, 2,
256, 2 * 256, 4 * 256, 8 * 256,
16 * 256, 32 * 256, 64 * 256, 128 * 256
}

Referenced by flac_parse_frame_head().

◆ flac_channels

const uint8_t flac_channels[16]
static
Initial value:
= {
1,
2,
3,
4,
5,
6,
7,
8,
2,
2,
2,
0,
0,
0,
0,
0
}

Referenced by flac_parse_frame_head().

◆ flac_sample_rates

const uint32_t flac_sample_rates[16]
static
Initial value:
= {
0, 88200, 176400, 192000,
8000, 16000, 22050, 24000,
32000, 44100, 48000, 96000,
1, 2, 3, 0
}

Referenced by flac_parse_frame_head().

◆ flac_sample_sizes

const uint8_t flac_sample_sizes[8]
static
Initial value:
= {
0, 8, 12, 0,
16, 20, 24, 0
}

Referenced by flac_parse_frame_head().