summaryrefslogtreecommitdiffstats
path: root/vcd_read.h
diff options
context:
space:
mode:
authorarpi <arpi@b3059339-0415-0410-9bf9-f77b7e298cf2>2001-10-05 00:39:54 +0000
committerarpi <arpi@b3059339-0415-0410-9bf9-f77b7e298cf2>2001-10-05 00:39:54 +0000
commit2164dcdbe89856b7c24f6184ac6a73f39146f2d2 (patch)
tree68cdba1544ced2a6ceb042d36186da291cb38c8a /vcd_read.h
parentf351f3b2eb1fb3098b117c8a784a5a5361f42fcd (diff)
downloadmpv-2164dcdbe89856b7c24f6184ac6a73f39146f2d2.tar.bz2
mpv-2164dcdbe89856b7c24f6184ac6a73f39146f2d2.tar.xz
BSD/OS support
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@2090 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'vcd_read.h')
-rw-r--r--vcd_read.h8
1 files changed, 5 insertions, 3 deletions
diff --git a/vcd_read.h b/vcd_read.h
index c30dfa6f3f..9d6564be7a 100644
--- a/vcd_read.h
+++ b/vcd_read.h
@@ -1,11 +1,13 @@
//=================== VideoCD ==========================
-#if defined(linux) || defined(sun)
+#if defined(linux) || defined(sun) || defined(__bsdi__)
#if defined(linux)
#include <linux/cdrom.h>
#elif defined(sun)
#include <sys/cdio.h>
static int sun_vcd_read(int, int*);
+#elif defined(__bsdi__)
+#include <dvd.h>
#endif
@@ -79,7 +81,7 @@ void vcd_read_toc(int fd){
static char vcd_buf[VCD_SECTOR_SIZE];
static int vcd_read(int fd,char *mem){
-#if defined(linux)
+#if defined(linux) || defined(__bsdi__)
memcpy(vcd_buf,&vcd_entry.cdte_addr.msf,sizeof(struct cdrom_msf));
if(ioctl(fd,CDROMREADRAW,vcd_buf)==-1) return 0; // EOF?
memcpy(mem,&vcd_buf[VCD_SECTOR_OFFS],VCD_SECTOR_DATA);
@@ -236,7 +238,7 @@ int vcd_cache_read(int fd,char* mem){
++vcd_cache_index;if(vcd_cache_index>=vcd_cache_size)vcd_cache_index=0;
// read data!
vcd_set_msf(vcd_cache_current);
-#if defined(linux)
+#if defined(linux) || defined(__bsdi__)
memcpy(vcd_buf,&vcd_entry.cdte_addr.msf,sizeof(struct cdrom_msf));
if(ioctl(fd,CDROMREADRAW,vcd_buf)==-1) return 0; // EOF?
memcpy(mem,&vcd_buf[VCD_SECTOR_OFFS],VCD_SECTOR_DATA);