summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorRocky Bernstein <rockyb@users.sourceforge.net>2004-12-30 09:05:57 +0000
committerRocky Bernstein <rockyb@users.sourceforge.net>2004-12-30 09:05:57 +0000
commitb875106199bfd4dcf823ac02048eb99b9cb4c341 (patch)
tree5d181124135c916aca93ee2d4210a500b9563743 /src
parentc5a2566db7e9a18dee1d2e331269bc178856d666 (diff)
downloadxine-lib-b875106199bfd4dcf823ac02048eb99b9cb4c341.tar.gz
xine-lib-b875106199bfd4dcf823ac02048eb99b9cb4c341.tar.bz2
More small changes of a cleanup nature.
CVS patchset: 7311 CVS date: 2004/12/30 09:05:57
Diffstat (limited to 'src')
-rw-r--r--src/input/vcd/vcdplayer.c22
-rw-r--r--src/input/vcd/vcdplayer.h6
-rw-r--r--src/input/vcd/xineplug_inp_vcd.c32
3 files changed, 40 insertions, 20 deletions
diff --git a/src/input/vcd/vcdplayer.c b/src/input/vcd/vcdplayer.c
index ecd88485a..d82a24021 100644
--- a/src/input/vcd/vcdplayer.c
+++ b/src/input/vcd/vcdplayer.c
@@ -1,5 +1,5 @@
/*
- $Id: vcdplayer.c,v 1.9 2004/12/29 16:16:52 jcdutton Exp $
+ $Id: vcdplayer.c,v 1.10 2004/12/30 09:05:57 rockyb Exp $
Copyright (C) 2002, 2003, 2004 Rocky Bernstein <rocky@panix.com>
@@ -280,7 +280,7 @@ _vcdplayer_update_entry(vcdinfo_obj_t *p_vcdinfo, uint16_t ofs,
vcdinfo_offset_t *off = vcdinfo_get_offset_t(p_vcdinfo, ofs);
if (off != NULL) {
*entry = off->lid;
- dbg_print(INPUT_DBG_PBC, "%s: %d\n", label, off->lid);
+ dbg_print(INPUT_DBG_PBC, "%s: LID %d\n", label, off->lid);
} else
*entry = VCDINFO_INVALID_ENTRY;
}
@@ -803,12 +803,12 @@ vcdplayer_pbc_nav (vcdplayer_t *p_vcdplayer, uint8_t *buf)
vcdplayer_play(p_vcdplayer, itemid);
goto skip_next_play;
} else {
- int num_selections = vcdinf_get_num_selections(p_vcdplayer->pxd.psd);
- if (num_selections > 0) {
+ int i_selections = vcdinf_get_num_selections(p_vcdplayer->pxd.psd);
+ if (i_selections > 0) {
/* Pick a random selection. */
unsigned int bsn=vcdinf_get_bsn(p_vcdplayer->pxd.psd);
int rand_selection=bsn +
- (int) ((num_selections+0.0)*rand()/(RAND_MAX+1.0));
+ (int) ((i_selections+0.0)*rand()/(RAND_MAX+1.0));
#if defined(LIBVCD_VERSION)
/* version 0.7.21 or greater */
@@ -932,8 +932,8 @@ vcdplayer_read (vcdplayer_t *p_vcdplayer, uint8_t *buf,
if ( p_vcdplayer->i_lsn >= p_vcdplayer->end_lsn ) {
vcdplayer_read_status_t read_status;
-
- /* We've run off of the end of p_vcdplayer entry. Do we continue or stop? */
+
+ /* We've run off of the end of this entry. Do we continue or stop? */
dbg_print( (INPUT_DBG_LSN|INPUT_DBG_PBC),
"end reached, cur: %u, end: %u\n",
p_vcdplayer->i_lsn, p_vcdplayer->end_lsn);
@@ -956,7 +956,7 @@ vcdplayer_read (vcdplayer_t *p_vcdplayer, uint8_t *buf,
*/
{
- CdIo *img = vcdinfo_get_cd_image(p_vcdplayer->vcd);
+ CdIo *p_img = vcdinfo_get_cd_image(p_vcdplayer->vcd);
typedef struct {
uint8_t subheader [CDIO_CD_SUBHEADER_SIZE];
uint8_t data [M2F2_SECTOR_SIZE];
@@ -965,10 +965,10 @@ vcdplayer_read (vcdplayer_t *p_vcdplayer, uint8_t *buf,
vcdsector_t vcd_sector;
do {
- dbg_print(INPUT_DBG_LSN, "LSN: %u\n", p_vcdplayer->i_lsn);
- if (cdio_read_mode2_sector(img, &vcd_sector,
- p_vcdplayer->i_lsn, true)!=0) {
+ if (cdio_read_mode2_sector(p_img, &vcd_sector,
+ p_vcdplayer->i_lsn, true)!=0) {
dbg_print(INPUT_DBG_LSN, "read error\n");
+ p_vcdplayer->i_lsn++;
return READ_ERROR;
}
p_vcdplayer->i_lsn++;
diff --git a/src/input/vcd/vcdplayer.h b/src/input/vcd/vcdplayer.h
index 68a4b2784..b4fe25b3c 100644
--- a/src/input/vcd/vcdplayer.h
+++ b/src/input/vcd/vcdplayer.h
@@ -1,5 +1,5 @@
/*
- $Id: vcdplayer.h,v 1.4 2004/12/29 16:16:52 jcdutton Exp $
+ $Id: vcdplayer.h,v 1.5 2004/12/30 09:05:57 rockyb Exp $
Copyright (C) 2002, 2003, 2004 Rocky Bernstein <rocky@panix.com>
@@ -183,8 +183,8 @@ typedef struct vcdplayer_input_s {
/*--------------------------------------------------------------
(S)VCD Medium information
---------------------------------------------------------------*/
- char *psz_source; /* VCD device currently open */
- bool opened; /* true if initialized */
+ char *psz_source; /* VCD device currently open */
+ bool opened; /* true if initialized */
track_t i_tracks; /* # of playable MPEG tracks. This is
generally one less than the number
diff --git a/src/input/vcd/xineplug_inp_vcd.c b/src/input/vcd/xineplug_inp_vcd.c
index 864b48ee9..0fcc312f8 100644
--- a/src/input/vcd/xineplug_inp_vcd.c
+++ b/src/input/vcd/xineplug_inp_vcd.c
@@ -1,9 +1,9 @@
/*
- $Id: xineplug_inp_vcd.c,v 1.27 2004/12/29 09:23:56 rockyb Exp $
+ $Id: xineplug_inp_vcd.c,v 1.28 2004/12/30 09:05:57 rockyb Exp $
Copyright (C) 2002, 2003, 2004 Rocky Bernstein <rocky@panix.com>
- Program is free software; you can redistribute it and/or modify
+ This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
@@ -139,6 +139,7 @@ struct vcd_input_plugin_tag {
xine_stream_t *stream;
xine_event_queue_t *event_queue;
+ time_t pause_end_time;
vcd_input_class_t *class;
vcd_config_t v_config; /* Config stuff initially inherited */
bool jumped; /* True if we changed tracks or any
@@ -353,7 +354,7 @@ vcd_build_mrl_list(vcd_input_class_t *class, char *vcd_device)
/* Record MRL's for tracks */
for (n=1; n<=player->i_tracks; n++) {
memset(&mrl, 0, sizeof (mrl));
- sprintf(mrl, "%s%s@T%2u", MRL_PREFIX, vcd_device, n);
+ snprintf(mrl, sizeof(mrl), "%s%s@T%u", MRL_PREFIX, vcd_device, n);
vcd_add_mrl_slot(class, mrl, player->track[n-1].size, &i);
}
@@ -364,7 +365,7 @@ vcd_build_mrl_list(vcd_input_class_t *class, char *vcd_device)
if (i_entries > 0) {
for (n=0; n<i_entries; n++) {
memset(&mrl, 0, sizeof (mrl));
- sprintf(mrl, "%s%s@E%4u", MRL_PREFIX, vcd_device, n);
+ snprintf(mrl, sizeof(mrl), "%s%s@E%u", MRL_PREFIX, vcd_device, n);
vcd_add_mrl_slot(class, mrl, player->entry[n].size, &i);
}
}
@@ -376,7 +377,7 @@ vcd_build_mrl_list(vcd_input_class_t *class, char *vcd_device)
uint16_t ofs = vcdinf_get_lot_offset(vcdinfo_get_lot(player->vcd), n);
if (ofs != PSD_OFS_DISABLED || player->show_rejected) {
memset(&mrl, 0, sizeof (mrl));
- sprintf(mrl, "%s%s@P%4u%s", MRL_PREFIX, vcd_device, n+1,
+ snprintf(mrl, sizeof(mrl), "%s%s@P%u%s", MRL_PREFIX, vcd_device, n+1,
ofs == PSD_OFS_DISABLED ? "*" : "");
vcd_add_mrl_slot(class, mrl, 0, &i);
class->mrl_segment_offset++;
@@ -408,7 +409,7 @@ vcd_build_mrl_list(vcd_input_class_t *class, char *vcd_device)
}
memset(&mrl, 0, sizeof (mrl));
- sprintf(mrl, "%s%s@%c%4u", MRL_PREFIX, vcd_device, c, n);
+ snprintf(mrl, sizeof(mrl), "%s%s@%c%u", MRL_PREFIX, vcd_device, c, n);
vcd_add_mrl_slot(class, mrl, player->segment[n].size, &i);
}
}
@@ -1784,6 +1785,25 @@ _("Format used in the GUI Title. Similar to the Unix date "
return class;
}
+/*
+ Exported plugin catalog entries.
+
+ All plugins listing only the current API number break when the API
+ number is increased. This is by design.
+
+ Sometimes in the rush to get out a buggy release, the API number is
+ increased without communication let alone a concern for whether it
+ is necessary or how many plugins it might break. And that is
+ precisely when what happened between API release 12 and API
+ 13. Input plugin API numbers 12 and 13 are functionally identical.
+
+ Because of problems like this, we'll just put in a future API
+ release. If the number was increased for a reason that doesn't
+ affect us (such as for nor reason at all), then this plugin will
+ work unmodified that future APIs. If on the other hand there was
+ incompatible change, we are no worse off than if we hadn't entered
+ the next API number since in both cases the plugin is broken.
+ */
const plugin_info_t xine_plugin_info[] = {
/* type, API, "name", version, special_info, init_function */