xine-lib: xine-lib-1.2.13/src/demuxers/demux_4xm.c File Reference

xine-lib 1.2.13-20230125hg15249

Data Structures | Macros | Typedefs | Functions
demux_4xm.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 | AudioTrack
struct | demux_fourxm_t

## Macros
#define | LOG_MODULE "demux_4xm"
#define | LOG_VERBOSE
#define | FOURCC_TAG LE_FOURCC
#define | RIFF_TAG FOURCC_TAG('R', 'I', 'F', 'F')
#define | _4XMV_TAG FOURCC_TAG('4', 'X', 'M', 'V')
#define | LIST_TAG FOURCC_TAG('L', 'I', 'S', 'T')
#define | HEAD_TAG FOURCC_TAG('H', 'E', 'A', 'D')
#define | TRK__TAG FOURCC_TAG('T', 'R', 'K', '_')
#define | MOVI_TAG FOURCC_TAG('M', 'O', 'V', 'I')
#define | VTRK_TAG FOURCC_TAG('V', 'T', 'R', 'K')
#define | STRK_TAG FOURCC_TAG('S', 'T', 'R', 'K')
#define | std__TAG FOURCC_TAG('s', 't', 'd', '_')
#define | name_TAG FOURCC_TAG('n', 'a', 'm', 'e')
#define | vtrk_TAG FOURCC_TAG('v', 't', 'r', 'k')
#define | strk_TAG FOURCC_TAG('s', 't', 'r', 'k')
#define | ifrm_TAG FOURCC_TAG('i', 'f', 'r', 'm')
#define | pfrm_TAG FOURCC_TAG('p', 'f', 'r', 'm')
#define | cfrm_TAG FOURCC_TAG('c', 'f', 'r', 'm')
#define | snd__TAG FOURCC_TAG('s', 'n', 'd', '_')
#define | vtrk_SIZE 0x44
#define | strk_SIZE 0x28

## Typedefs
typedef struct AudioTrack | audio_track_t

## Functions
static float | get_le_float (unsigned char *buffer)
static int | probe_fourxm_file (input_plugin_t *input, uint32_t *header_size)
static int | open_fourxm_file (demux_fourxm_t *fourxm, uint32_t header_size)
static int | demux_fourxm_send_chunk (demux_plugin_t *this_gen)
static void | demux_fourxm_send_headers (demux_plugin_t *this_gen)
static int | demux_fourxm_seek (demux_plugin_t *this_gen, off_t start_pos, int start_time, int playing)
static int | demux_fourxm_get_status (demux_plugin_t *this_gen)
static int | demux_fourxm_get_stream_length (demux_plugin_t *this_gen)
static uint32_t | demux_fourxm_get_capabilities (demux_plugin_t *this_gen)
static int | demux_fourxm_get_optional_data (demux_plugin_t *this_gen, void *data, int data_type)
static void | demux_fourxm_dispose (demux_plugin_t *this_gen)
static demux_plugin_t * | open_plugin (demux_class_t *class_gen, xine_stream_t *stream, input_plugin_t *input)
void * | demux_fourxm_init_plugin (xine_t *xine, const void *data)

## Macro Definition Documentation

## ◆ _4XMV_TAG

#define _4XMV_TAG FOURCC_TAG('4', 'X', 'M', 'V')

## ◆ cfrm_TAG

#define cfrm_TAG FOURCC_TAG('c', 'f', 'r', 'm')

Referenced by demux_fourxm_send_chunk().

## ◆ FOURCC_TAG

#define FOURCC_TAG LE_FOURCC

## ◆ HEAD_TAG

#define HEAD_TAG FOURCC_TAG('H', 'E', 'A', 'D')

## ◆ ifrm_TAG

#define ifrm_TAG FOURCC_TAG('i', 'f', 'r', 'm')

Referenced by demux_fourxm_send_chunk().

## ◆ LIST_TAG

#define LIST_TAG FOURCC_TAG('L', 'I', 'S', 'T')

Referenced by demux_fourxm_send_chunk().

## ◆ LOG_MODULE

#define LOG_MODULE "demux_4xm"

## ◆ LOG_VERBOSE

#define LOG_VERBOSE

## ◆ MOVI_TAG

#define MOVI_TAG FOURCC_TAG('M', 'O', 'V', 'I')

## ◆ name_TAG

#define name_TAG FOURCC_TAG('n', 'a', 'm', 'e')

## ◆ pfrm_TAG

#define pfrm_TAG FOURCC_TAG('p', 'f', 'r', 'm')

Referenced by demux_fourxm_send_chunk().

## ◆ RIFF_TAG

#define RIFF_TAG FOURCC_TAG('R', 'I', 'F', 'F')

## ◆ snd__TAG

#define snd__TAG FOURCC_TAG('s', 'n', 'd', '_')

Referenced by demux_fourxm_send_chunk().

## ◆ std__TAG

#define std__TAG FOURCC_TAG('s', 't', 'd', '_')

Referenced by open_fourxm_file().

## ◆ strk_SIZE

#define strk_SIZE 0x28

Referenced by open_fourxm_file().

## ◆ STRK_TAG

#define STRK_TAG FOURCC_TAG('S', 'T', 'R', 'K')

## ◆ strk_TAG

#define strk_TAG FOURCC_TAG('s', 't', 'r', 'k')

Referenced by open_fourxm_file().

## ◆ TRK__TAG

#define TRK__TAG FOURCC_TAG('T', 'R', 'K', '_')

## ◆ vtrk_SIZE

#define vtrk_SIZE 0x44

Referenced by open_fourxm_file().

## ◆ VTRK_TAG

#define VTRK_TAG FOURCC_TAG('V', 'T', 'R', 'K')

## ◆ vtrk_TAG

#define vtrk_TAG FOURCC_TAG('v', 't', 'r', 'k')

Referenced by open_fourxm_file().

## Typedef Documentation

## ◆ audio_track_t

typedef struct AudioTrack audio_track_t

## Function Documentation

## ◆ demux_fourxm_dispose()

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

References _x_freep().

Referenced by open_plugin().

## ◆ demux_fourxm_get_capabilities()

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

References DEMUX_CAP_NOCAP.

Referenced by open_plugin().

## ◆ demux_fourxm_get_optional_data()

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

References DEMUX_OPTIONAL_UNSUPPORTED.

Referenced by open_plugin().

## ◆ demux_fourxm_get_status()

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

Referenced by open_plugin().

## ◆ demux_fourxm_get_stream_length()

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

Referenced by open_plugin().

## ◆ demux_fourxm_init_plugin()

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

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

## ◆ demux_fourxm_seek()

static int demux_fourxm_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_fourxm_send_chunk()

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

References _X_LE_32, BUF_FLAG_FRAME_END, BUF_FLAG_KEYFRAME, BUF_VIDEO_4XM, cfrm_TAG, buf_element_s::content, buf_element_s::decoder_flags, DEMUX_FINISHED, buf_element_s::extra_info, buf_element_s::free_buffer, ifrm_TAG, input(), extra_info_s::input_normpos, extra_info_s::input_time, LIST_TAG, lprintf, buf_element_s::max_size, NULL, pfrm_TAG, buf_element_s::pts, buf_element_s::size, snd__TAG, and buf_element_s::type.

Referenced by open_plugin().

## ◆ demux_fourxm_send_headers()

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

References _x_demux_control_start(), _x_stream_info_set(), bits, BUF_FLAG_FRAME_END, BUF_FLAG_FRAMERATE, BUF_FLAG_HEADER, BUF_FLAG_STDHEADER, BUF_VIDEO_4XM, buf_element_s::content, 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, XINE_STREAM_INFO_HAS_VIDEO, XINE_STREAM_INFO_VIDEO_HEIGHT, and XINE_STREAM_INFO_VIDEO_WIDTH.

Referenced by open_plugin().

## ◆ get_le_float()

static float get_le_float | ( | unsigned char * | buffer | ) |
| static

Referenced by open_fourxm_file().

## ◆ open_fourxm_file()

static int open_fourxm_file | ( | demux_fourxm_t * | fourxm,
|  | uint32_t | header_size )
| static

References _X_LE_32, AudioTrack::audio_type, demux_fourxm_t::bih, xine_bmiheader::biHeight, AudioTrack::bits, xine_bmiheader::biWidth, BUF_AUDIO_4X_ADPCM, BUF_AUDIO_LPCM_LE, AudioTrack::channels, demux_fourxm_t::duration_in_ms, demux_fourxm_t::filesize, get_le_float(), input_plugin_s::get_length, demux_fourxm_t::input, NULL, input_plugin_s::read, AudioTrack::sample_rate, input_plugin_s::seek, std__TAG, strk_SIZE, strk_TAG, demux_fourxm_t::track_count, demux_fourxm_t::tracks, demux_fourxm_t::video_pts, demux_fourxm_t::video_pts_inc, vtrk_SIZE, and vtrk_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, DEMUX_FINISHED, demux_fourxm_dispose(), demux_fourxm_get_capabilities(), demux_fourxm_get_optional_data(), demux_fourxm_get_status(), demux_fourxm_get_stream_length(), demux_fourxm_seek(), demux_fourxm_send_chunk(), demux_fourxm_send_headers(), input(), METHOD_BY_CONTENT, METHOD_BY_MRL, METHOD_EXPLICIT, NULL, open_fourxm_file(), probe_fourxm_file(), and input_plugin_s::seek.

Referenced by demux_fourxm_init_plugin().

## ◆ probe_fourxm_file()

static int probe_fourxm_file | ( | input_plugin_t * | input,
|  | uint32_t * | header_size )
| static

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

Referenced by open_plugin().