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

xine-lib 1.2.13-20230125hg15249

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

## Data Structures
struct | demux_pva_t

## Macros
#define | LOG_MODULE "demux_pva"
#define | PVA_PREAMBLE_SIZE 8
#define | WRAP_THRESHOLD 120000
#define | PTS_AUDIO 0
#define | PTS_VIDEO 1
#define | abs(x) ( ((x)<0) ? -(x) : (x) )
#define | SEEK_BUFFER_SIZE 1024

## Functions
static void | check_newpts (demux_pva_t *this, int64_t pts, int video)
static int | probe_pva_file (input_plugin_t *input)
static int | demux_pva_send_chunk (demux_plugin_t *this_gen)
static void | demux_pva_send_headers (demux_plugin_t *this_gen)
static int | demux_pva_seek (demux_plugin_t *this_gen, off_t start_pos, int start_time, int playing)
static int | demux_pva_get_status (demux_plugin_t *this_gen)
static int | demux_pva_get_stream_length (demux_plugin_t *this_gen)
static uint32_t | demux_pva_get_capabilities (demux_plugin_t *this_gen)
static int | demux_pva_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)
static void * | init_plugin (xine_t *xine, const void *data)

## Variables
static const demuxer_info_t | demux_info_pva
const plugin_info_t xine_plugin_info[] | EXPORTED

## Macro Definition Documentation

## ◆ abs

#define abs | ( |  | x | ) | ( ((x)<0) ? -(x) : (x) )

Referenced by check_newpts().

## ◆ LOG_MODULE

#define LOG_MODULE "demux_pva"

## ◆ PTS_AUDIO

#define PTS_AUDIO 0

Referenced by demux_pva_send_chunk().

## ◆ PTS_VIDEO

#define PTS_VIDEO 1

Referenced by demux_pva_send_chunk().

## ◆ PVA_PREAMBLE_SIZE

#define PVA_PREAMBLE_SIZE 8

Referenced by demux_pva_send_chunk(), and probe_pva_file().

## ◆ SEEK_BUFFER_SIZE

#define SEEK_BUFFER_SIZE 1024

Referenced by demux_pva_seek().

## ◆ WRAP_THRESHOLD

#define WRAP_THRESHOLD 120000

Referenced by check_newpts().

## Function Documentation

## ◆ check_newpts()

static void check_newpts | ( | demux_pva_t * | this,
|  | int64_t | pts,
|  | int | video )
| static

References _x_demux_control_newpts(), abs, and WRAP_THRESHOLD.

Referenced by demux_pva_send_chunk().

## ◆ demux_pva_get_capabilities()

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

References DEMUX_CAP_NOCAP.

Referenced by open_plugin().

## ◆ demux_pva_get_optional_data()

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

References DEMUX_OPTIONAL_UNSUPPORTED.

Referenced by open_plugin().

## ◆ demux_pva_get_status()

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

Referenced by open_plugin().

## ◆ demux_pva_get_stream_length()

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

Referenced by open_plugin().

## ◆ demux_pva_seek()

static int demux_pva_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(), demux_plugin_s::seek, and SEEK_BUFFER_SIZE.

Referenced by open_plugin().

## ◆ demux_pva_send_chunk()

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

References _X_BE_16, _X_BE_32, BUF_AUDIO_MPEG, BUF_FLAG_FRAME_END, BUF_VIDEO_MPEG, check_newpts(), 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, PTS_AUDIO, PTS_VIDEO, PVA_PREAMBLE_SIZE, buf_element_s::size, and buf_element_s::type.

Referenced by open_plugin().

## ◆ demux_pva_send_headers()

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

References _x_demux_control_start(), _x_stream_info_set(), BUF_AUDIO_MPEG, BUF_DEMUX_BLOCK, BUF_FLAG_PREVIEW, BUF_VIDEO_MPEG, buf_element_s::content, buf_element_s::decoder_flags, DEMUX_FINISHED, DEMUX_OK, buf_element_s::extra_info, buf_element_s::free_buffer, input(), extra_info_s::input_normpos, buf_element_s::mem, buf_element_s::pts, buf_element_s::size, buf_element_s::type, XINE_STREAM_INFO_HAS_AUDIO, and XINE_STREAM_INFO_HAS_VIDEO.

Referenced by open_plugin().

## ◆ init_plugin()

static void * init_plugin | ( | xine_t * | xine,
|  | const void * | data )
| static

References demux_plugin_s::dispose, N_, NULL, demux_class_s::open_plugin, and 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_pva_get_capabilities(), demux_pva_get_optional_data(), demux_pva_get_status(), demux_pva_get_stream_length(), demux_pva_seek(), demux_pva_send_chunk(), demux_pva_send_headers(), input(), INPUT_IS_SEEKABLE, METHOD_BY_CONTENT, METHOD_BY_MRL, METHOD_EXPLICIT, NULL, probe_pva_file(), input_plugin_s::seek, xine_stream_s::xine, XINE_VERBOSITY_DEBUG, and xprintf.

Referenced by init_plugin().

## ◆ probe_pva_file()

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

References input(), and PVA_PREAMBLE_SIZE.

Referenced by open_plugin().

## Variable Documentation

## ◆ demux_info_pva

const demuxer_info_t demux_info_pva
| static

Initial value:
= {
.priority = 10,
}

## ◆ EXPORTED

const plugin_info_t xine_plugin_info [] EXPORTED

Initial value:
= {
{ PLUGIN_DEMUX, 27, "pva", XINE_VERSION_CODE, &demux_info_pva, init_plugin },
{ PLUGIN_NONE, 0, NULL, 0, NULL, NULL }
}
demux_info_pva
static const demuxer_info_t demux_info_pva
Definition demux_pva.c:494
init_plugin
static void * init_plugin(xine_t *xine, const void *data)
Definition demux_pva.c:474
XINE_VERSION_CODE
#define XINE_VERSION_CODE
Definition xine_internal.h:57
NULL
NULL
Definition xine_plugin.c:78
PLUGIN_DEMUX
#define PLUGIN_DEMUX
Definition xine_plugin.h:31
PLUGIN_NONE
#define PLUGIN_NONE
Definition xine_plugin.h:29