Update of /cvsroot/xine/xine-vcdnav/input
In directory usw-pr-cvs1:/tmp/cvs-serv25211
Modified Files:
vcdio.c
Log Message:
Bug/Modularity: Remove in_still hack. Move code which belongs in
higher up in vcdnav there. Add a call trace and make vcdio_close code
more robust.
Index: vcdio.c
===================================================================
RCS file: /cvsroot/xine/xine-vcdnav/input/vcdio.c,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- vcdio.c 15 Jul 2002 11:26:38 -0000 1.6
+++ vcdio.c 27 Jul 2002 10:33:38 -0000 1.7
@@ -78,9 +78,6 @@
#define LOG_ERR(this, s, args...) \
this->log_err("%s: "s, __func__ , ##args)
-/* FIXME? */
-extern int in_still;
-
/*
return the size in bytes of the track that starts at "track"
*/
@@ -392,39 +389,6 @@
{
#if defined (__linux__) || defined(__sun__)
-#if TESTING
- dbg_print(INPUT_DBG_TRACE,
- "read cur: %02d:%02d:%02d end: %02d:%02d:%02d\n",
- this->cur_msf.min, this->cur_msf.sec, this->cur_msf.frame,
- this->end_msf.min, this->end_msf.sec, this->end_msf.frame);
-#endif
-
- if ( in_still != 0
- && (this->cur_msf.min>=this->end_msf.min)
- && (this->cur_msf.sec>=this->end_msf.sec)
- && (this->cur_msf.frame>=this->end_msf.frame)) {
- dbg_print(INPUT_DBG_MSF,
- "end reached, cur: %02d:%02d:%02d end: %02d:%02d:%02d\n",
- this->cur_msf.min, this->cur_msf.sec, this->cur_msf.frame,
- this->end_msf.min, this->end_msf.sec, this->end_msf.frame);
- return -2;
- } else {
- /* Have we past where the next entry is? */
- if ( this->look_for_next
- && (this->next_msf.min <= this->cur_msf.min)
- && (this->next_msf.sec <= this->cur_msf.sec)
- && (this->next_msf.frame <= this->cur_msf.frame) ) {
- this->cur_entry.num=this->next_entry;
- vcdplayer_update_nav(this);
- this->update_title(this);
- dbg_print(INPUT_DBG_MSF,
- "next reached. cur: %02d:%02d:%02d end: %02d:%02d:%02d\n",
- this->cur_msf.min, this->cur_msf.sec, this->cur_msf.frame,
- this->end_msf.min, this->end_msf.sec, this->end_msf.frame);
- }
- }
-
-
msf.cdmsf_min0 = this->cur_msf.min;
msf.cdmsf_sec0 = this->cur_msf.sec;
msf.cdmsf_frame0 = this->cur_msf.frame;
@@ -488,9 +452,11 @@
vcdio_close(vcdplayer_input_t *this)
{
int ret = close (this->fd);
- if ( 0 == ret) {
- this->fd = -1;
+ if (-1 == ret) {
+ LOG_ERR(this, "%s\n", strerror(errno));
}
+
+ this->fd = -1;
ret = vcdinfo_close(&(this->vcd));
return ret;
}
@@ -519,6 +485,8 @@
vcdio_close(this);
}
}
+
+ dbg_print(INPUT_DBG_CALL, "called with %s\n", intended_vcd_device);
this->fd = open (intended_vcd_device, O_RDONLY);
if (this->fd == -1) {
LOG_ERR(this, "%s %s: %s.\n", _("Error opening CDROM device"),
|