using #ifdef HAVE_VCD

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@3262 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
arpi 2001-12-01 23:40:24 +00:00
parent 00201b1e0a
commit b4608fa567
3 changed files with 13 additions and 26 deletions

View File

@ -75,6 +75,7 @@ int bsize = VCD_SECTOR_SIZE;
#endif
//============ Open VideoCD track ==============
#ifdef HAVE_VCD
if(vcd_track){
int ret,ret2;
if(!filename) filename=DEFAULT_CDROM_DEVICE;
@ -100,6 +101,7 @@ if(vcd_track){
stream->end_pos=ret2;
return stream;
}
#endif
//============ Open DVD title ==============
#ifdef USE_DVDREAD

View File

@ -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 @@ int stream_fill_buffer(stream_t *s){
#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 @@ if(newpos==0 || newpos!=s->pos){
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 @@ if(newpos==0 || newpos!=s->pos){
vcd_set_msf(s->pos/VCD_SECTOR_DATA);
#endif
break;
#endif
#ifdef USE_DVDREAD
case STREAMTYPE_DVD:
s->pos=newpos; // real seek

View File

@ -254,31 +254,8 @@ int vcd_cache_read(int fd,char* mem){
}
#endif
#else /* linux || sun */
#else /* linux || sun || __bsdi__ */
int vcd_seek_to_track(int fd,int track)
{
return -1;
}
#error vcd is not yet supported on this arch...
int vcd_get_track_end(int fd,int track)
{
return -1;
}
void vcd_read_toc(int fd)
{
}
static char vcd_buf[VCD_SECTOR_SIZE];
static int vcd_read(int fd,char *mem)
{
return -1;
}
static inline void vcd_set_msf(unsigned int sect)
{
}
#endif /* !linux && !sun */
#endif