Add CDIO_DISC_MODEs to correspond to updated DVD Book types.
This commit is contained in:
@@ -1,7 +1,7 @@
|
|||||||
/* -*- c -*-
|
/* -*- c -*-
|
||||||
$Id: disc.h,v 1.9 2008/03/25 15:59:09 karl Exp $
|
|
||||||
|
|
||||||
Copyright (C) 2004, 2005, 2006, 2008 Rocky Bernstein <rocky@gnu.org>
|
Copyright (C) 2004, 2005, 2006, 2008, 2010 Rocky Bernstein
|
||||||
|
<rocky@gnu.org>
|
||||||
|
|
||||||
This program is free software: you can redistribute it and/or modify
|
This program is free software: you can redistribute it and/or modify
|
||||||
it under the terms of the GNU General Public License as published by
|
it under the terms of the GNU General Public License as published by
|
||||||
@@ -17,8 +17,9 @@
|
|||||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/** \file disc.h
|
/**
|
||||||
* \brief The top-level header for disc-related libcdio calls.
|
\file disc.h
|
||||||
|
\brief The top-level header for disc-related libcdio calls.
|
||||||
*/
|
*/
|
||||||
#ifndef __CDIO_DISC_H__
|
#ifndef __CDIO_DISC_H__
|
||||||
#define __CDIO_DISC_H__
|
#define __CDIO_DISC_H__
|
||||||
@@ -27,9 +28,11 @@
|
|||||||
extern "C" {
|
extern "C" {
|
||||||
#endif /* __cplusplus */
|
#endif /* __cplusplus */
|
||||||
|
|
||||||
/*! disc modes. The first combined from MMC-3 5.29.2.8 (Send CUESHEET)
|
/**
|
||||||
and GNU/Linux /usr/include/linux/cdrom.h and we've added DVD.
|
disc modes. The first combined from MMC-5 6.33.3.13 (Send
|
||||||
*/
|
CUESHEET), "DVD Book" from MMC-5 Table 400, page 419. and
|
||||||
|
GNU/Linux /usr/include/linux/cdrom.h and we've added DVD.
|
||||||
|
*/
|
||||||
typedef enum {
|
typedef enum {
|
||||||
CDIO_DISC_MODE_CD_DA, /**< CD-DA */
|
CDIO_DISC_MODE_CD_DA, /**< CD-DA */
|
||||||
CDIO_DISC_MODE_CD_DATA, /**< CD-ROM form 1 */
|
CDIO_DISC_MODE_CD_DATA, /**< CD-ROM form 1 */
|
||||||
@@ -39,8 +42,13 @@ extern "C" {
|
|||||||
CDIO_DISC_MODE_DVD_RAM, /**< DVD-RAM */
|
CDIO_DISC_MODE_DVD_RAM, /**< DVD-RAM */
|
||||||
CDIO_DISC_MODE_DVD_R, /**< DVD-R */
|
CDIO_DISC_MODE_DVD_R, /**< DVD-R */
|
||||||
CDIO_DISC_MODE_DVD_RW, /**< DVD-RW */
|
CDIO_DISC_MODE_DVD_RW, /**< DVD-RW */
|
||||||
|
CDIO_DISC_MODE_HD_DVD_ROM, /**< HD DVD-ROM */
|
||||||
|
CDIO_DISC_MODE_HD_DVD_RAM, /**< HD DVD-RAM */
|
||||||
|
CDIO_DISC_MODE_HD_DVD_R, /**< HD DVD-R */
|
||||||
CDIO_DISC_MODE_DVD_PR, /**< DVD+R */
|
CDIO_DISC_MODE_DVD_PR, /**< DVD+R */
|
||||||
CDIO_DISC_MODE_DVD_PRW, /**< DVD+RW */
|
CDIO_DISC_MODE_DVD_PRW, /**< DVD+RW */
|
||||||
|
CDIO_DISC_MODE_DVD_PRW_DL, /**< DVD+RW DL */
|
||||||
|
CDIO_DISC_MODE_DVD_PR_DL, /**< DVD+R DL */
|
||||||
CDIO_DISC_MODE_DVD_OTHER, /**< Unknown/unclassified DVD type */
|
CDIO_DISC_MODE_DVD_OTHER, /**< Unknown/unclassified DVD type */
|
||||||
CDIO_DISC_MODE_NO_INFO,
|
CDIO_DISC_MODE_NO_INFO,
|
||||||
CDIO_DISC_MODE_ERROR,
|
CDIO_DISC_MODE_ERROR,
|
||||||
@@ -49,26 +57,26 @@ extern "C" {
|
|||||||
|
|
||||||
extern const char *discmode2str[];
|
extern const char *discmode2str[];
|
||||||
|
|
||||||
/*!
|
/**
|
||||||
Get disc mode - the kind of CD (CD-DA, CD-ROM mode 1, CD-MIXED, etc.
|
Get disc mode - the kind of CD (CD-DA, CD-ROM mode 1, CD-MIXED, etc.
|
||||||
that we've got. The notion of "CD" is extended a little to include
|
that we've got. The notion of "CD" is extended a little to include
|
||||||
DVD's.
|
DVD's.
|
||||||
*/
|
*/
|
||||||
discmode_t cdio_get_discmode (CdIo_t *p_cdio);
|
discmode_t cdio_get_discmode (CdIo_t *p_cdio);
|
||||||
|
|
||||||
/*!
|
/**
|
||||||
Get the lsn of the end of the CD
|
Get the lsn of the end of the CD
|
||||||
|
|
||||||
@return the lsn. On error 0 or CDIO_INVALD_LSN.
|
@return the lsn. On error 0 or CDIO_INVALD_LSN.
|
||||||
*/
|
*/
|
||||||
lsn_t cdio_get_disc_last_lsn(const CdIo_t *p_cdio);
|
lsn_t cdio_get_disc_last_lsn(const CdIo_t *p_cdio);
|
||||||
|
|
||||||
/*!
|
/**
|
||||||
Return the Joliet level recognized for p_cdio.
|
Return the Joliet level recognized for p_cdio.
|
||||||
*/
|
*/
|
||||||
uint8_t cdio_get_joliet_level(const CdIo_t *p_cdio);
|
uint8_t cdio_get_joliet_level(const CdIo_t *p_cdio);
|
||||||
|
|
||||||
/*!
|
/**
|
||||||
Get the media catalog number (MCN) from the CD.
|
Get the media catalog number (MCN) from the CD.
|
||||||
|
|
||||||
@return the media catalog number or NULL if there is none or we
|
@return the media catalog number or NULL if there is none or we
|
||||||
@@ -80,7 +88,7 @@ extern "C" {
|
|||||||
*/
|
*/
|
||||||
char * cdio_get_mcn (const CdIo_t *p_cdio);
|
char * cdio_get_mcn (const CdIo_t *p_cdio);
|
||||||
|
|
||||||
/*!
|
/**
|
||||||
Get the number of tracks on the CD.
|
Get the number of tracks on the CD.
|
||||||
|
|
||||||
@return the number of tracks, or CDIO_INVALID_TRACK if there is
|
@return the number of tracks, or CDIO_INVALID_TRACK if there is
|
||||||
@@ -88,17 +96,19 @@ extern "C" {
|
|||||||
*/
|
*/
|
||||||
track_t cdio_get_num_tracks (const CdIo_t *p_cdio);
|
track_t cdio_get_num_tracks (const CdIo_t *p_cdio);
|
||||||
|
|
||||||
/*!
|
/**
|
||||||
Return true if discmode is some sort of CD.
|
Return true if discmode is some sort of CD.
|
||||||
*/
|
*/
|
||||||
bool cdio_is_discmode_cdrom (discmode_t discmode);
|
bool cdio_is_discmode_cdrom (discmode_t discmode);
|
||||||
|
|
||||||
/*!
|
/**
|
||||||
Return true if discmode is some sort of DVD.
|
Return true if discmode is some sort of DVD.
|
||||||
*/
|
*/
|
||||||
bool cdio_is_discmode_dvd (discmode_t discmode);
|
bool cdio_is_discmode_dvd (discmode_t discmode);
|
||||||
|
|
||||||
/*! cdio_stat_size is deprecated. @see cdio_get_disc_last_lsn */
|
/**
|
||||||
|
cdio_stat_size is deprecated. @see cdio_get_disc_last_lsn
|
||||||
|
*/
|
||||||
#define cdio_stat_size cdio_get_disc_last_lsn
|
#define cdio_stat_size cdio_get_disc_last_lsn
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
|
|||||||
@@ -19,6 +19,12 @@
|
|||||||
/**
|
/**
|
||||||
\file dvd.h
|
\file dvd.h
|
||||||
\brief Definitions for DVD access.
|
\brief Definitions for DVD access.
|
||||||
|
|
||||||
|
The documents we make use of are described Multi-Media Commands
|
||||||
|
(MMC). This document generally has a numeric level number
|
||||||
|
appended. For example MMC-5 refers to ``Multi-Media Commands - 5'
|
||||||
|
which is the current version in 2010.
|
||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef __CDIO_DVD_H__
|
#ifndef __CDIO_DVD_H__
|
||||||
@@ -45,7 +51,7 @@
|
|||||||
#define CDIO_DVD_BOOK_DVD_RW 0x3 /**< 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_ROM 0x4 /**< HD DVD-ROM */
|
||||||
#define CDIO_DVD_BOOK_HD_DVD_RAM 0x5 /**< HD DVD-RAM */
|
#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_HD_DVD_R 0x6 /**< HD DVD-R */
|
||||||
#define CDIO_DVD_BOOK_DVD_PRW 0x9 /**< 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_PR 0xa /**< DVD+R */
|
||||||
#define CDIO_DVD_BOOK_DVD_PRW_DL 0xd /**< DVD+RW DL */
|
#define CDIO_DVD_BOOK_DVD_PRW_DL 0xd /**< DVD+RW DL */
|
||||||
|
|||||||
@@ -301,12 +301,17 @@ get_discmode_generic (void *p_user_data )
|
|||||||
dvd.physical.layer_num = 0;
|
dvd.physical.layer_num = 0;
|
||||||
if (0 == mmc_get_dvd_struct_physical (p_env->cdio, &dvd)) {
|
if (0 == mmc_get_dvd_struct_physical (p_env->cdio, &dvd)) {
|
||||||
switch(dvd.physical.layer[0].book_type) {
|
switch(dvd.physical.layer[0].book_type) {
|
||||||
case CDIO_DVD_BOOK_DVD_ROM: return CDIO_DISC_MODE_DVD_ROM;
|
case CDIO_DVD_BOOK_DVD_ROM: return CDIO_DISC_MODE_DVD_ROM;
|
||||||
case CDIO_DVD_BOOK_DVD_RAM: return CDIO_DISC_MODE_DVD_RAM;
|
case CDIO_DVD_BOOK_DVD_RAM: return CDIO_DISC_MODE_DVD_RAM;
|
||||||
case CDIO_DVD_BOOK_DVD_R: return CDIO_DISC_MODE_DVD_R;
|
case CDIO_DVD_BOOK_DVD_R: return CDIO_DISC_MODE_DVD_R;
|
||||||
case CDIO_DVD_BOOK_DVD_RW: return CDIO_DISC_MODE_DVD_RW;
|
case CDIO_DVD_BOOK_DVD_RW: return CDIO_DISC_MODE_DVD_RW;
|
||||||
case CDIO_DVD_BOOK_DVD_PR: return CDIO_DISC_MODE_DVD_PR;
|
case CDIO_DVD_BOOK_HD_DVD_ROM: return CDIO_DISC_MODE_HD_DVD_ROM;
|
||||||
case CDIO_DVD_BOOK_DVD_PRW: return CDIO_DISC_MODE_DVD_PRW;
|
case CDIO_DVD_BOOK_HD_DVD_RAM: return CDIO_DISC_MODE_HD_DVD_RAM;
|
||||||
|
case CDIO_DVD_BOOK_HD_DVD_R: return CDIO_DISC_MODE_HD_DVD_R;
|
||||||
|
case CDIO_DVD_BOOK_DVD_PR: return CDIO_DISC_MODE_DVD_PR;
|
||||||
|
case CDIO_DVD_BOOK_DVD_PRW: return CDIO_DISC_MODE_DVD_PRW;
|
||||||
|
case CDIO_DVD_BOOK_DVD_PRW_DL: return CDIO_DISC_MODE_DVD_PRW_DL;
|
||||||
|
case CDIO_DVD_BOOK_DVD_PR_DL: return CDIO_DISC_MODE_DVD_PR_DL;
|
||||||
default: return CDIO_DISC_MODE_DVD_OTHER;
|
default: return CDIO_DISC_MODE_DVD_OTHER;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user