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

xine-lib 1.2.12

Data Structures | Macros | Functions | Variables
demux_wc3movie.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_games.h"`

## Data Structures
struct | demux_mve_t

## Macros
#define | LOG_MODULE "demux_wc3movie"
#define | LOG_VERBOSE
#define | FOURCC_TAG BE_FOURCC
#define | FORM_TAG FOURCC_TAG('F', 'O', 'R', 'M')
#define | MOVE_TAG FOURCC_TAG('M', 'O', 'V', 'E')
#define | PC_TAG FOURCC_TAG('_', 'P', 'C', '_')
#define | SOND_TAG FOURCC_TAG('S', 'O', 'N', 'D')
#define | PALT_TAG FOURCC_TAG('P', 'A', 'L', 'T')
#define | INDX_TAG FOURCC_TAG('I', 'N', 'D', 'X')
#define | BNAM_TAG FOURCC_TAG('B', 'N', 'A', 'M')
#define | SIZE_TAG FOURCC_TAG('S', 'I', 'Z', 'E')
#define | BRCH_TAG FOURCC_TAG('B', 'R', 'C', 'H')
#define | SHOT_TAG FOURCC_TAG('S', 'H', 'O', 'T')
#define | VGA_TAG FOURCC_TAG('V', 'G', 'A', ' ')
#define | AUDI_TAG FOURCC_TAG('A', 'U', 'D', 'I')
#define | TEXT_TAG FOURCC_TAG('T', 'E', 'X', 'T')
#define | PALETTE_SIZE 256
#define | PALETTE_CHUNK_SIZE (PALETTE_SIZE * 3)
#define | WC3_FRAMERATE 15
#define | WC3_PTS_INC (90000 / 15)
#define | WC3_USUAL_WIDTH 320
#define | WC3_USUAL_HEIGHT 165
#define | WC3_HEADER_SIZE 16
#define | PREAMBLE_SIZE 8

## Functions
static int | demux_mve_send_chunk (demux_plugin_t *this_gen)
static void | demux_mve_send_headers (demux_plugin_t *this_gen)
static int | probe_mve_file (input_plugin_t *input)
static int | open_mve_file (demux_mve_t *this)
static int | demux_mve_seek (demux_plugin_t *this_gen, off_t start_pos, int start_time, int playing)
static void | demux_mve_dispose (demux_plugin_t *this_gen)
static int | demux_mve_get_status (demux_plugin_t *this_gen)
static int | demux_mve_get_stream_length (demux_plugin_t *this_gen)
static uint32_t | demux_mve_get_capabilities (demux_plugin_t *this_gen)
static int | demux_mve_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_wc3movie_init_plugin (xine_t *xine, const void *data)

## Variables
static const unsigned char | wc3_pal_lookup []

## Macro Definition Documentation

## ◆ AUDI_TAG

#define AUDI_TAG FOURCC_TAG('A', 'U', 'D', 'I')

## ◆ BNAM_TAG

#define BNAM_TAG FOURCC_TAG('B', 'N', 'A', 'M')

## ◆ BRCH_TAG

#define BRCH_TAG FOURCC_TAG('B', 'R', 'C', 'H')

## ◆ FORM_TAG

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

## ◆ FOURCC_TAG

#define FOURCC_TAG BE_FOURCC

## ◆ INDX_TAG

#define INDX_TAG FOURCC_TAG('I', 'N', 'D', 'X')

## ◆ LOG_MODULE

#define LOG_MODULE "demux_wc3movie"

## ◆ LOG_VERBOSE

#define LOG_VERBOSE

## ◆ MOVE_TAG

#define MOVE_TAG FOURCC_TAG('M', 'O', 'V', 'E')

## ◆ PALETTE_CHUNK_SIZE

#define PALETTE_CHUNK_SIZE (PALETTE_SIZE * 3)

## ◆ PALETTE_SIZE

#define PALETTE_SIZE 256

## ◆ PALT_TAG

#define PALT_TAG FOURCC_TAG('P', 'A', 'L', 'T')

## ◆ PC_TAG

#define PC_TAG FOURCC_TAG('_', 'P', 'C', '_')

## ◆ PREAMBLE_SIZE

#define PREAMBLE_SIZE 8

## ◆ SHOT_TAG

#define SHOT_TAG FOURCC_TAG('S', 'H', 'O', 'T')

## ◆ SIZE_TAG

#define SIZE_TAG FOURCC_TAG('S', 'I', 'Z', 'E')

## ◆ SOND_TAG

#define SOND_TAG FOURCC_TAG('S', 'O', 'N', 'D')

## ◆ TEXT_TAG

#define TEXT_TAG FOURCC_TAG('T', 'E', 'X', 'T')

## ◆ VGA_TAG

#define VGA_TAG FOURCC_TAG('V', 'G', 'A', ' ')

## ◆ WC3_FRAMERATE

#define WC3_FRAMERATE 15

## ◆ WC3_HEADER_SIZE

#define WC3_HEADER_SIZE 16

## ◆ WC3_PTS_INC

#define WC3_PTS_INC (90000 / 15)

## ◆ WC3_USUAL_HEIGHT

#define WC3_USUAL_HEIGHT 165

## ◆ WC3_USUAL_WIDTH

#define WC3_USUAL_WIDTH 320

## Function Documentation

## ◆ demux_mve_dispose()

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

References _x_freep().

Referenced by open_plugin().

## ◆ demux_mve_get_capabilities()

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

References DEMUX_CAP_NOCAP.

Referenced by open_plugin().

## ◆ demux_mve_get_optional_data()

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

References DEMUX_OPTIONAL_UNSUPPORTED.

Referenced by open_plugin().

## ◆ demux_mve_get_status()

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

Referenced by open_plugin().

## ◆ demux_mve_get_stream_length()

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

Referenced by open_plugin().

## ◆ demux_mve_seek()

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

References _X_BE_32, _x_demux_flush_engine(), DEMUX_FINISHED, DEMUX_OK, input(), INPUT_IS_SEEKABLE, PREAMBLE_SIZE, and SHOT_TAG.

Referenced by open_plugin().

## ◆ demux_mve_send_chunk()

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

References _, _X_BE_32, _x_demux_control_newpts(), _X_LE_32, AUDI_TAG, BRCH_TAG, BUF_AUDIO_LPCM_LE, BUF_FLAG_FRAME_END, BUF_FLAG_HEADER, BUF_FLAG_SEEK, BUF_FLAG_SPECIAL, BUF_SPECIAL_PALETTE, BUF_VIDEO_WC3, buf_element_s::content, buf_element_s::decoder_flags, buf_element_s::decoder_info, buf_element_s::decoder_info_ptr, 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, PALETTE_SIZE, PREAMBLE_SIZE, buf_element_s::pts, SHOT_TAG, buf_element_s::size, TEXT_TAG, buf_element_s::type, VGA_TAG, WC3_PTS_INC, xine_log(), and XINE_LOG_MSG.

Referenced by open_plugin().

## ◆ demux_mve_send_headers()

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

References _x_demux_control_start(), _x_stream_info_set(), BUF_AUDIO_LPCM_LE, BUF_FLAG_FRAME_END, BUF_FLAG_FRAMERATE, BUF_FLAG_HEADER, BUF_FLAG_STDHEADER, BUF_VIDEO_WC3, buf_element_s::content, buf_element_s::decoder_flags, buf_element_s::decoder_info, DEMUX_OK, buf_element_s::size, buf_element_s::type, WC3_PTS_INC, XINE_STREAM_INFO_AUDIO_BITS, XINE_STREAM_INFO_AUDIO_CHANNELS, XINE_STREAM_INFO_AUDIO_SAMPLERATE, XINE_STREAM_INFO_HAS_AUDIO, XINE_STREAM_INFO_HAS_VIDEO, XINE_STREAM_INFO_VIDEO_HEIGHT, and XINE_STREAM_INFO_VIDEO_WIDTH.

Referenced by open_plugin().

## ◆ demux_wc3movie_init_plugin()

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

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

## ◆ open_mve_file()

static int open_mve_file | ( | demux_mve_t * | this | ) |
| static

References _, _X_BE_32, _x_is_fourcc(), _X_LE_32, _x_meta_info_set(), BNAM_TAG, BRCH_TAG, INDX_TAG, input(), lprintf, PALETTE_CHUNK_SIZE, PALETTE_SIZE, PREAMBLE_SIZE, SIZE_TAG, wc3_pal_lookup, WC3_USUAL_HEIGHT, WC3_USUAL_WIDTH, xine_log(), XINE_LOG_MSG, XINE_META_INFO_TITLE, and xine_xcalloc().

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, DEMUX_FINISHED, demux_mve_dispose(), demux_mve_get_capabilities(), demux_mve_get_optional_data(), demux_mve_get_status(), demux_mve_get_stream_length(), demux_mve_seek(), demux_mve_send_chunk(), demux_mve_send_headers(), input(), METHOD_BY_CONTENT, METHOD_BY_MRL, METHOD_EXPLICIT, NULL, open_mve_file(), and probe_mve_file().

Referenced by demux_wc3movie_init_plugin().

## ◆ probe_mve_file()

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

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

Referenced by open_plugin().

## Variable Documentation

## ◆ wc3_pal_lookup

const unsigned char wc3_pal_lookup[]
| static

Referenced by open_mve_file().