dvd.h: Update DVD book types

disc.c: Add CDIO_DISC_MODE_DVD_OTHER

Thanks to Frank Endes and Thomas Schmitt for observing the problem and suggesting the fixes.
This commit is contained in:
R. Bernstein
2010-02-06 07:54:46 -05:00
parent 8f963ddd59
commit 0234042d9a
3 changed files with 26 additions and 21 deletions

2
NEWS
View File

@@ -10,7 +10,7 @@ version 0.83 (git)
- Tolerance for OS's without timezone in their struct tm (e.g. Solaris) - Tolerance for OS's without timezone in their struct tm (e.g. Solaris)
added iso9660_set_{d,l}time_with_timezone added iso9660_set_{d,l}time_with_timezone
- Add mmc_get_disk_erasable - Add mmc_get_disk_erasable
- Update MMC Feature Profile list - Update MMC Feature Profile list, DVD Book types
version 0.82 version 0.82
2009-10-27 2009-10-27

View File

@@ -1,7 +1,5 @@
/* /*
$Id: dvd.h,v 1.5 2008/03/25 15:59:09 karl Exp $ Copyright (C) 2004, 2010 Rocky Bernstein <rocky@gnu.org>
Copyright (C) 2004 Rocky Bernstein <rocky@gnu.org>
Modeled after GNU/Linux definitions in linux/cdrom.h Modeled after GNU/Linux definitions in linux/cdrom.h
This program is free software: you can redistribute it and/or modify This program is free software: you can redistribute it and/or modify
@@ -36,13 +34,20 @@
#define CDIO_DVD_STRUCT_BCA 0x03 #define CDIO_DVD_STRUCT_BCA 0x03
#define CDIO_DVD_STRUCT_MANUFACT 0x04 #define CDIO_DVD_STRUCT_MANUFACT 0x04
/*! Media definitions for "Book Type" */ /**
#define CDIO_DVD_BOOK_DVD_ROM 0 Media definitions for "Book Type". From MMC-5 Table 400, page 419.
#define CDIO_DVD_BOOK_DVD_RAM 1 */
#define CDIO_DVD_BOOK_DVD_R 2 /**< DVD-R */ #define CDIO_DVD_BOOK_DVD_ROM 0x0 /**< DVD-ROM */
#define CDIO_DVD_BOOK_DVD_RW 3 /**< DVD-RW */ #define CDIO_DVD_BOOK_DVD_RAM 0x1 /**< DVD-RAM */
#define CDIO_DVD_BOOK_DVD_PR 8 /**< DVD+R */ #define CDIO_DVD_BOOK_DVD_R 0x2 /**< DVD-R */
#define CDIO_DVD_BOOK_DVD_PRW 9 /**< DVD+RW */ #define CDIO_DVD_BOOK_DVD_RW 0x3 /**< DVD-RW */
#define CDIO_DVD_BOOK_HD_DVD_ROM 0x4 /**< HD DVD-ROM */
#define CDIO_DVD_BOOK_HD_DVD_RAM 0x5 /**< HD DVD-RAM */
#define CDIO_DVD_BOOK_HD_DVD_R 0x6 /**< HD DVD+RW */
#define CDIO_DVD_BOOK_DVD_PRW 0x9 /**< DVD+RW */
#define CDIO_DVD_BOOK_DVD_PR 0xa /**< DVD+R */
#define CDIO_DVD_BOOK_DVD_PRW_DL 0xd /**< DVD+RW DL */
#define CDIO_DVD_BOOK_DVD_PR_DL 0xe /**< DVD+R DL */
typedef struct cdio_dvd_layer { typedef struct cdio_dvd_layer {
uint8_t book_version : 4; uint8_t book_version : 4;

View File

@@ -106,15 +106,15 @@ bool
cdio_is_discmode_dvd(discmode_t discmode) cdio_is_discmode_dvd(discmode_t discmode)
{ {
switch (discmode) { switch (discmode) {
case CDIO_DISC_MODE_DVD_ROM: case CDIO_DISC_MODE_DVD_ROM:
case CDIO_DISC_MODE_DVD_RAM: case CDIO_DISC_MODE_DVD_RAM:
case CDIO_DISC_MODE_DVD_R: case CDIO_DISC_MODE_DVD_R:
case CDIO_DISC_MODE_DVD_RW: case CDIO_DISC_MODE_DVD_RW:
case CDIO_DISC_MODE_DVD_PR: case CDIO_DISC_MODE_DVD_PR:
case CDIO_DISC_MODE_DVD_PRW: case CDIO_DISC_MODE_DVD_PRW:
case CDIO_DISC_MODE_DVD_OTHER: case CDIO_DISC_MODE_DVD_OTHER:
return true; return true;
default: default:
return false; return false;
} }
} }