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

xine-lib 1.2.12

Data Structures | Macros | Functions
demux_ipmovie.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_ipmovie_t

## Macros
#define | LOG_MODULE "demux_ipmovie"
#define | LOG_VERBOSE
#define | IPMOVIE_SIGNATURE "Interplay MVE File\x1A\0"
#define | IPMOVIE_SIGNATURE_SIZE 20
#define | CHUNK_PREAMBLE_SIZE 4
#define | OPCODE_PREAMBLE_SIZE 4
#define | CHUNK_INIT_AUDIO 0x0000
#define | CHUNK_AUDIO_ONLY 0x0001
#define | CHUNK_INIT_VIDEO 0x0002
#define | CHUNK_VIDEO 0x0003
#define | CHUNK_SHUTDOWN 0x0004
#define | CHUNK_END 0x0005
#define | CHUNK_BAD 0xFFFF
#define | OPCODE_END_OF_STREAM 0x00
#define | OPCODE_END_OF_CHUNK 0x01
#define | OPCODE_CREATE_TIMER 0x02
#define | OPCODE_INIT_AUDIO_BUFFERS 0x03
#define | OPCODE_START_STOP_AUDIO 0x04
#define | OPCODE_INIT_VIDEO_BUFFERS 0x05
#define | OPCODE_UNKNOWN_06 0x06
#define | OPCODE_SEND_BUFFER 0x07
#define | OPCODE_AUDIO_FRAME 0x08
#define | OPCODE_SILENCE_FRAME 0x09
#define | OPCODE_INIT_VIDEO_MODE 0x0A
#define | OPCODE_CREATE_GRADIENT 0x0B
#define | OPCODE_SET_PALETTE 0x0C
#define | OPCODE_SET_PALETTE_COMPRESSED 0x0D
#define | OPCODE_UNKNOWN_0E 0x0E
#define | OPCODE_SET_DECODING_MAP 0x0F
#define | OPCODE_UNKNOWN_10 0x10
#define | OPCODE_VIDEO_DATA 0x11
#define | OPCODE_UNKNOWN_12 0x12
#define | OPCODE_UNKNOWN_13 0x13
#define | OPCODE_UNKNOWN_14 0x14
#define | OPCODE_UNKNOWN_15 0x15
#define | PALETTE_COUNT 256

## Functions
static int | process_ipmovie_chunk (demux_ipmovie_t *this)
static int | open_ipmovie_file (demux_ipmovie_t *this)
static int | demux_ipmovie_send_chunk (demux_plugin_t *this_gen)
static void | demux_ipmovie_send_headers (demux_plugin_t *this_gen)
static int | demux_ipmovie_seek (demux_plugin_t *this_gen, off_t start_pos, int start_time, int playing)
static void | demux_ipmovie_dispose (demux_plugin_t *this_gen)
static int | demux_ipmovie_get_status (demux_plugin_t *this_gen)
static int | demux_ipmovie_get_stream_length (demux_plugin_t *this_gen)
static uint32_t | demux_ipmovie_get_capabilities (demux_plugin_t *this_gen)
static int | demux_ipmovie_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_ipmovie_init_plugin (xine_t *xine, const void *data)

## Macro Definition Documentation

## ◆ CHUNK_AUDIO_ONLY

#define CHUNK_AUDIO_ONLY 0x0001

## ◆ CHUNK_BAD

#define CHUNK_BAD 0xFFFF

## ◆ CHUNK_END

#define CHUNK_END 0x0005

## ◆ CHUNK_INIT_AUDIO

#define CHUNK_INIT_AUDIO 0x0000

## ◆ CHUNK_INIT_VIDEO

#define CHUNK_INIT_VIDEO 0x0002

## ◆ CHUNK_PREAMBLE_SIZE

#define CHUNK_PREAMBLE_SIZE 4

## ◆ CHUNK_SHUTDOWN

#define CHUNK_SHUTDOWN 0x0004

## ◆ CHUNK_VIDEO

#define CHUNK_VIDEO 0x0003

## ◆ IPMOVIE_SIGNATURE

#define IPMOVIE_SIGNATURE "Interplay MVE File\x1A\0"

## ◆ IPMOVIE_SIGNATURE_SIZE

#define IPMOVIE_SIGNATURE_SIZE 20

## ◆ LOG_MODULE

#define LOG_MODULE "demux_ipmovie"

## ◆ LOG_VERBOSE

#define LOG_VERBOSE

## ◆ OPCODE_AUDIO_FRAME

#define OPCODE_AUDIO_FRAME 0x08

## ◆ OPCODE_CREATE_GRADIENT

#define OPCODE_CREATE_GRADIENT 0x0B

## ◆ OPCODE_CREATE_TIMER

#define OPCODE_CREATE_TIMER 0x02

## ◆ OPCODE_END_OF_CHUNK

#define OPCODE_END_OF_CHUNK 0x01

## ◆ OPCODE_END_OF_STREAM

#define OPCODE_END_OF_STREAM 0x00

## ◆ OPCODE_INIT_AUDIO_BUFFERS

#define OPCODE_INIT_AUDIO_BUFFERS 0x03

## ◆ OPCODE_INIT_VIDEO_BUFFERS

#define OPCODE_INIT_VIDEO_BUFFERS 0x05

## ◆ OPCODE_INIT_VIDEO_MODE

#define OPCODE_INIT_VIDEO_MODE 0x0A

## ◆ OPCODE_PREAMBLE_SIZE

#define OPCODE_PREAMBLE_SIZE 4

## ◆ OPCODE_SEND_BUFFER

#define OPCODE_SEND_BUFFER 0x07

## ◆ OPCODE_SET_DECODING_MAP

#define OPCODE_SET_DECODING_MAP 0x0F

## ◆ OPCODE_SET_PALETTE

#define OPCODE_SET_PALETTE 0x0C

## ◆ OPCODE_SET_PALETTE_COMPRESSED

#define OPCODE_SET_PALETTE_COMPRESSED 0x0D

## ◆ OPCODE_SILENCE_FRAME

#define OPCODE_SILENCE_FRAME 0x09

## ◆ OPCODE_START_STOP_AUDIO

#define OPCODE_START_STOP_AUDIO 0x04

## ◆ OPCODE_UNKNOWN_06

#define OPCODE_UNKNOWN_06 0x06

## ◆ OPCODE_UNKNOWN_0E

#define OPCODE_UNKNOWN_0E 0x0E

## ◆ OPCODE_UNKNOWN_10

#define OPCODE_UNKNOWN_10 0x10

## ◆ OPCODE_UNKNOWN_12

#define OPCODE_UNKNOWN_12 0x12

## ◆ OPCODE_UNKNOWN_13

#define OPCODE_UNKNOWN_13 0x13

## ◆ OPCODE_UNKNOWN_14

#define OPCODE_UNKNOWN_14 0x14

## ◆ OPCODE_UNKNOWN_15

#define OPCODE_UNKNOWN_15 0x15

## ◆ OPCODE_VIDEO_DATA

#define OPCODE_VIDEO_DATA 0x11

## ◆ PALETTE_COUNT

#define PALETTE_COUNT 256

## Function Documentation

## ◆ demux_ipmovie_dispose()

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

References _x_freep().

Referenced by open_plugin().

## ◆ demux_ipmovie_get_capabilities()

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

References DEMUX_CAP_NOCAP.

Referenced by open_plugin().

## ◆ demux_ipmovie_get_optional_data()

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

References DEMUX_OPTIONAL_UNSUPPORTED.

Referenced by open_plugin().

## ◆ demux_ipmovie_get_status()

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

Referenced by open_plugin().

## ◆ demux_ipmovie_get_stream_length()

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

Referenced by open_plugin().

## ◆ demux_ipmovie_init_plugin()

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

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

## ◆ demux_ipmovie_seek()

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

References _x_demux_control_newpts(), and DEMUX_OK.

Referenced by open_plugin().

## ◆ demux_ipmovie_send_chunk()

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

References CHUNK_BAD, DEMUX_FINISHED, and process_ipmovie_chunk().

Referenced by open_plugin().

## ◆ demux_ipmovie_send_headers()

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

References _x_demux_control_start(), _x_stream_info_set(), BUF_FLAG_FRAME_END, BUF_FLAG_FRAMERATE, BUF_FLAG_HEADER, BUF_FLAG_SPECIAL, BUF_FLAG_STDHEADER, BUF_SPECIAL_PALETTE, BUF_VIDEO_INTERPLAY, buf_element_s::content, buf_element_s::decoder_flags, buf_element_s::decoder_info, buf_element_s::decoder_info_ptr, DEMUX_OK, buf_element_s::size, buf_element_s::type, 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().

## ◆ open_ipmovie_file()

static int open_ipmovie_file | ( | demux_ipmovie_t * | this | ) |
| static

References _x_demux_read_header(), CHUNK_INIT_AUDIO, CHUNK_INIT_VIDEO, input(), IPMOVIE_SIGNATURE, IPMOVIE_SIGNATURE_SIZE, lprintf, and process_ipmovie_chunk().

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_ipmovie_dispose(), demux_ipmovie_get_capabilities(), demux_ipmovie_get_optional_data(), demux_ipmovie_get_status(), demux_ipmovie_get_stream_length(), demux_ipmovie_seek(), demux_ipmovie_send_chunk(), demux_ipmovie_send_headers(), input(), METHOD_BY_CONTENT, METHOD_BY_MRL, METHOD_EXPLICIT, NULL, and open_ipmovie_file().

Referenced by demux_ipmovie_init_plugin().

## ◆ process_ipmovie_chunk()

static int process_ipmovie_chunk | ( | demux_ipmovie_t * | this | ) |
| static

References _x_freep(), _X_LE_16, _X_LE_32, BUF_AUDIO_INTERPLAY, BUF_AUDIO_LPCM_LE, BUF_FLAG_FRAME_END, BUF_FLAG_FRAMERATE, BUF_FLAG_HEADER, BUF_FLAG_KEYFRAME, BUF_FLAG_SPECIAL, BUF_SPECIAL_PALETTE, BUF_VIDEO_INTERPLAY, CHUNK_AUDIO_ONLY, CHUNK_BAD, CHUNK_END, CHUNK_INIT_AUDIO, CHUNK_INIT_VIDEO, CHUNK_PREAMBLE_SIZE, CHUNK_SHUTDOWN, CHUNK_VIDEO, 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, OPCODE_AUDIO_FRAME, OPCODE_CREATE_GRADIENT, OPCODE_CREATE_TIMER, OPCODE_END_OF_CHUNK, OPCODE_END_OF_STREAM, OPCODE_INIT_AUDIO_BUFFERS, OPCODE_INIT_VIDEO_BUFFERS, OPCODE_INIT_VIDEO_MODE, OPCODE_PREAMBLE_SIZE, OPCODE_SEND_BUFFER, OPCODE_SET_DECODING_MAP, OPCODE_SET_PALETTE, OPCODE_SET_PALETTE_COMPRESSED, OPCODE_SILENCE_FRAME, OPCODE_START_STOP_AUDIO, OPCODE_UNKNOWN_06, OPCODE_UNKNOWN_0E, OPCODE_UNKNOWN_10, OPCODE_UNKNOWN_12, OPCODE_UNKNOWN_13, OPCODE_UNKNOWN_14, OPCODE_UNKNOWN_15, OPCODE_VIDEO_DATA, buf_element_s::pts, buf_element_s::size, and buf_element_s::type.

Referenced by demux_ipmovie_send_chunk(), and open_ipmovie_file().