xine-lib: xine-lib-1.2.12/src/demuxers/demux_aiff.c File Reference

xine-lib 1.2.12

Data Structures | Macros | Functions
demux_aiff.c File Reference
`#include <stdio.h>`
`#include <fcntl.h>`
`#include <unistd.h>`
`#include <string.h>`
`#include <stdlib.h>`
`#include <ctype.h>`
`#include <xine/xine_internal.h>`
`#include <xine/xineutils.h>`
`#include <xine/demux.h>`
`#include <xine/buffer.h>`
`#include "bswap.h"`
`#include "group_audio.h"`

## Data Structures
struct | demux_aiff_t

## Macros
#define | FOURCC_TAG BE_FOURCC
#define | FORM_TAG FOURCC_TAG('F', 'O', 'R', 'M')
#define | AIFF_TAG FOURCC_TAG('A', 'I', 'F', 'F')
#define | COMM_TAG FOURCC_TAG('C', 'O', 'M', 'M')
#define | SSND_TAG FOURCC_TAG('S', 'S', 'N', 'D')
#define | APCM_TAG FOURCC_TAG('A', 'P', 'C', 'M')
#define | NAME_TAG FOURCC_TAG('N', 'A', 'M', 'E')
#define | AUTH_TAG FOURCC_TAG('A', 'U', 'T', 'H')
#define | COPY_TAG FOURCC_TAG('(', 'c', ')', ' ')
#define | ANNO_TAG FOURCC_TAG('A', 'N', 'N', 'O')
#define | PREAMBLE_SIZE 8
#define | AIFF_SIGNATURE_SIZE 12
#define | PCM_BLOCK_ALIGN 1024

## Functions
static int | extended_to_int (const unsigned char p[10])
static int | probe_aiff_file (input_plugin_t *input)
static int | open_aiff_file (demux_aiff_t *this)
static int | demux_aiff_send_chunk (demux_plugin_t *this_gen)
static void | demux_aiff_send_headers (demux_plugin_t *this_gen)
static int | demux_aiff_seek (demux_plugin_t *this_gen, off_t start_pos, int start_time, int playing)
static int | demux_aiff_get_status (demux_plugin_t *this_gen)
static int | demux_aiff_get_stream_length (demux_plugin_t *this_gen)
static uint32_t | demux_aiff_get_capabilities (demux_plugin_t *this_gen)
static int | demux_aiff_get_optional_data (demux_plugin_t *this_gen, void *data, int data_type)
static demux_plugin_t * | open_plugin (demux_class_t *class_gen, xine_stream_t *stream, input_plugin_t *input)
void * | demux_aiff_init_plugin (xine_t *xine, const void *data)

## Macro Definition Documentation

## ◆ AIFF_SIGNATURE_SIZE

#define AIFF_SIGNATURE_SIZE 12

## ◆ AIFF_TAG

#define AIFF_TAG FOURCC_TAG('A', 'I', 'F', 'F')

## ◆ ANNO_TAG

#define ANNO_TAG FOURCC_TAG('A', 'N', 'N', 'O')

## ◆ APCM_TAG

#define APCM_TAG FOURCC_TAG('A', 'P', 'C', 'M')

## ◆ AUTH_TAG

#define AUTH_TAG FOURCC_TAG('A', 'U', 'T', 'H')

## ◆ COMM_TAG

#define COMM_TAG FOURCC_TAG('C', 'O', 'M', 'M')

## ◆ COPY_TAG

#define COPY_TAG FOURCC_TAG('(', 'c', ')', ' ')

## ◆ FORM_TAG

#define FORM_TAG FOURCC_TAG('F', 'O', 'R', 'M')

## ◆ FOURCC_TAG

#define FOURCC_TAG BE_FOURCC

## ◆ NAME_TAG

#define NAME_TAG FOURCC_TAG('N', 'A', 'M', 'E')

## ◆ PCM_BLOCK_ALIGN

#define PCM_BLOCK_ALIGN 1024

## ◆ PREAMBLE_SIZE

#define PREAMBLE_SIZE 8

## ◆ SSND_TAG

#define SSND_TAG FOURCC_TAG('S', 'S', 'N', 'D')

## Function Documentation

## ◆ demux_aiff_get_capabilities()

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

References DEMUX_CAP_NOCAP.

Referenced by open_plugin().

## ◆ demux_aiff_get_optional_data()

static int demux_aiff_get_optional_data | ( | demux_plugin_t * | this_gen,
|  | void * | data,
|  | int | data_type
| ) |  |
| static

References DEMUX_OPTIONAL_UNSUPPORTED.

Referenced by open_plugin().

## ◆ demux_aiff_get_status()

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

Referenced by open_plugin().

## ◆ demux_aiff_get_stream_length()

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

Referenced by open_plugin().

## ◆ demux_aiff_init_plugin()

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

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

## ◆ demux_aiff_seek()

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

References _x_demux_flush_engine(), DEMUX_FINISHED, DEMUX_OK, input(), and INPUT_IS_SEEKABLE.

Referenced by open_plugin().

## ◆ demux_aiff_send_chunk()

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

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

Referenced by open_plugin().

## ◆ demux_aiff_send_headers()

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

References _x_demux_control_start(), _x_stream_info_set(), BUF_AUDIO_LPCM_BE, BUF_FLAG_FRAME_END, BUF_FLAG_HEADER, BUF_FLAG_STDHEADER, buf_element_s::decoder_flags, buf_element_s::decoder_info, DEMUX_OK, 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().

## ◆ extended_to_int()

static int extended_to_int | ( | const unsigned char | p[10] | ) |
| static

Referenced by open_aiff_file().

## ◆ open_aiff_file()

static int open_aiff_file | ( | demux_aiff_t * | this | ) |
| static

References _X_BE_16, _X_BE_32, AIFF_SIGNATURE_SIZE, ANNO_TAG, APCM_TAG, AUTH_TAG, COMM_TAG, COPY_TAG, DEMUX_FINISHED, extended_to_int(), input(), NAME_TAG, PCM_BLOCK_ALIGN, PREAMBLE_SIZE, and SSND_TAG.

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 xine_stream_s::content_detection_method, default_demux_plugin_dispose, demux_aiff_get_capabilities(), demux_aiff_get_optional_data(), demux_aiff_get_status(), demux_aiff_get_stream_length(), demux_aiff_seek(), demux_aiff_send_chunk(), demux_aiff_send_headers(), DEMUX_FINISHED, input(), METHOD_BY_CONTENT, METHOD_BY_MRL, METHOD_EXPLICIT, NULL, open_aiff_file(), and probe_aiff_file().

Referenced by demux_aiff_init_plugin().

## ◆ probe_aiff_file()

static int probe_aiff_file | ( | input_plugin_t * | input | ) |
| static

References _x_demux_read_header(), _x_is_fourcc(), AIFF_SIGNATURE_SIZE, and input().

Referenced by open_plugin().