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

xine-lib 1.2.12

Data Structures | Macros | Functions | Variables
demux_nsv.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 <xine/buffer.h>`

## Data Structures
struct | demux_nsv_t

## Macros
#define | LOG_MODULE "demux_nsv"
#define | LOG_VERBOSE
#define | FOURCC_TAG BE_FOURCC
#define | NSVf_TAG FOURCC_TAG('N', 'S', 'V', 'f')
#define | NSVs_TAG FOURCC_TAG('N', 'S', 'V', 's')
#define | BEEF 0xEFBE
#define | NSV_MAX_RESYNC (1024 * 1024)
#define | NSV_RESYNC_ERROR 0
#define | NSV_RESYNC_BEEF 1
#define | NSV_RESYNC_NSVf 2
#define | NSV_RESYNC_NSVs 3

## Functions
static void | nsv_parse_framerate (demux_nsv_t *this, uint8_t framerate)
static off_t | nsv_read (demux_nsv_t *this, uint8_t *buffer, off_t len)
static off_t | nsv_seek (demux_nsv_t *this, off_t offset, int origin)
static int | nsv_resync (demux_nsv_t *this)
static int | open_nsv_file (demux_nsv_t *this)
static int | nsv_parse_payload (demux_nsv_t *this, int video_size, int audio_size)
static int | demux_nsv_send_chunk (demux_plugin_t *this_gen)
static void | demux_nsv_send_headers (demux_plugin_t *this_gen)
static int | demux_nsv_seek (demux_plugin_t *this_gen, off_t start_pos, int start_time, int playing)
static int | demux_nsv_get_status (demux_plugin_t *this_gen)
static int | demux_nsv_get_stream_length (demux_plugin_t *this_gen)
static uint32_t | demux_nsv_get_capabilities (demux_plugin_t *this_gen)
static int | demux_nsv_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 * | demux_nsv_init_plugin (xine_t *xine, const void *data)

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

## Macro Definition Documentation

## ◆ BEEF

#define BEEF 0xEFBE

## ◆ FOURCC_TAG

#define FOURCC_TAG BE_FOURCC

## ◆ LOG_MODULE

#define LOG_MODULE "demux_nsv"

## ◆ LOG_VERBOSE

#define LOG_VERBOSE

## ◆ NSV_MAX_RESYNC

#define NSV_MAX_RESYNC (1024 * 1024)

## ◆ NSV_RESYNC_BEEF

#define NSV_RESYNC_BEEF 1

## ◆ NSV_RESYNC_ERROR

#define NSV_RESYNC_ERROR 0

## ◆ NSV_RESYNC_NSVf

#define NSV_RESYNC_NSVf 2

## ◆ NSV_RESYNC_NSVs

#define NSV_RESYNC_NSVs 3

## ◆ NSVf_TAG

#define NSVf_TAG FOURCC_TAG('N', 'S', 'V', 'f')

## ◆ NSVs_TAG

#define NSVs_TAG FOURCC_TAG('N', 'S', 'V', 's')

## Function Documentation

## ◆ demux_nsv_get_capabilities()

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

References DEMUX_CAP_NOCAP.

Referenced by open_plugin().

## ◆ demux_nsv_get_optional_data()

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

References DEMUX_OPTIONAL_UNSUPPORTED.

Referenced by open_plugin().

## ◆ demux_nsv_get_status()

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

Referenced by open_plugin().

## ◆ demux_nsv_get_stream_length()

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

Referenced by open_plugin().

## ◆ demux_nsv_init_plugin()

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

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

## ◆ demux_nsv_seek()

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

References _x_demux_control_newpts(), DEMUX_OK, and lprintf.

Referenced by open_plugin().

## ◆ demux_nsv_send_chunk()

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

References _X_LE_16, _X_LE_32, DEMUX_FINISHED, lprintf, nsv_parse_framerate(), nsv_parse_payload(), nsv_read(), nsv_resync(), NSV_RESYNC_BEEF, NSV_RESYNC_ERROR, NSV_RESYNC_NSVf, and NSV_RESYNC_NSVs.

Referenced by open_plugin().

## ◆ demux_nsv_send_headers()

static void demux_nsv_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_STDHEADER, 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_FOURCC, XINE_STREAM_INFO_HAS_AUDIO, XINE_STREAM_INFO_HAS_VIDEO, XINE_STREAM_INFO_VIDEO_FOURCC, XINE_STREAM_INFO_VIDEO_HEIGHT, and XINE_STREAM_INFO_VIDEO_WIDTH.

Referenced by open_plugin().

## ◆ nsv_parse_framerate()

static void nsv_parse_framerate | ( | demux_nsv_t * | this,
|  | uint8_t | framerate
| ) |  |
| static

References lprintf.

Referenced by demux_nsv_send_chunk(), and open_nsv_file().

## ◆ nsv_parse_payload()

static int nsv_parse_payload | ( | demux_nsv_t * | this,
|  | int | video_size,
|  | int | audio_size
| ) |  |
| static

References BUF_FLAG_FRAME_END, BUF_FLAG_FRAMERATE, BUF_VIDEO_VP31, BUF_VIDEO_VP6, buf_element_s::content, buf_element_s::decoder_flags, buf_element_s::decoder_info, 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, nsv_read(), buf_element_s::pts, buf_element_s::size, and buf_element_s::type.

Referenced by demux_nsv_send_chunk().

## ◆ nsv_read()

static off_t nsv_read | ( | demux_nsv_t * | this,
|  | uint8_t * | buffer,
|  | off_t | len
| ) |  |
| static

References _X_BE_16, input(), and lprintf.

Referenced by demux_nsv_send_chunk(), nsv_parse_payload(), nsv_resync(), nsv_seek(), and open_nsv_file().

## ◆ nsv_resync()

static int nsv_resync | ( | demux_nsv_t * | this | ) |
| static

References BEEF, lprintf, NSV_MAX_RESYNC, nsv_read(), NSV_RESYNC_BEEF, NSV_RESYNC_ERROR, NSV_RESYNC_NSVf, NSV_RESYNC_NSVs, NSVf_TAG, and NSVs_TAG.

Referenced by demux_nsv_send_chunk(), and open_nsv_file().

## ◆ nsv_seek()

static off_t nsv_seek | ( | demux_nsv_t * | this,
|  | off_t | offset,
|  | int | origin
| ) |  |
| static

References input(), and nsv_read().

Referenced by open_nsv_file().

## ◆ open_nsv_file()

static int open_nsv_file | ( | demux_nsv_t * | this | ) |
| static

References _x_demux_read_header(), _x_formattag_to_buf_audio(), _x_fourcc_to_buf_video(), _x_is_fourcc(), _X_LE_16, _X_LE_32, _X_ME_32, _x_report_audio_format_tag(), _x_report_video_fourcc(), input(), LOG_MODULE, lprintf, nsv_parse_framerate(), nsv_read(), nsv_resync(), NSV_RESYNC_ERROR, NSV_RESYNC_NSVf, NSV_RESYNC_NSVs, and nsv_seek().

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_nsv_get_capabilities(), demux_nsv_get_optional_data(), demux_nsv_get_status(), demux_nsv_get_stream_length(), demux_nsv_seek(), demux_nsv_send_chunk(), demux_nsv_send_headers(), input(), METHOD_BY_CONTENT, METHOD_BY_MRL, METHOD_EXPLICIT, NULL, and open_nsv_file().

Referenced by demux_nsv_init_plugin().

## Variable Documentation

## ◆ demux_info_nsv

const demuxer_info_t demux_info_nsv
| static

Initial value:
= {
.priority = 10,
}

## ◆ EXPORTED

const plugin_info_t xine_plugin_info [] EXPORTED

Initial value:
= {
{ PLUGIN_DEMUX, 27, "nsv", XINE_VERSION_CODE, &demux_info_nsv, demux_nsv_init_plugin },
{ PLUGIN_NONE, 0, NULL, 0, NULL, NULL }
}
demux_info_nsv
static const demuxer_info_t demux_info_nsv
Definition: demux_nsv.c:654
demux_nsv_init_plugin
static void * demux_nsv_init_plugin(xine_t *xine, const void *data)
Definition: demux_nsv.c:634
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