diff options
author | Uoti Urpala <uau@mplayer2.org> | 2012-04-06 16:58:39 +0300 |
---|---|---|
committer | Uoti Urpala <uau@mplayer2.org> | 2012-04-06 17:45:56 +0300 |
commit | e2fc1f640fdf473fdf8f1de6fd1212731b8ffa13 (patch) | |
tree | 11127d96adabf22894f4848bdd9bbda67d67542e /stream/stream_cddb.c | |
parent | b93ed278362185ff980e0ce8f4ab3029f8fe395f (diff) | |
download | mpv-e2fc1f640fdf473fdf8f1de6fd1212731b8ffa13.tar.bz2 mpv-e2fc1f640fdf473fdf8f1de6fd1212731b8ffa13.tar.xz |
build: remove OS/2 support
Diffstat (limited to 'stream/stream_cddb.c')
-rw-r--r-- | stream/stream_cddb.c | 74 |
1 files changed, 0 insertions, 74 deletions
diff --git a/stream/stream_cddb.c b/stream/stream_cddb.c index aab557ab86..339f8a75f1 100644 --- a/stream/stream_cddb.c +++ b/stream/stream_cddb.c @@ -66,8 +66,6 @@ #include "mpbswap.h" #endif -#include "osdep/osdep.h" - #include "cdd.h" #include "mpcommon.h" #include "stream.h" @@ -126,78 +124,6 @@ static int read_toc(const char *dev) } CloseHandle(drive); -#elif defined(__OS2__) - UCHAR auchParamDisk[4] = {'C', 'D', '0', '1'}; - - struct { - BYTE bFirstTrack; - BYTE bLastTrack; - BYTE bLeadOutF; - BYTE bLeadOutS; - BYTE bLeadOutM; - BYTE bLeadOutReserved; - } __attribute__((packed)) sDataDisk; - - struct { - UCHAR auchSign[4]; - BYTE bTrack; - } __attribute__((packed)) sParamTrack = {{'C', 'D', '0', '1'},}; - - struct { - BYTE bStartF; - BYTE bStartS; - BYTE bStartM; - BYTE bStartReserved; - BYTE bControlInfo; - } __attribute__((packed)) sDataTrack; - - HFILE hcd; - ULONG ulAction; - ULONG ulParamLen; - ULONG ulDataLen; - ULONG rc; - - rc = DosOpen(dev, &hcd, &ulAction, 0, FILE_NORMAL, - OPEN_ACTION_OPEN_IF_EXISTS | OPEN_ACTION_FAIL_IF_NEW, - OPEN_ACCESS_READONLY | OPEN_SHARE_DENYNONE | OPEN_FLAGS_DASD, - NULL); - if (rc) { - mp_tmsg(MSGT_OPEN, MSGL_ERR, "Failed to read TOC.\n"); - return -1; - } - - rc = DosDevIOCtl(hcd, IOCTL_CDROMAUDIO, CDROMAUDIO_GETAUDIODISK, - auchParamDisk, sizeof(auchParamDisk), &ulParamLen, - &sDataDisk, sizeof(sDataDisk), &ulDataLen); - if (!rc) { - first = sDataDisk.bFirstTrack - 1; - last = sDataDisk.bLastTrack; - for (i = first; i <= last; i++) { - if (i == last) { - sDataTrack.bStartM = sDataDisk.bLeadOutM; - sDataTrack.bStartS = sDataDisk.bLeadOutS; - sDataTrack.bStartF = sDataDisk.bLeadOutF; - } else { - sParamTrack.bTrack = i + 1; - rc = DosDevIOCtl(hcd, IOCTL_CDROMAUDIO, CDROMAUDIO_GETAUDIOTRACK, - &sParamTrack, sizeof(sParamTrack), &ulParamLen, - &sDataTrack, sizeof(sDataTrack), &ulDataLen); - if (rc) - break; - } - - cdtoc[i].min = sDataTrack.bStartM; - cdtoc[i].sec = sDataTrack.bStartS; - cdtoc[i].frame = sDataTrack.bStartF; - } - } - - DosClose(hcd); - - if (rc) { - mp_tmsg(MSGT_OPEN, MSGL_ERR, "Failed to read TOC.\n"); - return -1; - } #else int drive; drive = open(dev, O_RDONLY | O_NONBLOCK); |