From 0234042d9aa8a7404f3af044b9b20595ebd68ad3 Mon Sep 17 00:00:00 2001 From: "R. Bernstein" Date: Sat, 6 Feb 2010 07:54:46 -0500 Subject: [PATCH] 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. --- NEWS | 2 +- include/cdio/dvd.h | 25 +++++++++++++++---------- lib/driver/disc.c | 20 ++++++++++---------- 3 files changed, 26 insertions(+), 21 deletions(-) diff --git a/NEWS b/NEWS index a2c146ce..0af31957 100644 --- a/NEWS +++ b/NEWS @@ -10,7 +10,7 @@ version 0.83 (git) - Tolerance for OS's without timezone in their struct tm (e.g. Solaris) added iso9660_set_{d,l}time_with_timezone - Add mmc_get_disk_erasable -- Update MMC Feature Profile list +- Update MMC Feature Profile list, DVD Book types version 0.82 2009-10-27 diff --git a/include/cdio/dvd.h b/include/cdio/dvd.h index 8be8317b..4f258beb 100644 --- a/include/cdio/dvd.h +++ b/include/cdio/dvd.h @@ -1,7 +1,5 @@ /* - $Id: dvd.h,v 1.5 2008/03/25 15:59:09 karl Exp $ - - Copyright (C) 2004 Rocky Bernstein + Copyright (C) 2004, 2010 Rocky Bernstein Modeled after GNU/Linux definitions in linux/cdrom.h 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_MANUFACT 0x04 -/*! Media definitions for "Book Type" */ -#define CDIO_DVD_BOOK_DVD_ROM 0 -#define CDIO_DVD_BOOK_DVD_RAM 1 -#define CDIO_DVD_BOOK_DVD_R 2 /**< DVD-R */ -#define CDIO_DVD_BOOK_DVD_RW 3 /**< DVD-RW */ -#define CDIO_DVD_BOOK_DVD_PR 8 /**< DVD+R */ -#define CDIO_DVD_BOOK_DVD_PRW 9 /**< DVD+RW */ +/** + Media definitions for "Book Type". From MMC-5 Table 400, page 419. +*/ +#define CDIO_DVD_BOOK_DVD_ROM 0x0 /**< DVD-ROM */ +#define CDIO_DVD_BOOK_DVD_RAM 0x1 /**< DVD-RAM */ +#define CDIO_DVD_BOOK_DVD_R 0x2 /**< DVD-R */ +#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 { uint8_t book_version : 4; diff --git a/lib/driver/disc.c b/lib/driver/disc.c index 759d6590..038a1291 100644 --- a/lib/driver/disc.c +++ b/lib/driver/disc.c @@ -106,15 +106,15 @@ bool cdio_is_discmode_dvd(discmode_t discmode) { switch (discmode) { - case CDIO_DISC_MODE_DVD_ROM: - case CDIO_DISC_MODE_DVD_RAM: - case CDIO_DISC_MODE_DVD_R: - case CDIO_DISC_MODE_DVD_RW: - case CDIO_DISC_MODE_DVD_PR: - case CDIO_DISC_MODE_DVD_PRW: - case CDIO_DISC_MODE_DVD_OTHER: - return true; - default: - return false; + case CDIO_DISC_MODE_DVD_ROM: + case CDIO_DISC_MODE_DVD_RAM: + case CDIO_DISC_MODE_DVD_R: + case CDIO_DISC_MODE_DVD_RW: + case CDIO_DISC_MODE_DVD_PR: + case CDIO_DISC_MODE_DVD_PRW: + case CDIO_DISC_MODE_DVD_OTHER: + return true; + default: + return false; } }