changeset 3261:caac174877b7

using #ifdef HAVE_VCD
author arpi
date Sat, 01 Dec 2001 23:40:24 +0000
parents 80e1e29e71e7
children 75f36058f19c
files libmpdemux/open.c libmpdemux/stream.c libmpdemux/vcd_read.h
diffstat 3 files changed, 13 insertions(+), 26 deletions(-) [+]
line wrap: on
line diff
--- a/libmpdemux/open.c	Sat Dec 01 23:39:47 2001 +0000
+++ b/libmpdemux/open.c	Sat Dec 01 23:40:24 2001 +0000
@@ -75,6 +75,7 @@
 #endif
 
 //============ Open VideoCD track ==============
+#ifdef HAVE_VCD
 if(vcd_track){
   int ret,ret2;
   if(!filename) filename=DEFAULT_CDROM_DEVICE;
@@ -100,6 +101,7 @@
   stream->end_pos=ret2;
   return stream;
 }
+#endif
 
 //============ Open DVD title ==============
 #ifdef USE_DVDREAD
--- a/libmpdemux/stream.c	Sat Dec 01 23:39:47 2001 +0000
+++ b/libmpdemux/stream.c	Sat Dec 01 23:40:24 2001 +0000
@@ -17,12 +17,16 @@
 
 extern int verbose; // defined in mplayer.c
 
+#ifdef HAVE_VCD
+
 #ifdef __FreeBSD__
 #include "vcd_read_fbsd.h" 
 #else
 #include "vcd_read.h"
 #endif
 
+#endif
+
 #ifdef USE_DVDREAD
 int dvd_read_sector(void* d,void* p2);
 void dvd_seek(void* d,off_t pos);
@@ -45,12 +49,14 @@
 #else
     len=read(s->fd,s->buffer,STREAM_BUFFER_SIZE);break;
 #endif
+#ifdef HAVE_VCD
   case STREAMTYPE_VCD:
 #ifdef VCD_CACHE
     len=vcd_cache_read(s->fd,s->buffer);break;
 #else
     len=vcd_read(s->fd,s->buffer);break;
 #endif
+#endif
 #ifdef USE_DVDREAD
   case STREAMTYPE_DVD: {
     off_t pos=dvd_read_sector(s->priv,s->buffer);
@@ -117,6 +123,7 @@
     s->pos=newpos; // real seek
     if(lseek(s->fd,s->pos,SEEK_SET)<0) s->eof=1;
     break;
+#ifdef HAVE_VCD
   case STREAMTYPE_VCD:
     s->pos=newpos; // real seek
 #ifdef VCD_CACHE
@@ -125,6 +132,7 @@
     vcd_set_msf(s->pos/VCD_SECTOR_DATA);
 #endif
     break;
+#endif
 #ifdef USE_DVDREAD
   case STREAMTYPE_DVD:
     s->pos=newpos; // real seek
--- a/libmpdemux/vcd_read.h	Sat Dec 01 23:39:47 2001 +0000
+++ b/libmpdemux/vcd_read.h	Sat Dec 01 23:40:24 2001 +0000
@@ -254,31 +254,8 @@
 }
 #endif
 
-#else /* linux || sun */
-
-int vcd_seek_to_track(int fd,int track)
-{
-  return -1;
-}
-
-int vcd_get_track_end(int fd,int track)
-{
-  return -1;
-}
+#else /* linux || sun || __bsdi__ */
 
-void vcd_read_toc(int fd)
-{
-}
-
-static char vcd_buf[VCD_SECTOR_SIZE];
+#error vcd is not yet supported on this arch...
 
-static int vcd_read(int fd,char *mem)
-{
-  return -1;
-}
-
-static inline void vcd_set_msf(unsigned int sect)
-{
-}
-
-#endif /* !linux && !sun */
+#endif