xine-lib 1.2.13-20230125hg15249
Macros | Functions
vcdplayer.c File Reference
#include <stdio.h>
#include <stdlib.h>
#include <sys/types.h>
#include <unistd.h>
#include <time.h>
#include <string.h>
#include <errno.h>
#include "libvcd/files.h"
#include "cdio/iso9660.h"
#include "vcdplayer.h"
#include "vcdio.h"

Macros

#define LOG_ERR(p_vcdplayer, s, args...)
 
#define dbg_print(p_vcdplayer, mask, s, args...)
 
#define add_format_str_info(val)
 
#define add_format_num_info(val, fmt)
 
#define TEMP_STR_SIZE   256
 
#define TEMP_STR_LEN   (TEMP_STR_SIZE-1)
 
#define RETURN_NULL_STILL
 

Functions

void vcdinfo_get_seg_resolution (const vcdinfo_obj_t *p_vcdinfo, segnum_t i_seg, uint16_t *max_x, uint16_t *max_y)
 
static void _vcdplayer_set_origin (vcdplayer_t *p_vcdplayer)
 
bool vcdplayer_pbc_is_on (const vcdplayer_t *p_vcdplayer)
 
static size_t _vcdplayer_get_item_size (vcdplayer_t *p_vcdplayer, vcdinfo_itemid_t itemid)
 
char * vcdplayer_format_str (vcdplayer_t *p_vcdplayer, const char format_str[])
 
static void _vcdplayer_update_entry (vcdinfo_obj_t *p_vcdinfo, uint16_t ofs, uint16_t *entry, const char *label)
 
void vcdplayer_update_nav (vcdplayer_t *p_vcdplayer)
 
static void _vcdplayer_set_track (vcdplayer_t *p_vcdplayer, unsigned int i_track)
 
static void _vcdplayer_set_entry (vcdplayer_t *p_vcdplayer, unsigned int num)
 
static void _vcdplayer_set_segment (vcdplayer_t *p_vcdplayer, unsigned int num)
 
static void vcdplayer_play_single_item (vcdplayer_t *p_vcdplayer, vcdinfo_itemid_t itemid)
 
static bool _vcdplayer_inc_play_item (vcdplayer_t *p_vcdplayer)
 
void vcdplayer_play (vcdplayer_t *p_vcdplayer, vcdinfo_itemid_t itemid)
 
static vcdplayer_read_status_t vcdplayer_pbc_nav (vcdplayer_t *p_vcdplayer, uint8_t *p_buf)
 
static vcdplayer_read_status_t vcdplayer_non_pbc_nav (vcdplayer_t *p_vcdplayer, uint8_t *p_buf)
 
vcdplayer_read_status_t vcdplayer_read (vcdplayer_t *p_vcdplayer, uint8_t *p_buf, const off_t i_len)
 
void vcdplayer_send_button_update (vcdplayer_t *p_vcdplayer, const int mode)
 

Macro Definition Documentation

◆ add_format_num_info

#define add_format_num_info ( val,
fmt )
Value:
{ \
char num_str[10]; \
unsigned int len; \
snprintf(num_str, sizeof(num_str), fmt, val); \
len=strlen(num_str); \
if (len != 0) { \
strncat(tp, num_str, TEMP_STR_LEN-(tp-temp_str)); \
tp += len; \
} \
saw_control_prefix = false; \
}
#define TEMP_STR_LEN

Referenced by vcdplayer_format_str().

◆ add_format_str_info

#define add_format_str_info ( val)
Value:
{ \
const char *str = val; \
unsigned int len; \
if (val != NULL) { \
len=strlen(str); \
if (len != 0) { \
strncat(tp, str, TEMP_STR_LEN-(tp-temp_str)); \
tp += len; \
} \
saw_control_prefix = false; \
} \
}
NULL
Definition xine_plugin.c:78

Referenced by vcdplayer_format_str().

◆ dbg_print

#define dbg_print ( p_vcdplayer,
mask,
s,
args... )
Value:
if (p_vcdplayer->log_msg) \
p_vcdplayer->log_msg (p_vcdplayer->user_data, mask, "input_vcd: %s: "s, __func__ , ##args)

Referenced by _vcdplayer_inc_play_item(), _vcdplayer_set_entry(), _vcdplayer_set_origin(), _vcdplayer_set_segment(), _vcdplayer_set_track(), vcdplayer_pbc_nav(), vcdplayer_play(), vcdplayer_play_single_item(), and vcdplayer_read().

◆ LOG_ERR

#define LOG_ERR ( p_vcdplayer,
s,
args... )
Value:
if (p_vcdplayer->log_err) \
p_vcdplayer->log_err (p_vcdplayer->user_data, ~0, "input_vcd: %s: "s, __func__ , ##args)

Referenced by _vcdplayer_get_item_size(), _vcdplayer_set_entry(), _vcdplayer_set_segment(), vcdplayer_non_pbc_nav(), vcdplayer_pbc_nav(), and vcdplayer_play_single_item().

◆ RETURN_NULL_STILL

#define RETURN_NULL_STILL
Value:
p_vcdplayer->i_still = 127; \
memset (p_buf, 0, M2F2_SECTOR_SIZE); \
p_buf[0] = 0; p_buf[1] = 0; p_buf[2] = 0x01; \
@ READ_STILL_FRAME
Definition vcdplayer.h:225

Referenced by vcdplayer_non_pbc_nav(), and vcdplayer_pbc_nav().

◆ TEMP_STR_LEN

#define TEMP_STR_LEN   (TEMP_STR_SIZE-1)

◆ TEMP_STR_SIZE

#define TEMP_STR_SIZE   256

Function Documentation

◆ _vcdplayer_get_item_size()

static size_t _vcdplayer_get_item_size ( vcdplayer_t * p_vcdplayer,
vcdinfo_itemid_t itemid )
static

◆ _vcdplayer_inc_play_item()

static bool _vcdplayer_inc_play_item ( vcdplayer_t * p_vcdplayer)
static

◆ _vcdplayer_set_entry()

static void _vcdplayer_set_entry ( vcdplayer_t * p_vcdplayer,
unsigned int num )
static

◆ _vcdplayer_set_origin()

static void _vcdplayer_set_origin ( vcdplayer_t * p_vcdplayer)
static

◆ _vcdplayer_set_segment()

static void _vcdplayer_set_segment ( vcdplayer_t * p_vcdplayer,
unsigned int num )
static

◆ _vcdplayer_set_track()

static void _vcdplayer_set_track ( vcdplayer_t * p_vcdplayer,
unsigned int i_track )
static

◆ _vcdplayer_update_entry()

static void _vcdplayer_update_entry ( vcdinfo_obj_t * p_vcdinfo,
uint16_t ofs,
uint16_t * entry,
const char * label )
static

References NULL.

Referenced by vcdplayer_update_nav().

◆ vcdinfo_get_seg_resolution()

void vcdinfo_get_seg_resolution ( const vcdinfo_obj_t * p_vcdinfo,
segnum_t i_seg,
uint16_t * max_x,
uint16_t * max_y )

◆ vcdplayer_format_str()

char * vcdplayer_format_str ( vcdplayer_t * p_vcdplayer,
const char format_str[] )

Take a format string and expand escape sequences, that is sequences that begin with %, with information from the current VCD. The expanded string is returned. Here is a list of escape sequences:

A : The album information C : The VCD volume count - the number of CD's in the collection. c : The VCD volume num - the number of the CD in the collection. F : The VCD Format, e.g. VCD 1.0, VCD 1.1, VCD 2.0, or SVCD I : The current entry/segment/playback type, e.g. ENTRY, TRACK, SEGMENT... L : The playlist ID prefixed with " LID" if it exists N : The current number of the above - a decimal number P : The publisher ID p : The preparer ID S : If we are in a segment (menu), the kind of segment T : The track number V : The volume set ID v : The volume ID A number between 1 and the volume count. %% : a %

References add_format_num_info, add_format_str_info, vcdplayer_s::i_lid, vcdplayer_s::i_track, vcdplayer_s::play_item, TEMP_STR_LEN, TEMP_STR_SIZE, vcdplayer_s::vcd, and vcdplayer_pbc_is_on().

Referenced by vcd_set_meta_info(), and vcd_update_title_display().

◆ vcdplayer_non_pbc_nav()

static vcdplayer_read_status_t vcdplayer_non_pbc_nav ( vcdplayer_t * p_vcdplayer,
uint8_t * p_buf )
static

◆ vcdplayer_pbc_is_on()

bool vcdplayer_pbc_is_on ( const vcdplayer_t * p_vcdplayer)

◆ vcdplayer_pbc_nav()

static vcdplayer_read_status_t vcdplayer_pbc_nav ( vcdplayer_t * p_vcdplayer,
uint8_t * p_buf )
static

◆ vcdplayer_play()

void vcdplayer_play ( vcdplayer_t * p_vcdplayer,
vcdinfo_itemid_t itemid )

◆ vcdplayer_play_single_item()

static void vcdplayer_play_single_item ( vcdplayer_t * p_vcdplayer,
vcdinfo_itemid_t itemid )
static

◆ vcdplayer_read()

vcdplayer_read_status_t vcdplayer_read ( vcdplayer_t * p_vcdplayer,
uint8_t * p_buf,
const off_t i_len )

Read i_len bytes into buf and return the status back.

This routine is a bit complicated because on reaching the end of a track or entry we may automatically advance to the item, or interpret the next item in the playback-control list.

References dbg_print, vcdplayer_s::end_lsn, vcdplayer_s::i_lsn, vcdplayer_s::i_still, INPUT_DBG_LSN, INPUT_DBG_PBC, READ_BLOCK, READ_ERROR, READ_STILL_FRAME, vcdplayer_s::vcd, vcdplayer_non_pbc_nav(), vcdplayer_pbc_is_on(), and vcdplayer_pbc_nav().

Referenced by vcd_plugin_read_block().

◆ vcdplayer_send_button_update()

void vcdplayer_send_button_update ( vcdplayer_t * p_vcdplayer,
int mode )

Get the number of tracks or titles of the VCD. The result is stored in "titles".

References mode().

Referenced by vcd_handle_events().

◆ vcdplayer_update_nav()

void vcdplayer_update_nav ( vcdplayer_t * p_vcdplayer)