mirror of https://github.com/mpv-player/mpv
using #ifdef HAVE_VCD
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@3262 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
parent
00201b1e0a
commit
b4608fa567
|
@ -75,6 +75,7 @@ int bsize = VCD_SECTOR_SIZE;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
//============ Open VideoCD track ==============
|
//============ Open VideoCD track ==============
|
||||||
|
#ifdef HAVE_VCD
|
||||||
if(vcd_track){
|
if(vcd_track){
|
||||||
int ret,ret2;
|
int ret,ret2;
|
||||||
if(!filename) filename=DEFAULT_CDROM_DEVICE;
|
if(!filename) filename=DEFAULT_CDROM_DEVICE;
|
||||||
|
@ -100,6 +101,7 @@ if(vcd_track){
|
||||||
stream->end_pos=ret2;
|
stream->end_pos=ret2;
|
||||||
return stream;
|
return stream;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
//============ Open DVD title ==============
|
//============ Open DVD title ==============
|
||||||
#ifdef USE_DVDREAD
|
#ifdef USE_DVDREAD
|
||||||
|
|
|
@ -17,12 +17,16 @@
|
||||||
|
|
||||||
extern int verbose; // defined in mplayer.c
|
extern int verbose; // defined in mplayer.c
|
||||||
|
|
||||||
|
#ifdef HAVE_VCD
|
||||||
|
|
||||||
#ifdef __FreeBSD__
|
#ifdef __FreeBSD__
|
||||||
#include "vcd_read_fbsd.h"
|
#include "vcd_read_fbsd.h"
|
||||||
#else
|
#else
|
||||||
#include "vcd_read.h"
|
#include "vcd_read.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef USE_DVDREAD
|
#ifdef USE_DVDREAD
|
||||||
int dvd_read_sector(void* d,void* p2);
|
int dvd_read_sector(void* d,void* p2);
|
||||||
void dvd_seek(void* d,off_t pos);
|
void dvd_seek(void* d,off_t pos);
|
||||||
|
@ -45,12 +49,14 @@ int stream_fill_buffer(stream_t *s){
|
||||||
#else
|
#else
|
||||||
len=read(s->fd,s->buffer,STREAM_BUFFER_SIZE);break;
|
len=read(s->fd,s->buffer,STREAM_BUFFER_SIZE);break;
|
||||||
#endif
|
#endif
|
||||||
|
#ifdef HAVE_VCD
|
||||||
case STREAMTYPE_VCD:
|
case STREAMTYPE_VCD:
|
||||||
#ifdef VCD_CACHE
|
#ifdef VCD_CACHE
|
||||||
len=vcd_cache_read(s->fd,s->buffer);break;
|
len=vcd_cache_read(s->fd,s->buffer);break;
|
||||||
#else
|
#else
|
||||||
len=vcd_read(s->fd,s->buffer);break;
|
len=vcd_read(s->fd,s->buffer);break;
|
||||||
#endif
|
#endif
|
||||||
|
#endif
|
||||||
#ifdef USE_DVDREAD
|
#ifdef USE_DVDREAD
|
||||||
case STREAMTYPE_DVD: {
|
case STREAMTYPE_DVD: {
|
||||||
off_t pos=dvd_read_sector(s->priv,s->buffer);
|
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
|
s->pos=newpos; // real seek
|
||||||
if(lseek(s->fd,s->pos,SEEK_SET)<0) s->eof=1;
|
if(lseek(s->fd,s->pos,SEEK_SET)<0) s->eof=1;
|
||||||
break;
|
break;
|
||||||
|
#ifdef HAVE_VCD
|
||||||
case STREAMTYPE_VCD:
|
case STREAMTYPE_VCD:
|
||||||
s->pos=newpos; // real seek
|
s->pos=newpos; // real seek
|
||||||
#ifdef VCD_CACHE
|
#ifdef VCD_CACHE
|
||||||
|
@ -125,6 +132,7 @@ if(newpos==0 || newpos!=s->pos){
|
||||||
vcd_set_msf(s->pos/VCD_SECTOR_DATA);
|
vcd_set_msf(s->pos/VCD_SECTOR_DATA);
|
||||||
#endif
|
#endif
|
||||||
break;
|
break;
|
||||||
|
#endif
|
||||||
#ifdef USE_DVDREAD
|
#ifdef USE_DVDREAD
|
||||||
case STREAMTYPE_DVD:
|
case STREAMTYPE_DVD:
|
||||||
s->pos=newpos; // real seek
|
s->pos=newpos; // real seek
|
||||||
|
|
|
@ -254,31 +254,8 @@ int vcd_cache_read(int fd,char* mem){
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#else /* linux || sun */
|
#else /* linux || sun || __bsdi__ */
|
||||||
|
|
||||||
int vcd_seek_to_track(int fd,int track)
|
#error vcd is not yet supported on this arch...
|
||||||
{
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
|
|
||||||
int vcd_get_track_end(int fd,int track)
|
#endif
|
||||||
{
|
|
||||||
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 */
|
|
||||||
|
|
Loading…
Reference in New Issue