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

xine-lib 1.2.13-20230125hg15249

Data Structures | Macros | Functions
demux_str.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_str_t

## Macros
#define | LOG_MODULE "demux_str"
#define | LOG_VERBOSE
#define | STR_CHECK_BYTES (0x2C + 0x30)
#define | CD_RAW_SECTOR_SIZE 2352
#define | STR_MAGIC "\x60\x01\x01\x80"
#define | STR_MAX_CHANNELS 32
#define | CDXA_TYPE_MASK 0x0E
#define | CDXA_TYPE_DATA 0x08
#define | CDXA_TYPE_AUDIO 0x04
#define | CDXA_TYPE_VIDEO 0x02
#define | CDXA_SUBMODE_EOF 0x80 /* set if EOF */
#define | FRAME_DURATION 45000

## Functions
static int | open_str_file (demux_str_t *this)
static int | demux_str_send_chunk (demux_plugin_t *this_gen)
static void | demux_str_send_headers (demux_plugin_t *this_gen)
static int | demux_str_seek (demux_plugin_t *this_gen, off_t start_pos, int start_time, int playing)
static int | demux_str_get_status (demux_plugin_t *this_gen)
static int | demux_str_get_stream_length (demux_plugin_t *this_gen)
static uint32_t | demux_str_get_capabilities (demux_plugin_t *this_gen)
static int | demux_str_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_str_init_plugin (xine_t *xine, const void *data)

## Macro Definition Documentation

## ◆ CD_RAW_SECTOR_SIZE

#define CD_RAW_SECTOR_SIZE 2352

Referenced by demux_str_get_stream_length(), demux_str_seek(), demux_str_send_chunk(), and open_str_file().

## ◆ CDXA_SUBMODE_EOF

#define CDXA_SUBMODE_EOF 0x80 /* set if EOF */

## ◆ CDXA_TYPE_AUDIO

#define CDXA_TYPE_AUDIO 0x04

Referenced by demux_str_send_chunk(), demux_str_send_headers(), and open_str_file().

## ◆ CDXA_TYPE_DATA

#define CDXA_TYPE_DATA 0x08

Referenced by demux_str_send_chunk(), and open_str_file().

## ◆ CDXA_TYPE_MASK

#define CDXA_TYPE_MASK 0x0E

Referenced by demux_str_send_chunk(), and open_str_file().

## ◆ CDXA_TYPE_VIDEO

#define CDXA_TYPE_VIDEO 0x02

Referenced by demux_str_send_chunk(), demux_str_send_headers(), and open_str_file().

## ◆ FRAME_DURATION

#define FRAME_DURATION 45000

Referenced by demux_str_send_chunk(), and demux_str_send_headers().

## ◆ LOG_MODULE

#define LOG_MODULE "demux_str"

## ◆ LOG_VERBOSE

#define LOG_VERBOSE

## ◆ STR_CHECK_BYTES

#define STR_CHECK_BYTES (0x2C + 0x30)

Referenced by open_str_file().

## ◆ STR_MAGIC

#define STR_MAGIC "\x60\x01\x01\x80"

Referenced by demux_str_send_chunk(), and open_str_file().

## ◆ STR_MAX_CHANNELS

#define STR_MAX_CHANNELS 32

Referenced by demux_str_send_chunk(), demux_str_send_headers(), and open_str_file().

## Function Documentation

## ◆ demux_str_get_capabilities()

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

References DEMUX_CAP_NOCAP.

Referenced by open_plugin().

## ◆ demux_str_get_optional_data()

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

References DEMUX_OPTIONAL_UNSUPPORTED.

Referenced by open_plugin().

## ◆ demux_str_get_status()

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

Referenced by open_plugin().

## ◆ demux_str_get_stream_length()

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

References CD_RAW_SECTOR_SIZE, and input().

Referenced by open_plugin().

## ◆ demux_str_init_plugin()

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

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

## ◆ demux_str_seek()

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

References _x_demux_flush_engine(), CD_RAW_SECTOR_SIZE, DEMUX_OK, input(), and lprintf.

Referenced by open_plugin().

## ◆ demux_str_send_chunk()

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

References _x_demux_control_newpts(), _x_is_fourcc(), _X_LE_16, _X_LE_32, BUF_AUDIO_XA_ADPCM, BUF_FLAG_FRAME_END, BUF_FLAG_KEYFRAME, BUF_FLAG_SEEK, BUF_VIDEO_PSX_MDEC, CD_RAW_SECTOR_SIZE, CDXA_TYPE_AUDIO, CDXA_TYPE_DATA, CDXA_TYPE_MASK, CDXA_TYPE_VIDEO, buf_element_s::content, buf_element_s::decoder_flags, DEMUX_FINISHED, buf_element_s::extra_info, FRAME_DURATION, input(), extra_info_s::input_normpos, extra_info_s::input_time, buf_element_s::pts, buf_element_s::size, STR_MAGIC, STR_MAX_CHANNELS, buf_element_s::type, and xine_fast_memcpy.

Referenced by open_plugin().

## ◆ demux_str_send_headers()

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

References _x_demux_control_start(), _x_stream_info_set(), BUF_AUDIO_XA_ADPCM, BUF_FLAG_FRAME_END, BUF_FLAG_FRAMERATE, BUF_FLAG_HEADER, BUF_FLAG_STDHEADER, BUF_VIDEO_PSX_MDEC, CDXA_TYPE_AUDIO, CDXA_TYPE_VIDEO, buf_element_s::content, buf_element_s::decoder_flags, buf_element_s::decoder_info, DEMUX_OK, FRAME_DURATION, buf_element_s::size, STR_MAX_CHANNELS, 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_SEEKABLE, XINE_STREAM_INFO_VIDEO_HEIGHT, and XINE_STREAM_INFO_VIDEO_WIDTH.

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_FINISHED, demux_str_get_capabilities(), demux_str_get_optional_data(), demux_str_get_status(), demux_str_get_stream_length(), demux_str_seek(), demux_str_send_chunk(), demux_str_send_headers(), input(), INPUT_IS_SEEKABLE, METHOD_BY_CONTENT, METHOD_BY_MRL, METHOD_EXPLICIT, NULL, open_str_file(), input_plugin_s::seek, xine_stream_s::xine, XINE_VERBOSITY_DEBUG, and xprintf.

Referenced by demux_str_init_plugin().

## ◆ open_str_file()

static int open_str_file | ( | demux_str_t * | this | ) |
| static

References _x_is_fourcc(), _X_LE_16, CD_RAW_SECTOR_SIZE, CDXA_TYPE_AUDIO, CDXA_TYPE_DATA, CDXA_TYPE_MASK, CDXA_TYPE_VIDEO, input(), lprintf, STR_CHECK_BYTES, STR_MAGIC, and STR_MAX_CHANNELS.

Referenced by open_plugin().