diff options
author | Darren Salt <linux@youmustbejoking.demon.co.uk> | 2009-03-03 22:27:25 +0000 |
---|---|---|
committer | Darren Salt <linux@youmustbejoking.demon.co.uk> | 2009-03-03 22:27:25 +0000 |
commit | d031764edb6050623f0e399be5a7cbc7bee76249 (patch) | |
tree | 5712270b75712ad067ecd7c8a807c483b8f0db4a /src/input | |
parent | b4eea697942773917c2b4c8b932e246227ba01d4 (diff) | |
parent | bc0969908f75c641469ab46e9866c3ee3026a435 (diff) | |
download | xine-lib-d031764edb6050623f0e399be5a7cbc7bee76249.tar.gz xine-lib-d031764edb6050623f0e399be5a7cbc7bee76249.tar.bz2 |
Merge from 1.1.
--HG--
rename : src/libmpeg2new/include/Makefile.am => src/video_dec/libmpeg2new/include/Makefile.am
rename : src/libmpeg2new/libmpeg2/Makefile.am => src/video_dec/libmpeg2new/libmpeg2/Makefile.am
Diffstat (limited to 'src/input')
-rw-r--r-- | src/input/input_cdda.c | 16 | ||||
-rw-r--r-- | src/input/input_dvd.c | 3 | ||||
-rw-r--r-- | src/input/input_vcd.c | 18 |
3 files changed, 23 insertions, 14 deletions
diff --git a/src/input/input_cdda.c b/src/input/input_cdda.c index b7aed3a5e..cb4c9c20c 100644 --- a/src/input/input_cdda.c +++ b/src/input/input_cdda.c @@ -82,6 +82,8 @@ #define DEFAULT_CDDA_DEVICE "/vol/dev/aliases/cdrom0" #elif defined(WIN32) #define DEFAULT_CDDA_DEVICE "d:\\" +#elif defined(__OpenBSD__) +#define DEFAULT_CDDA_DEVICE "/dev/rcd0c" #else #define DEFAULT_CDDA_DEVICE "/dev/cdrom" #endif @@ -621,7 +623,7 @@ static int read_cdrom_frames(cdda_input_plugin_t *this_gen, int frame, int num_f return 0; } -#elif defined(__FreeBSD_kernel__) || defined(__NetBSD__) +#elif defined(__FreeBSD_kernel__) || defined(__NetBSD__) || defined(__OpenBSD__) #include <sys/cdio.h> @@ -634,7 +636,7 @@ static int read_cdrom_toc(int fd, cdrom_toc *toc) { struct ioc_toc_header tochdr; #if defined(__FreeBSD_kernel__) struct ioc_read_toc_single_entry tocentry; -#elif defined(__NetBSD__) +#elif defined(__NetBSD__) || defined(__OpenBSD__) struct ioc_read_toc_entry tocentry; struct cd_toc_entry data; #endif @@ -669,7 +671,7 @@ static int read_cdrom_toc(int fd, cdrom_toc *toc) { perror("CDIOREADTOCENTRY"); return -1; } -#elif defined(__NetBSD__) +#elif defined(__NetBSD__) || defined(__OpenBSD__) memset(&data, 0, sizeof(data)); tocentry.data_len = sizeof(data); tocentry.data = &data; @@ -690,7 +692,7 @@ static int read_cdrom_toc(int fd, cdrom_toc *toc) { (tocentry.entry.addr.msf.minute * CD_SECONDS_PER_MINUTE * CD_FRAMES_PER_SECOND) + (tocentry.entry.addr.msf.second * CD_FRAMES_PER_SECOND) + tocentry.entry.addr.msf.frame; -#elif defined(__NetBSD__) +#elif defined(__NetBSD__) || defined(__OpenBSD__) toc->toc_entries[i-1].track_mode = (tocentry.data->control & 0x04) ? 1 : 0; toc->toc_entries[i-1].first_frame_minute = tocentry.data->addr.msf.minute; toc->toc_entries[i-1].first_frame_second = tocentry.data->addr.msf.second; @@ -712,7 +714,7 @@ static int read_cdrom_toc(int fd, cdrom_toc *toc) { perror("CDIOREADTOCENTRY"); return -1; } -#elif defined(__NetBSD__) +#elif defined(__NetBSD__) || defined(__OpenBSD__) memset(&data, 0, sizeof(data)); tocentry.data_len = sizeof(data); tocentry.data = &data; @@ -733,7 +735,7 @@ static int read_cdrom_toc(int fd, cdrom_toc *toc) { (tocentry.entry.addr.msf.minute * CD_SECONDS_PER_MINUTE * CD_FRAMES_PER_SECOND) + (tocentry.entry.addr.msf.second * CD_FRAMES_PER_SECOND) + tocentry.entry.addr.msf.frame; -#elif defined(__NetBSD__) +#elif defined(__NetBSD__) || defined(__OpenBSD__) toc->leadout_track.track_mode = (tocentry.data->control & 0x04) ? 1 : 0; toc->leadout_track.first_frame_minute = tocentry.data->addr.msf.minute; toc->leadout_track.first_frame_second = tocentry.data->addr.msf.second; @@ -771,7 +773,7 @@ static int read_cdrom_frames(cdda_input_plugin_t *this_gen, int frame, int num_f perror("CDIOCREADAUDIO"); return -1; } -#elif defined(__NetBSD__) +#elif defined(__NetBSD__) || defined(__OpenBSD__) scsireq_t req; int nblocks = 1; diff --git a/src/input/input_dvd.c b/src/input/input_dvd.c index 0e5078099..da52604ca 100644 --- a/src/input/input_dvd.c +++ b/src/input/input_dvd.c @@ -115,6 +115,9 @@ /* There really isn't a default on Windows! */ #define DVD_PATH "d:\\" #define RDVD_PATH "d:\\" +#elif defined(__OpenBSD__) +#define DVD_PATH "/dev/rcd0c" +#define RDVD_PATH "/dev/rcd0c" #else #define DVD_PATH "/dev/dvd" #define RDVD_PATH "/dev/rdvd" diff --git a/src/input/input_vcd.c b/src/input/input_vcd.c index 26eb6344b..ccc75a45a 100644 --- a/src/input/input_vcd.c +++ b/src/input/input_vcd.c @@ -92,7 +92,7 @@ typedef struct { #if defined (__linux__) || defined(__sun) struct cdrom_tochdr tochdr; struct cdrom_tocentry tocent[100]; -#elif defined (__FreeBSD_kernel__) +#elif defined (__FreeBSD_kernel__) || defined (__OpenBSD__) struct ioc_toc_header tochdr; struct cd_toc_entry *tocent; off_t cur_sec; @@ -117,7 +117,7 @@ typedef struct { int cur_track; -#if defined (__linux__) || defined(__sun) || defined (__FreeBSD_kernel__) +#if defined (__linux__) || defined(__sun) || defined (__FreeBSD_kernel__) || defined (__OpenBSD__) uint8_t cur_min, cur_sec, cur_frame; #endif @@ -177,7 +177,7 @@ static int input_vcd_read_toc (vcd_input_class_t *this, int fd) { return 0; } -#elif defined (__FreeBSD_kernel__) +#elif defined (__FreeBSD_kernel__) || defined (__OpenBSD__) static int input_vcd_read_toc (vcd_input_class_t *this, int fd) { struct ioc_read_toc_entry te; @@ -394,7 +394,7 @@ static off_t vcd_plugin_read (input_plugin_t *this_gen, memcpy (buf, data.data, VCDSECTORSIZE); /* FIXME */ return VCDSECTORSIZE; } -#elif defined (__FreeBSD_kernel__) +#elif defined (__FreeBSD_kernel__) || defined (__OpenBSD__) static off_t vcd_plugin_read (input_plugin_t *this_gen, void *buf_gen, off_t nlen) { vcd_input_plugin_t *this = (vcd_input_plugin_t *) this_gen; @@ -534,7 +534,7 @@ static buf_element_t *vcd_plugin_read_block (input_plugin_t *this_gen, memcpy (buf->mem, data.data, VCDSECTORSIZE); /* FIXME */ return buf; } -#elif defined (__FreeBSD_kernel__) +#elif defined (__FreeBSD_kernel__) || defined (__OpenBSD__) static buf_element_t *vcd_plugin_read_block (input_plugin_t *this_gen, fifo_buffer_t *fifo, off_t nlen) { @@ -693,7 +693,7 @@ static off_t vcd_plugin_seek (input_plugin_t *this_gen, return offset ; /* FIXME */ } -#elif defined (__FreeBSD_kernel__) +#elif defined (__FreeBSD_kernel__) || defined (__OpenBSD__) static off_t vcd_plugin_seek (input_plugin_t *this_gen, off_t offset, int origin) { @@ -767,7 +767,7 @@ static off_t vcd_plugin_get_length (input_plugin_t *this_gen) { return (off_t) 0; } -#elif defined (__FreeBSD_kernel__) +#elif defined (__FreeBSD_kernel__) || defined (__OpenBSD__) static off_t vcd_plugin_get_length (input_plugin_t *this_gen) { vcd_input_plugin_t *this = (vcd_input_plugin_t *) this_gen; off_t len ; @@ -862,6 +862,10 @@ static int vcd_plugin_open (input_plugin_t *this_gen) { this->cur_min = this->cls->tocent[this->cur_track].cdte_addr.msf.minute; this->cur_sec = this->cls->tocent[this->cur_track].cdte_addr.msf.second; this->cur_frame = this->cls->tocent[this->cur_track].cdte_addr.msf.frame; +#elif defined (__OpenBSD__) + this->cur_min = this->cls->tocent[this->cur_track + 1 - this->cls->tochdr.starting_track].addr.msf.minute; + this->cur_sec = this->cls->tocent[this->cur_track + 1 - this->cls->tochdr.starting_track].addr.msf.second; + this->cur_frame = this->cls->tocent[this->cur_track + 1 - this->cls->tochdr.starting_track].addr.msf.frame; #elif defined (__FreeBSD_kernel__) { int bsize = 2352; |