xine-lib: xine-lib-1.2.13/src/input/vcd/xineplug_inp_vcd.c File Reference

xine-lib 1.2.13-20230125hg15249

Data Structures | Macros | Typedefs | Functions | Variables
xineplug_inp_vcd.c File Reference
`#include <stdio.h>`
`#include <stdlib.h>`
`#include <unistd.h>`
`#include <string.h>`
`#include <errno.h>`
`#include <ctype.h>`
`#include <xine/xineutils.h>`
`#include <xine/input_plugin.h>`
`#include <xine/xine_internal.h>`
`#include "cdio/logging.h"`
`#include "cdio/iso9660.h"`
`#include "cdio/cd_types.h"`
`#include "libvcd/files.h"`
`#include "libvcd/logging.h"`
`#include "vcdplayer.h"`
`#include "vcdio.h"`

## Data Structures
struct | vcd_config_s
struct | vcd_input_class_s
struct | vcd_input_plugin_s

## Macros
#define | SHORT_PLUGIN_NAME "VCD"
#define | MRL_PREFIX "vcd://"
#define | MRL_PREFIX_LEN (sizeof(MRL_PREFIX) - 1)
#define | MAX_DEVICE_LEN 1024
#define | xine_config_entry_t xine_cfg_entry_t
#define | BUF_DEMUX_BLOCK 0x05000000
#define | msg_print(class, fmt, args...)
#define | dbg_print(class, mask, fmt, args...)
#define | error_print(class, fmt, args...)
#define | stream_info_assign(field, stream, info) _x_stream_info_set(stream, field, info);
#define | RETURN_NOOP_BUF
#define | SLEEP_AND_HANDLE_EVENTS
#define | FREE_AND_NULL(ptr) if (NULL != ptr) free(ptr); ptr = NULL;
#define | MAX_DIR_ENTRIES 250
#define | VCD_NUM_CALLBACK(fn_name, var)
#define | VCD_ENUM_CALLBACK(fn_name, enum_type, var)
#define | VCD_STR_CALLBACK(fn_name, var)

## Typedefs
typedef struct vcd_config_s | vcd_config_t
typedef struct vcd_input_plugin_s | vcd_input_plugin_t
typedef struct vcd_input_class_s | vcd_input_class_t

## Functions
static bool | vcd_handle_events (vcd_input_plugin_t *this)
static void | vcd_close (vcd_input_class_t *class)
static int | XINE_FORMAT_PRINTF (3, 4)
static void | vcd_free_mrls (vcd_input_class_t *class)
static bool | vcd_get_default_device (vcd_input_class_t *class, bool log_msg_if_fail)
static void | meta_info_assign (vcd_input_plugin_t *this, int field, xine_stream_t *stream, const char *info)
static void | vcd_set_meta_info (vcd_input_plugin_t *this)
static void | vcd_force_redisplay (void *user_data)
static void | vcd_set_aspect_ratio (void *user_data, int i_aspect_ratio)
static void | vcd_add_mrl_slot (vcd_input_class_t *class, const char *mrl, off_t size, unsigned int *i)
static int | vcd_get_mrl_type_offset (vcd_input_plugin_t *inp, vcdinfo_item_enum_t type, int *size)
static bool | vcd_build_mrl_list (vcd_input_class_t *class, char *vcd_device)
static bool | vcd_parse_mrl (vcd_input_class_t *class, const char *default_vcd_device, const char *mrl, char *device_str, vcdinfo_itemid_t *itemid, vcdplayer_autoplay_t auto_type, bool *used_default)
static uint32_t | vcd_plugin_get_capabilities (input_plugin_t *this_gen)
static void | vcd_flush_buffers (void *user_data)
static off_t | vcd_plugin_read (input_plugin_t *this_gen, void *vbuf, const off_t nlen)
static buf_element_t * | vcd_plugin_read_block (input_plugin_t *this_gen, fifo_buffer_t *fifo, const off_t i_len)
static off_t | vcd_plugin_seek (input_plugin_t *this_gen, off_t offset, int origin)
static off_t | vcd_plugin_get_length (input_plugin_t *this_gen)
static off_t | vcd_plugin_get_current_pos (input_plugin_t *this_gen)
static uint32_t | vcd_plugin_get_blocksize (input_plugin_t *this_gen)
static xine_mrl_t ** | vcd_class_get_dir (input_class_t *this_gen, const char *filename, int *num_files)
static int | vcd_class_eject_media (input_class_t *this_gen)
static const char * | vcd_plugin_get_mrl (input_plugin_t *this_gen)
static int | vcd_get_optional_data (input_plugin_t *this_gen, void *data, int data_type)
static const char *const * | vcd_class_get_autoplay_list (input_class_t *this_gen, int *num_files)
static void | vcd_plugin_dispose (input_plugin_t *this_gen)
static void | vcd_log_handler (vcd_log_level_t level, const char message[])
static void | cdio_log_handler (cdio_log_level_t level, const char message[])
static void | uninit_log_handler (vcd_log_level_t level, const char message[])
static void | vcd_class_dispose (input_class_t *this_gen)
static void | vcd_update_title_display (void *user_data)
static int | vcd_plugin_open (input_plugin_t *this_gen)
static input_plugin_t * | vcd_class_get_instance (input_class_t *class_gen, xine_stream_t *stream, const char *mrl)
static void | vcd_default_dev_changed_cb (void *this_gen, xine_cfg_entry_t *entry)
static void | vcd_title_format_changed_cb (void *this_gen, xine_cfg_entry_t *entry)
static void | vcd_comment_format_changed_cb (void *this_gen, xine_cfg_entry_t *entry)
static void | vcd_show_rejected_cb (void *this_gen, xine_cfg_entry_t *entry)
static void | vcd_autoadvance_cb (void *this_gen, xine_cfg_entry_t *entry)
static void | vcd_slider_length_cb (void *this_gen, xine_cfg_entry_t *entry)
static void | vcd_default_autoplay_cb (void *this_gen, xine_cfg_entry_t *entry)
static void | vcd_debug_cb (void *this_gen, xine_cfg_entry_t *entry)
static void * | vcd_init (xine_t *xine, const void *data)

## Variables
static const vcdinfo_item_enum_t | autoplay2itemtype []
static vcdinfo_itemid_t | old_play_item = {VCDINFO_ITEM_TYPE_NOTFOUND, 0}
static off_t | old_get_length = 0
static vcdplayer_slider_length_t | old_slider_length
static vcd_log_handler_t | gl_default_vcd_log_handler = NULL
static cdio_log_handler_t | gl_default_cdio_log_handler = NULL

## Macro Definition Documentation

## ◆ BUF_DEMUX_BLOCK

#define BUF_DEMUX_BLOCK 0x05000000

Referenced by _x_input_default_read_block(), bluray_plugin_read_block(), cache_plugin_read_block(), cdda_plugin_read_block(), demux_mpeg_block_parse_pack(), demux_pva_send_headers(), dvd_plugin_read_block(), file_input_read_block(), gnomevfs_plugin_read_block(), pvr_plugin_read_block(), rip_plugin_read_block(), smb_plugin_read_block(), vcd_plugin_read_block(), and vdr_plugin_read_block().

## ◆ dbg_print

#define dbg_print | ( |  | class,
|  |  | mask,
|  |  | fmt,
|  |  | args... )

Value:
{\
if ((class)->vcdplayer_debug & mask) {\
xprintf ((class)->xine, XINE_VERBOSITY_DEBUG, "input_vcd: %s: "fmt"\n", __func__, ##args);\
}\
}
XINE_VERBOSITY_DEBUG
#define XINE_VERBOSITY_DEBUG
Definition xine.h:430

Referenced by meta_info_assign(), vcd_add_mrl_slot(), vcd_build_mrl_list(), vcd_class_dispose(), vcd_class_eject_media(), vcd_class_get_autoplay_list(), vcd_class_get_dir(), vcd_class_get_instance(), vcd_get_default_device(), vcd_get_optional_data(), vcd_handle_events(), vcd_parse_mrl(), vcd_plugin_dispose(), vcd_plugin_get_blocksize(), vcd_plugin_get_capabilities(), vcd_plugin_get_length(), vcd_plugin_get_mrl(), vcd_plugin_read(), vcd_plugin_read_block(), and vcd_update_title_display().

## ◆ error_print

#define error_print | ( |  | class,
|  |  | fmt,
|  |  | args... )

Value:
{\
xprintf ((class)->xine, XINE_VERBOSITY_LOG, "input_vcd: %s error: "fmt"\n", __func__, ##args);\
}
XINE_VERBOSITY_LOG
#define XINE_VERBOSITY_LOG
Definition xine.h:429

Referenced by vcd_add_mrl_slot(), vcd_build_mrl_list(), and vcd_plugin_get_mrl().

## ◆ FREE_AND_NULL

#define FREE_AND_NULL | ( |  | ptr | ) | if (NULL != ptr) free(ptr); ptr = NULL;

Referenced by vcd_close().

## ◆ MAX_DEVICE_LEN

#define MAX_DEVICE_LEN 1024

Referenced by vcd_build_mrl_list(), vcd_class_get_dir(), vcd_class_get_instance(), and vcd_parse_mrl().

## ◆ MAX_DIR_ENTRIES

#define MAX_DIR_ENTRIES 250

Referenced by vcd_class_get_autoplay_list().

## ◆ MRL_PREFIX

#define MRL_PREFIX "vcd://"

Referenced by vcd_build_mrl_list(), vcd_class_eject_media(), vcd_class_get_autoplay_list(), vcd_class_get_dir(), vcd_class_get_instance(), and vcd_parse_mrl().

## ◆ MRL_PREFIX_LEN

#define MRL_PREFIX_LEN (sizeof(MRL_PREFIX) - 1)

Referenced by vcd_build_mrl_list(), vcd_class_get_instance(), and vcd_parse_mrl().

## ◆ msg_print

#define msg_print | ( |  | class,
|  |  | fmt,
|  |  | args... )

Value:
{\
xprintf ((class)->xine, XINE_VERBOSITY_LOG, "input_vcd: %s: "fmt"\n", __func__, ##args);\
}

Referenced by vcd_get_default_device(), and vcd_handle_events().

## ◆ RETURN_NOOP_BUF

#define RETURN_NOOP_BUF

Value:
p_buf = fifo->buffer_pool_alloc (fifo); \
p_buf->type = BUF_CONTROL_NOP; \
return p_buf
BUF_CONTROL_NOP
#define BUF_CONTROL_NOP
Definition buffer.h:74

Referenced by vcd_plugin_read_block().

## ◆ SHORT_PLUGIN_NAME

#define SHORT_PLUGIN_NAME "VCD"

Referenced by vcd_init().

## ◆ SLEEP_AND_HANDLE_EVENTS

#define SLEEP_AND_HANDLE_EVENTS

Value:
xine_usec_sleep(50000); \
if (vcd_handle_events (this)) goto read_block; \
RETURN_NOOP_BUF
xine_usec_sleep
void xine_usec_sleep(unsigned usec)
Definition utils.c:546
RETURN_NOOP_BUF
#define RETURN_NOOP_BUF
Definition xineplug_inp_vcd.c:723
vcd_handle_events
static bool vcd_handle_events(vcd_input_plugin_t *this)
Definition xineplug_inp_vcd.c:1096

Referenced by vcd_plugin_read_block().

## ◆ stream_info_assign

#define stream_info_assign | ( |  | field,
|  |  | stream,
|  |  | info ) _x_stream_info_set(stream, field, info);

Referenced by vcd_update_title_display().

## ◆ VCD_ENUM_CALLBACK

#define VCD_ENUM_CALLBACK | ( |  | fn_name,
|  |  | enum_type,
|  |  | var )

Value:
static void fn_name (void *this_gen, xine_cfg_entry_t *entry) {\
vcd_input_class_t *class = (vcd_input_class_t *)this_gen;\
dbg_print (class, INPUT_DBG_CALL, "Called setting %d\n", entry->num_value);\
class->var = (enum_type)entry->num_value;\
}
vcd_input_class_t
Definition input_vcd.c:81
xine_cfg_entry_s
Definition xine.h:1649
xine_cfg_entry_s::num_value
int num_value
Definition xine.h:1670
INPUT_DBG_CALL
#define INPUT_DBG_CALL
Definition vcdplayer.h:56

## ◆ VCD_NUM_CALLBACK

#define VCD_NUM_CALLBACK | ( |  | fn_name,
|  |  | var )

Value:
static void fn_name (void *this_gen, xine_cfg_entry_t *entry) {\
vcd_input_class_t *class = (vcd_input_class_t *)this_gen;\
dbg_print (class, INPUT_DBG_CALL, "Called setting %d\n", entry->num_value);\
class->var = entry->num_value;\
}

## ◆ VCD_STR_CALLBACK

#define VCD_STR_CALLBACK | ( |  | fn_name,
|  |  | var )

Value:
static void fn_name (void *this_gen, xine_cfg_entry_t *entry) {\
vcd_input_class_t *class = (vcd_input_class_t *)this_gen;\
dbg_print (class, INPUT_DBG_CALL, "Called setting %s\n", entry->str_value);\
if (NULL == entry->str_value) return;\
free (class->var);\
class->var = strdup (entry->str_value);\
}
xine_cfg_entry_s::str_value
char * str_value
Definition xine.h:1663
NULL
NULL
Definition xine_plugin.c:78

## ◆ xine_config_entry_t

#define xine_config_entry_t xine_cfg_entry_t

## Typedef Documentation

## ◆ vcd_config_t

typedef struct vcd_config_s vcd_config_t

## ◆ vcd_input_class_t

typedef struct vcd_input_class_s vcd_input_class_t

## ◆ vcd_input_plugin_t

typedef struct vcd_input_plugin_s vcd_input_plugin_t

## Function Documentation

## ◆ cdio_log_handler()

static void cdio_log_handler | ( | cdio_log_level_t | level,
|  | const char | message[] )
| static

This routine is called by libcdio routines on error. Setup is done by init_input_plugin.

Referenced by vcd_plugin_open().

## ◆ meta_info_assign()

static void meta_info_assign | ( | vcd_input_plugin_t * | this,
|  | int | field,
|  | xine_stream_t * | stream,
|  | const char * | info )
| static

References _x_meta_info_set(), dbg_print, field, INPUT_DBG_META, and NULL.

Referenced by vcd_set_meta_info(), and vcd_update_title_display().

## ◆ uninit_log_handler()

static void uninit_log_handler | ( | vcd_log_level_t | level,
|  | const char | message[] )
| static

This routine is when xine is not around. Setup is done by vcd_class_dispose.

Referenced by vcd_class_dispose(), and vcd_init().

## ◆ vcd_add_mrl_slot()

static void vcd_add_mrl_slot | ( | vcd_input_class_t * | class,
|  | const char * | mrl,
|  | off_t | size,
|  | unsigned int * | i )
| static

Add another MRL to the MRL list inside "class" to be displayed. mrl is the string name to add; size is the size of the entry in bytes. The number of mrls in "this" is incremented.

References dbg_print, error_print, INPUT_DBG_MRL, mrl_vcd, and NULL.

Referenced by vcd_build_mrl_list().

## ◆ vcd_autoadvance_cb()

static void vcd_autoadvance_cb | ( | void * | this_gen,
|  | xine_cfg_entry_t * | entry )
| static

Referenced by vcd_init().

## ◆ vcd_build_mrl_list()

static bool vcd_build_mrl_list | ( | vcd_input_class_t * | class,
|  | char * | vcd_device )
| static

Create a MRL list inside "class". Any existing MRL list is freed.

References _, vcdplayer_s::b_opened, dbg_print, vcdplayer_s::entry, error_print, vcdplayer_s::i_entries, vcdplayer_s::i_lids, vcdplayer_s::i_segments, vcdplayer_s::i_tracks, INPUT_DBG_MRL, MAX_DEVICE_LEN, MRL_PREFIX, MRL_PREFIX_LEN, NULL, vcdplayer_s::segment, vcdplayer_s::show_rejected, vcdplayer_play_item_info_t::size, vcdplayer_s::track, vcdplayer_s::vcd, vcd_add_mrl_slot(), vcd_close(), vcd_free_mrls(), vcd_get_default_device(), vcdio_close(), and vcdio_open().

Referenced by vcd_class_get_autoplay_list(), vcd_class_get_dir(), and vcd_class_get_instance().

## ◆ vcd_class_dispose()

static void vcd_class_dispose | ( | input_class_t * | this_gen | ) |
| static

Things that need to be done the vcd plugin is closed.

References xine_s::config, dbg_print, gl_default_cdio_log_handler, gl_default_vcd_log_handler, INPUT_DBG_CALL, INPUT_DBG_EXT, NULL, uninit_log_handler(), config_values_s::unregister_callback, vcd_close(), and config_values_s::xine.

Referenced by vcd_init().

## ◆ vcd_class_eject_media()

static int vcd_class_eject_media | ( | input_class_t * | this_gen | ) |
| static

From plugin xine spec: eject/load the media (if it's possible)

returns 0 for temporary failures

References dbg_print, input_class_s::get_instance, INPUT_DBG_CALL, INPUT_DBG_EXT, MRL_PREFIX, NULL, and vcdio_close().

Referenced by vcd_init().

## ◆ vcd_class_get_autoplay_list()

static const char *const * vcd_class_get_autoplay_list | ( | input_class_t * | this_gen,
|  | int * | num_files )
| static

From xine plugin spec:

generate autoplay list return value: list of MRLs

– The list of MRLs returned goes into the playlist. This is called when the SHORT_PLUGIN_NAME button is pressed.

References autoplay2itemtype, dbg_print, vcd_input_class_t::filelist, input_class_s::get_instance, INPUT_DBG_CALL, INPUT_DBG_EXT, INPUT_DBG_MRL, MAX_DIR_ENTRIES, MRL_PREFIX, NULL, vcd_build_mrl_list(), and vcd_get_mrl_type_offset().

Referenced by vcd_init().

## ◆ vcd_class_get_dir()

static xine_mrl_t ** vcd_class_get_dir | ( | input_class_t * | this_gen,
|  | const char * | filename,
|  | int * | num_files )
| static

From xine plugin spec: ls function return value: NULL => filename is a file, **char=> filename is a dir

– This list returned forms the entries of the GUI MRL "browser".

References dbg_print, input_class_s::get_instance, INPUT_DBG_CALL, INPUT_DBG_EXT, MAX_DEVICE_LEN, MRL_PREFIX, NULL, vcd_build_mrl_list(), vcd_get_default_device(), and vcd_parse_mrl().

Referenced by vcd_init().

## ◆ vcd_class_get_instance()

static input_plugin_t * vcd_class_get_instance | ( | input_class_t * | class_gen,
|  | xine_stream_t * | stream,
|  | const char * | mrl )
| static

This basically sets up stream specified by MRL for playing. After this routine is called, xine-lib can read blocks from the thing specified by the MRL, set the position of the thing specified by the MRL, get its size or read its current position...

See vcdplayer_parses_mrl for the for the format that a valid MRL can take.

Return values: pointer to input plugin NULL on failure

References dbg_print, INPUT_DBG_CALL, INPUT_DBG_EXT, INPUT_DBG_MRL, INPUT_DBG_PBC, MAX_DEVICE_LEN, MRL_PREFIX, MRL_PREFIX_LEN, NULL, vcd_build_mrl_list(), vcd_flush_buffers(), vcd_force_redisplay(), vcd_get_default_device(), vcd_get_optional_data(), vcd_parse_mrl(), vcd_plugin_dispose(), vcd_plugin_get_blocksize(), vcd_plugin_get_capabilities(), vcd_plugin_get_current_pos(), vcd_plugin_get_length(), vcd_plugin_get_mrl(), vcd_plugin_open(), vcd_plugin_read(), vcd_plugin_read_block(), vcd_plugin_seek(), vcd_set_aspect_ratio(), vcd_set_meta_info(), vcd_update_title_display(), vcdio_close(), vcdplayer_play(), XINE_ANON_STREAM, and xine_event_new_queue().

Referenced by vcd_init().

## ◆ vcd_close()

static void vcd_close | ( | vcd_input_class_t * | class | ) |
| static

References FREE_AND_NULL, vcd_free_mrls(), and vcdio_close().

Referenced by vcd_build_mrl_list(), and vcd_class_dispose().

## ◆ vcd_comment_format_changed_cb()

static void vcd_comment_format_changed_cb | ( | void * | this_gen,
|  | xine_cfg_entry_t * | entry )
| static

Referenced by vcd_init().

## ◆ vcd_debug_cb()

static void vcd_debug_cb | ( | void * | this_gen,
|  | xine_cfg_entry_t * | entry )
| static

Referenced by vcd_init().

## ◆ vcd_default_autoplay_cb()

static void vcd_default_autoplay_cb | ( | void * | this_gen,
|  | xine_cfg_entry_t * | entry )
| static

Referenced by vcd_init().

## ◆ vcd_default_dev_changed_cb()

static void vcd_default_dev_changed_cb | ( | void * | this_gen,
|  | xine_cfg_entry_t * | entry )
| static

Referenced by vcd_init().

## ◆ vcd_flush_buffers()

static void vcd_flush_buffers | ( | void * | user_data | ) |
| static

References _x_demux_flush_engine(), and user_data().

Referenced by vcd_class_get_instance().

## ◆ vcd_force_redisplay()

static void vcd_force_redisplay | ( | void * | user_data | ) |
| static

References user_data(), xine_get_param(), XINE_PARAM_VO_ASPECT_RATIO, and xine_set_param().

Referenced by vcd_class_get_instance().

## ◆ vcd_free_mrls()

static void vcd_free_mrls | ( | vcd_input_class_t * | class | ) |
| static

References NULL.

Referenced by vcd_build_mrl_list(), and vcd_close().

## ◆ vcd_get_default_device()

static bool vcd_get_default_device | ( | vcd_input_class_t * | class,
|  | bool | log_msg_if_fail )
| static

References _, dbg_print, INPUT_DBG_CALL, msg_print, and NULL.

Referenced by vcd_build_mrl_list(), vcd_class_get_dir(), and vcd_class_get_instance().

## ◆ vcd_get_mrl_type_offset()

static int vcd_get_mrl_type_offset | ( | vcd_input_plugin_t * | inp,
|  | vcdinfo_item_enum_t | type,
|  | int * | size )
| static

Return the associated mrl_offset for the given type.

References type.

Referenced by vcd_class_get_autoplay_list(), and vcd_plugin_get_mrl().

## ◆ vcd_get_optional_data()

static int vcd_get_optional_data | ( | input_plugin_t * | this_gen,
|  | void * | data,
|  | int | data_type )
| static

From xine plugin spec:

request optional data from input plugin.

References _x_get_audio_channel(), _x_get_spu_channel(), dbg_print, INPUT_DBG_CALL, INPUT_DBG_EXT, INPUT_OPTIONAL_DATA_AUDIOLANG, INPUT_OPTIONAL_DATA_SPULANG, INPUT_OPTIONAL_SUCCESS, INPUT_OPTIONAL_UNSUPPORTED, and NULL.

Referenced by vcd_class_get_instance().

## ◆ vcd_handle_events()

static bool vcd_handle_events | ( | vcd_input_plugin_t * | this | ) |
| static

References _, _x_demux_flush_engine(), xine_input_data_t::button, xine_event_t::data, dbg_print, vcdplayer_s::i_lid, vcdplayer_s::i_lsn, INPUT_DBG_CALL, INPUT_DBG_EVENT, INPUT_DBG_PBC, vcdplayer_s::max_x, vcdplayer_s::max_y, msg_print, vcdplayer_s::next_entry, vcdplayer_s::play_item, vcdplayer_s::prev_entry, vcdplayer_s::return_entry, send_mouse_enter_leave_event(), xine_event_t::type, vcdplayer_s::vcd, vcdplayer_pbc_is_on(), vcdplayer_play(), vcdplayer_send_button_update(), xine_input_data_t::x, xine_event_get(), XINE_EVENT_INPUT_BUTTON_FORCE, XINE_EVENT_INPUT_DOWN, XINE_EVENT_INPUT_LEFT, XINE_EVENT_INPUT_MENU1, XINE_EVENT_INPUT_MENU2, XINE_EVENT_INPUT_MENU3, XINE_EVENT_INPUT_MOUSE_BUTTON, XINE_EVENT_INPUT_MOUSE_MOVE, XINE_EVENT_INPUT_NEXT, XINE_EVENT_INPUT_NUMBER_0, XINE_EVENT_INPUT_NUMBER_1, XINE_EVENT_INPUT_NUMBER_10_ADD, XINE_EVENT_INPUT_NUMBER_2, XINE_EVENT_INPUT_NUMBER_3, XINE_EVENT_INPUT_NUMBER_4, XINE_EVENT_INPUT_NUMBER_5, XINE_EVENT_INPUT_NUMBER_6, XINE_EVENT_INPUT_NUMBER_7, XINE_EVENT_INPUT_NUMBER_8, XINE_EVENT_INPUT_NUMBER_9, XINE_EVENT_INPUT_PREVIOUS, XINE_EVENT_INPUT_RIGHT, XINE_EVENT_INPUT_SELECT, XINE_EVENT_INPUT_UP, and xine_input_data_t::y.

Referenced by vcd_plugin_get_capabilities(), and vcd_plugin_read_block().

## ◆ vcd_init()

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

dev/dvd:"),

References _, gl_default_cdio_log_handler, gl_default_vcd_log_handler, input_class_s::identifier, input_plugin_s::input_class, N_, NULL, config_values_s::register_bool, config_values_s::register_enum, config_values_s::register_filename, config_values_s::register_num, config_values_s::register_string, SHORT_PLUGIN_NAME, uninit_log_handler(), vcd_autoadvance_cb(), vcd_class_dispose(), vcd_class_eject_media(), vcd_class_get_autoplay_list(), vcd_class_get_dir(), vcd_class_get_instance(), vcd_comment_format_changed_cb(), vcd_debug_cb(), vcd_default_autoplay_cb(), vcd_default_dev_changed_cb(), vcd_show_rejected_cb(), vcd_slider_length_cb(), vcd_title_format_changed_cb(), VCDPLAYER_AUTOPLAY_PBC, VCDPLAYER_SLIDER_LENGTH_AUTO, XINE_CONFIG_STRING_IS_DEVICE_NAME, XINE_VERBOSITY_DEBUG, and xprintf.

## ◆ vcd_log_handler()

static void vcd_log_handler | ( | vcd_log_level_t | level,
|  | const char | message[] )
| static

This routine is called by libvcd routines on error. Setup is done by init_input_plugin.

Referenced by vcd_plugin_open().

## ◆ vcd_parse_mrl()

static bool vcd_parse_mrl | ( | vcd_input_class_t * | class,
|  | const char * | default_vcd_device,
|  | const char * | mrl,
|  | char * | device_str,
|  | vcdinfo_itemid_t * | itemid,
|  | vcdplayer_autoplay_t | auto_type,
|  | bool * | used_default )
| static

parses a MRL which has the format

vcd://[vcd_path][@[EPTS]?number]*?

Examples vcd:// - Play (navigate) default device: /dev/cdrom vcd://@ - same as above vcd:///dev/cdrom - probably same as above vcd:///dev/cdrom2 - Play (navigate) /dev/cdrom2 vcd:///dev/cdrom2@ - same as above vcd:///dev/cdrom2@T1 - Play Track 1 from /dev/cdrom2 vcd:///dev/cdrom@S1 - Play selection id 1 from /dev/cdrom vcd://dev/cdrom@E0 - Play Entry id 0 from default device vcd://@P1 - probably same as above. If there is no playback control, MRL will get converted into vcd://@E0 vcd://@P1* - probably same as above. vcd://@S0 - Play segment 0 from default device vcd://@3 - Play track 3 from default device vcd:///dev/cdrom2@1 - Play track 1 from /dev/cdrom2 vcd:///tmp/ntsc.bin@ - Play default item from /tmp/ntsc.bin vcd:///tmp/ntsc.bin/@E0 - Play entry 0 of /tmp/ntsc.bin

parameters: mrl : mrl to parse default_vcd_device: name of device to use when none given auto_type : type of selection (entry, track, LID) when none given used_default : true iff auto_type was used.

References _x_mrl_unescape(), dbg_print, INPUT_DBG_CALL, MAX_DEVICE_LEN, MRL_PREFIX, MRL_PREFIX_LEN, and NULL.

Referenced by vcd_class_get_dir(), and vcd_class_get_instance().

## ◆ vcd_plugin_dispose()

static void vcd_plugin_dispose | ( | input_plugin_t * | this_gen | ) |
| static

Things that need to be done when a stream is closed.

References dbg_print, INPUT_DBG_CALL, INPUT_DBG_EXT, NULL, and vcdio_close().

Referenced by vcd_class_get_instance().

## ◆ vcd_plugin_get_blocksize()

static uint32_t vcd_plugin_get_blocksize | ( | input_plugin_t * | this_gen | ) |
| static

From xine plugin spec: return block size of input source (if supported, 0 otherwise)

References dbg_print, INPUT_DBG_CALL, and INPUT_DBG_EXT.

Referenced by vcd_class_get_instance().

## ◆ vcd_plugin_get_capabilities()

static uint32_t vcd_plugin_get_capabilities | ( | input_plugin_t * | this_gen | ) |
| static

From xine plugin spec:

return capabilities of input source

References dbg_print, INPUT_CAP_AUDIOLANG, INPUT_CAP_BLOCK, INPUT_CAP_CHAPTERS, INPUT_CAP_PREVIEW, INPUT_CAP_SEEKABLE, INPUT_CAP_SPULANG, INPUT_DBG_CALL, INPUT_DBG_EXT, and vcd_handle_events().

Referenced by vcd_class_get_instance().

## ◆ vcd_plugin_get_current_pos()

static off_t vcd_plugin_get_current_pos | ( | input_plugin_t * | this_gen | ) |
| static

From xine plugin spec: get current position in stream.

References vcd_plugin_seek().

Referenced by vcd_class_get_instance().

## ◆ vcd_plugin_get_length()

static off_t vcd_plugin_get_length | ( | input_plugin_t * | this_gen | ) |
| static

References dbg_print, vcdplayer_s::end_lsn, INPUT_DBG_MRL, old_get_length, old_play_item, old_slider_length, vcdplayer_s::origin_lsn, vcdplayer_s::play_item, vcdplayer_s::slider_length, vcdplayer_s::vcd, VCDPLAYER_SLIDER_LENGTH_AUTO, VCDPLAYER_SLIDER_LENGTH_ENTRY, and VCDPLAYER_SLIDER_LENGTH_TRACK.

Referenced by vcd_class_get_dir(), vcd_class_get_instance(), and vcd_class_get_instance().

## ◆ vcd_plugin_get_mrl()

static const char * vcd_plugin_get_mrl | ( | input_plugin_t * | this_gen | ) |
| static

From spec: return current MRL

References _, dbg_print, error_print, vcdplayer_s::i_lid, INPUT_DBG_CALL, vcdplayer_s::play_item, vcd_get_mrl_type_offset(), and vcdplayer_pbc_is_on().

Referenced by vcd_class_get_instance().

## ◆ vcd_plugin_open()

static int vcd_plugin_open | ( | input_plugin_t * | this_gen | ) |
| static

References cdio_log_handler(), gl_default_cdio_log_handler, gl_default_vcd_log_handler, input_plugin_s::input_class, and vcd_log_handler().

Referenced by vcd_class_get_instance().

## ◆ vcd_plugin_read()

static off_t vcd_plugin_read | ( | input_plugin_t * | this_gen,
|  | void * | vbuf,
|  | const off_t | nlen )
| static

From xine plugin spec:

read nlen bytes, return number of bytes read.

References dbg_print, INPUT_DBG_CALL, and INPUT_DBG_EXT.

Referenced by vcd_class_get_instance(), and vcd_class_get_instance().

## ◆ vcd_plugin_read_block()

static buf_element_t * vcd_plugin_read_block | ( | input_plugin_t * | this_gen,
|  | fifo_buffer_t * | fifo,
|  | const off_t | i_len )
| static

From xine plugin spec:

read one block, return newly allocated block (or NULL on failure) for blocked input sources len must be == blocksize the fifo parameter is only used to get access to the buffer_pool_alloc function

References vcdplayer_s::b_opened, BUF_DEMUX_BLOCK, fifo_buffer_s::buffer_pool_alloc, buf_element_s::content, dbg_print, vcdplayer_s::i_still, INPUT_DBG_CALL, INPUT_DBG_STILL, buf_element_s::mem, NULL, READ_BLOCK, READ_END, READ_ERROR, READ_STILL_FRAME, RETURN_NOOP_BUF, SLEEP_AND_HANDLE_EVENTS, STILL_INDEFINITE_WAIT, STILL_READING, buf_element_s::type, vcd_handle_events(), vcdio_open(), vcdplayer_read(), xine_get_param(), XINE_PARAM_VO_DEINTERLACE, and xine_set_param().

Referenced by vcd_class_get_instance(), and vcd_class_get_instance().

## ◆ vcd_plugin_seek()

static off_t vcd_plugin_seek | ( | input_plugin_t * | this_gen,
|  | off_t | offset,
|  | int | origin )
| static

From xine plugin spec:

seek position, return new position

if seeking failed, -1 is returned

References vcdio_seek().

Referenced by vcd_class_get_instance(), vcd_class_get_instance(), vcd_plugin_get_current_pos(), and vcd_plugin_get_current_pos().

## ◆ vcd_set_aspect_ratio()

static void vcd_set_aspect_ratio | ( | void * | user_data,
|  | int | i_aspect_ratio )
| static

References user_data(), XINE_PARAM_VO_ASPECT_RATIO, and xine_set_param().

Referenced by vcd_class_get_instance().

## ◆ vcd_set_meta_info()

static void vcd_set_meta_info | ( | vcd_input_plugin_t * | this | ) |
| static

References meta_info_assign(), vcdplayer_format_str(), XINE_META_INFO_ALBUM, XINE_META_INFO_ARTIST, XINE_META_INFO_COMMENT, and XINE_META_INFO_GENRE.

Referenced by vcd_class_get_instance().

## ◆ vcd_show_rejected_cb()

static void vcd_show_rejected_cb | ( | void * | this_gen,
|  | xine_cfg_entry_t * | entry )
| static

Referenced by vcd_init().

## ◆ vcd_slider_length_cb()

static void vcd_slider_length_cb | ( | void * | this_gen,
|  | xine_cfg_entry_t * | entry )
| static

Referenced by vcd_init().

## ◆ vcd_title_format_changed_cb()

static void vcd_title_format_changed_cb | ( | void * | this_gen,
|  | xine_cfg_entry_t * | entry )
| static

Referenced by vcd_init().

## ◆ vcd_update_title_display()

static void vcd_update_title_display | ( | void * | user_data | ) |
| static

References xine_event_t::data, xine_event_t::data_length, dbg_print, INPUT_DBG_CALL, INPUT_DBG_MRL, meta_info_assign(), xine_ui_data_t::str, xine_ui_data_t::str_len, xine_event_t::stream, stream_info_assign, xine_event_t::type, user_data(), vcdplayer_format_str(), xine_event_send(), XINE_EVENT_UI_SET_TITLE, XINE_META_INFO_COMMENT, XINE_META_INFO_TITLE, and XINE_STREAM_INFO_VIDEO_HAS_STILL.

Referenced by vcd_class_get_instance().

## ◆ XINE_FORMAT_PRINTF()

static int XINE_FORMAT_PRINTF | ( | 3 | ,
|  | 4 | )
| static

References user_data(), XINE_VERBOSITY_DEBUG, and xine_vlog().

## Variable Documentation

## ◆ autoplay2itemtype

const vcdinfo_item_enum_t autoplay2itemtype[]
| static

Initial value:
={
VCDINFO_ITEM_TYPE_TRACK,
VCDINFO_ITEM_TYPE_ENTRY,
VCDINFO_ITEM_TYPE_SEGMENT,
VCDINFO_ITEM_TYPE_LID
}

Referenced by vcd_class_get_autoplay_list().

## ◆ gl_default_cdio_log_handler

cdio_log_handler_t gl_default_cdio_log_handler = NULL
| static

Referenced by vcd_class_dispose(), vcd_init(), and vcd_plugin_open().

## ◆ gl_default_vcd_log_handler

vcd_log_handler_t gl_default_vcd_log_handler = NULL
| static

Referenced by vcd_class_dispose(), vcd_init(), and vcd_plugin_open().

## ◆ old_get_length

off_t old_get_length = 0
| static

Referenced by vcd_plugin_get_length().

## ◆ old_play_item

vcdinfo_itemid_t old_play_item = {VCDINFO_ITEM_TYPE_NOTFOUND, 0}
| static

From xine plugin spec: return length of input (-1 => unlimited, e.g. stream)

length size is bytes.

Referenced by vcd_plugin_get_length().

## ◆ old_slider_length

vcdplayer_slider_length_t old_slider_length
| static

Referenced by vcd_plugin_get_length().