Add type for holding MCN and ISRC. Add type for session
Replace magic constant 100 with CDIO_MAX_TRACK+1 where appropriate. _cdio_osx: save session number and presumably some tighter coding. nrg.c: make sure we add zero byte to end of MCN.
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/* -*- c -*-
|
||||
$Id: cdio.h,v 1.53 2004/06/19 10:39:30 rocky Exp $
|
||||
$Id: cdio.h,v 1.54 2004/06/27 15:29:21 rocky Exp $
|
||||
|
||||
Copyright (C) 2001 Herbert Valerio Riedel <hvr@gnu.org>
|
||||
Copyright (C) 2003, 2004 Rocky Bernstein <rocky@panix.com>
|
||||
@@ -232,7 +232,7 @@ extern "C" {
|
||||
string when done with it.
|
||||
|
||||
*/
|
||||
char *cdio_get_mcn (const CdIo *obj);
|
||||
char * cdio_get_mcn (const CdIo *obj);
|
||||
|
||||
/*!
|
||||
Get a string containing the name of the driver in use.
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
$Id: sector.h,v 1.13 2004/06/02 00:43:53 rocky Exp $
|
||||
$Id: sector.h,v 1.14 2004/06/27 15:29:21 rocky Exp $
|
||||
|
||||
Copyright (C) 2000 Herbert Valerio Riedel <hvr@gnu.org>
|
||||
Copyright (C) 2003, 2004 Rocky Bernstein <rocky@panix.com>
|
||||
@@ -119,16 +119,31 @@
|
||||
#define CDIO_CDROM_CDI_TRACK 0x10
|
||||
#define CDIO_CDROM_XA_TRACK 0x20
|
||||
|
||||
/*! The leadout track is always 0xAA, regardless of # of tracks on disc */
|
||||
/*! The leadout track is always 0xAA, regardless of # of tracks on
|
||||
disc, or what value may be used internally. For example although
|
||||
OS X uses a different value for the lead-out track internally than
|
||||
given below, programmers should use CDIO_CDROM_LEADOUT_TRACK and
|
||||
not worry about this.
|
||||
*/
|
||||
#define CDIO_CDROM_LEADOUT_TRACK 0xAA
|
||||
|
||||
#define M2F2_SECTOR_SIZE 2324
|
||||
#define M2SUB_SECTOR_SIZE 2332
|
||||
#define M2RAW_SECTOR_SIZE 2336
|
||||
|
||||
/*! Largest CD track number */
|
||||
#define CDIO_CD_MAX_TRACKS 99
|
||||
/*! Smallest CD track number */
|
||||
#define CDIO_CD_MIN_TRACK_NO 1
|
||||
|
||||
/*! Largest CD session number */
|
||||
#define CDIO_CD_MAX_SESSIONS 99
|
||||
/*! Smallest CD session number */
|
||||
#define CDIO_CD_MIN_SESSION_NO 1
|
||||
|
||||
/*! Largest LSN in a CD */
|
||||
#define CDIO_CD_MAX_LSN 450150
|
||||
/*! Smallest LSN in a CD */
|
||||
#define CDIO_CD_MIN_LSN -450150
|
||||
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
$Id: types.h,v 1.17 2004/05/26 06:29:15 rocky Exp $
|
||||
$Id: types.h,v 1.18 2004/06/27 15:29:21 rocky Exp $
|
||||
|
||||
Copyright (C) 2000 Herbert Valerio Riedel <hvr@gnu.org>
|
||||
Copyright (C) 2002, 2003, 2004 Rocky Bernstein <rocky@panix.com>
|
||||
@@ -218,7 +218,7 @@ extern "C" {
|
||||
*/
|
||||
typedef int32_t lsn_t;
|
||||
|
||||
/*! The type of an track number 0..99. */
|
||||
/*! The type of a track number 0..99. */
|
||||
typedef uint8_t track_t;
|
||||
|
||||
/*!
|
||||
@@ -226,6 +226,14 @@ extern "C" {
|
||||
*/
|
||||
#define CDIO_INVALID_TRACK 0xFF
|
||||
|
||||
/*! The type of a session number 0..99. */
|
||||
typedef uint8_t session_t;
|
||||
|
||||
/*!
|
||||
Constant for invalid session number
|
||||
*/
|
||||
#define CDIO_INVALID_SESSION 0xFF
|
||||
|
||||
/*!
|
||||
Constant for invalid LBA. It is 151 less than the most negative
|
||||
LBA -45150. This provide slack for the 150-frame offset in
|
||||
@@ -243,18 +251,36 @@ extern "C" {
|
||||
*/
|
||||
#define CDIO_MCN_SIZE 13
|
||||
|
||||
typedef int cdio_fs_anal_t;
|
||||
/*!
|
||||
Type to hold ASCII bytes in a media catalog number (MCN).
|
||||
We include an extra 0 byte so these can be used as C strings.
|
||||
*/
|
||||
typedef char cdio_mcn_t[CDIO_MCN_SIZE+1];
|
||||
|
||||
|
||||
/*! The type of an drive capability bit mask. See below for values*/
|
||||
/*!
|
||||
Number of ASCII bytes in International Standard Recording Codes (ISRC)
|
||||
*/
|
||||
#define CDIO_ISRC_SIZE 12
|
||||
|
||||
/*!
|
||||
Type to hold ASCII bytes in a media catalog number (MCN).
|
||||
We include an extra 0 byte so these can be used as C strings.
|
||||
*/
|
||||
typedef char cdio_isrc_t[CDIO_ISRC_SIZE+1];
|
||||
|
||||
typedef int cdio_fs_anal_t;
|
||||
|
||||
/*! The type of an drive capability bit mask. See below for values*/
|
||||
typedef uint32_t cdio_drive_cap_t;
|
||||
|
||||
/*!
|
||||
\brief Drive types returned by cdio_get_drive_cap()
|
||||
|
||||
Most are copied from the GNU/Linux the uniform CD-ROM driver header
|
||||
linux/cdrom.h> NOTE: Setting a bit here means the presence of
|
||||
a capability.
|
||||
*/
|
||||
/*!
|
||||
\brief Drive types returned by cdio_get_drive_cap()
|
||||
|
||||
Most are copied from the GNU/Linux the uniform CD-ROM driver header
|
||||
linux/cdrom.h> NOTE: Setting a bit here means the presence of
|
||||
a capability.
|
||||
*/
|
||||
|
||||
#define CDIO_DRIVE_CAP_CLOSE_TRAY 0x00001 /**< caddy systems can't
|
||||
close... */
|
||||
@@ -298,20 +324,20 @@ typedef int cdio_fs_anal_t;
|
||||
|
||||
#define CDIO_DRIVE_CAP_DVD_WRITER \
|
||||
(CDIO_DRIVE_CAP_DVD_R|CDIO_DRIVE_CAP_DVD_RAM)
|
||||
/**< Has some sort of DVD writer ability */
|
||||
/**< Has some sort of DVD writer ability */
|
||||
|
||||
/*!
|
||||
track flags
|
||||
Q Sub-channel Control Field (4.2.3.3)
|
||||
*/
|
||||
typedef enum {
|
||||
CDIO_TRACK_FLAG_NONE = 0x00, /**< no flags set */
|
||||
CDIO_TRACK_FLAG_PRE_EMPHASIS = 0x01, /**< audio track recorded with
|
||||
pre-emphasis */
|
||||
CDIO_TRACK_FLAG_COPY_PERMITTED = 0x02, /**< digital copy permitted */
|
||||
CDIO_TRACK_FLAG_DATA = 0x04, /**< data track */
|
||||
CDIO_TRACK_FLAG_FOUR_CHANNEL_AUDIO = 0x08, /**< 4 audio channels */
|
||||
CDIO_TRACK_FLAG_SCMS = 0x10 /**< SCMS (5.29.2.7) */
|
||||
/*!
|
||||
track flags
|
||||
Q Sub-channel Control Field (4.2.3.3)
|
||||
*/
|
||||
typedef enum {
|
||||
CDIO_TRACK_FLAG_NONE = 0x00, /**< no flags set */
|
||||
CDIO_TRACK_FLAG_PRE_EMPHASIS = 0x01, /**< audio track recorded with
|
||||
pre-emphasis */
|
||||
CDIO_TRACK_FLAG_COPY_PERMITTED = 0x02, /**< digital copy permitted */
|
||||
CDIO_TRACK_FLAG_DATA = 0x04, /**< data track */
|
||||
CDIO_TRACK_FLAG_FOUR_CHANNEL_AUDIO = 0x08, /**< 4 audio channels */
|
||||
CDIO_TRACK_FLAG_SCMS = 0x10 /**< SCMS (5.29.2.7) */
|
||||
} cdio_track_flag;
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
||||
Reference in New Issue
Block a user