libcdio  2.1.0
About: GNU libcdio is a library for CD-ROM and CD image access.
  Fossies Dox: libcdio-2.1.0.tar.bz2  ("inofficial" and yet experimental doxygen-generated source code documentation)  

disc.h File Reference

The top-level header for disc-related libcdio calls. More...

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define cdio_stat_size   cdio_get_disc_last_lsn
 

Enumerations

enum  discmode_t {
  CDIO_DISC_MODE_CD_DA, CDIO_DISC_MODE_CD_DATA, CDIO_DISC_MODE_CD_XA, CDIO_DISC_MODE_CD_MIXED,
  CDIO_DISC_MODE_DVD_ROM, CDIO_DISC_MODE_DVD_RAM, CDIO_DISC_MODE_DVD_R, CDIO_DISC_MODE_DVD_RW,
  CDIO_DISC_MODE_HD_DVD_ROM, CDIO_DISC_MODE_HD_DVD_RAM, CDIO_DISC_MODE_HD_DVD_R, CDIO_DISC_MODE_DVD_PR,
  CDIO_DISC_MODE_DVD_PRW, CDIO_DISC_MODE_DVD_PRW_DL, CDIO_DISC_MODE_DVD_PR_DL, CDIO_DISC_MODE_DVD_OTHER,
  CDIO_DISC_MODE_NO_INFO, CDIO_DISC_MODE_ERROR, CDIO_DISC_MODE_CD_I
}
 

Functions

uint8_t * cdio_get_cdtext_raw (CdIo_t *p_cdio)
 
cdtext_tcdio_get_cdtext (CdIo_t *p_cdio)
 
discmode_t cdio_get_discmode (CdIo_t *p_cdio)
 
lsn_t cdio_get_disc_last_lsn (const CdIo_t *p_cdio)
 
uint8_t cdio_get_joliet_level (const CdIo_t *p_cdio)
 
char * cdio_get_mcn (const CdIo_t *p_cdio)
 
track_t cdio_get_num_tracks (const CdIo_t *p_cdio)
 
bool cdio_is_discmode_cdrom (discmode_t discmode)
 
bool cdio_is_discmode_dvd (discmode_t discmode)
 

Variables

const char * discmode2str []
 

Detailed Description

The top-level header for disc-related libcdio calls.

Definition in file disc.h.

Macro Definition Documentation

◆ cdio_stat_size

#define cdio_stat_size   cdio_get_disc_last_lsn

cdio_stat_size is deprecated.

See also
cdio_get_disc_last_lsn

Definition at line 139 of file disc.h.

Enumeration Type Documentation

◆ discmode_t

enum discmode_t

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.

Enumerator
CDIO_DISC_MODE_CD_DA 

CD-DA

CDIO_DISC_MODE_CD_DATA 

CD-ROM form 1

CDIO_DISC_MODE_CD_XA 

CD-ROM XA form2

CDIO_DISC_MODE_CD_MIXED 

Some combo of above.

CDIO_DISC_MODE_DVD_ROM 

DVD ROM (e.g. movies)

CDIO_DISC_MODE_DVD_RAM 

DVD-RAM

CDIO_DISC_MODE_DVD_R 

DVD-R

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_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_NO_INFO 
CDIO_DISC_MODE_ERROR 
CDIO_DISC_MODE_CD_I 

CD-i.

Definition at line 37 of file disc.h.

Function Documentation

◆ cdio_get_cdtext()

cdtext_t* cdio_get_cdtext ( CdIo_t p_cdio)

Return a pointer to the cdtext_t object which is attached to a CdIo_t object. If no such cdtext_t is attached yet, then try to read CD-TEXT information and use it to create and initialise the cdtext_t object.

For usage of cdtext_t see include file <cdio/cdtext.h>.

Parameters
p_cdiothe CD object that may contain CD-Text information.
Returns
a pointer to the attached cdtext_t object or NULL if problems occur or if CD-Text information does not exist.

Referenced by get_cdtext_disc_info(), get_cdtext_track_info(), getCdtext(), and print_cdtext_info().

◆ cdio_get_cdtext_raw()

uint8_t* cdio_get_cdtext_raw ( CdIo_t p_cdio)

Read cdtext information for a cdtext_t object. About format and usage of these data see the documentation of call mmc_read_cdtext() in include file <cdio/mmc.h>.

Parameters
p_cdiothe CD object that may contain CD-Text information.
Returns
malloc'd pointer to raw CD-Text data as replied by the drive or NULL if problems occur or CD-Text information does not exist. A non-NULL return value must be freed with cdio_free() when done.

◆ cdio_get_disc_last_lsn()

lsn_t cdio_get_disc_last_lsn ( const CdIo_t p_cdio)

Get the lsn of the end of the CD

Returns
the lsn. On error 0 or CDIO_INVALD_LSN.

Get the size of the CD in logical block address (LBA) units.

Parameters
p_cdiothe CD object queried
Returns
the lsn. On error 0 or CDIO_INVALD_LSN.

Definition at line 102 of file disc.c.

References CDIO_INVALID_LSN, _CdIo::env, cdio_funcs_t::get_disc_last_lsn, and _CdIo::op.

Referenced by getDiscLastLsn().

◆ cdio_get_discmode()

discmode_t cdio_get_discmode ( CdIo_t cd_obj)

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 DVD's.

Get medium associated with cd_obj.

Definition at line 112 of file disc.c.

References CDIO_DISC_MODE_ERROR, CDIO_DISC_MODE_NO_INFO, _CdIo::env, cdio_funcs_t::get_discmode, and _CdIo::op.

Referenced by _fs_stat_root(), getDiscmode(), and main().

◆ cdio_get_joliet_level()

uint8_t cdio_get_joliet_level ( const CdIo_t p_cdio)

Return the Joliet level recognized for p_cdio.

Definition at line 141 of file track.c.

References _CdIo::env, and generic_img_private_t::u_joliet_level.

Referenced by getJolietLevel(), and print_iso9660_recurse().

◆ cdio_get_mcn()

char* cdio_get_mcn ( const CdIo_t p_cdio)

Get the media catalog number (MCN) from the CD.

Returns
the media catalog number or NULL if there is none or we don't have the ability to get it.

Note: The caller must free the returned string with cdio_free() when done with it.

Return a string containing the name of the driver in use. if CdIo is NULL (we haven't initialized a specific device driver), then return NULL.

Definition at line 129 of file disc.c.

References _CdIo::env, cdio_funcs_t::get_mcn, NULL, and _CdIo::op.

Referenced by getMcn(), and main().

◆ cdio_get_num_tracks()

track_t cdio_get_num_tracks ( const CdIo_t p_cdio)

Get the number of tracks on the CD.

Returns
the number of tracks, or CDIO_INVALID_TRACK if there is an error.

Return the number of tracks in the current medium. CDIO_INVALID_TRACK is returned on error.

Definition at line 156 of file track.c.

References CDIO_INVALID_TRACK, _CdIo::env, cdio_funcs_t::get_num_tracks, NULL, and _CdIo::op.

Referenced by cdio_get_last_track_num(), cdio_get_track_sec_count(), getNumTracks(), main(), and read_toc().

◆ cdio_is_discmode_cdrom()

bool cdio_is_discmode_cdrom ( discmode_t  discmode)

Return true if discmode is some sort of CD.

Definition at line 139 of file disc.c.

References CDIO_DISC_MODE_CD_DA, CDIO_DISC_MODE_CD_DATA, CDIO_DISC_MODE_CD_MIXED, CDIO_DISC_MODE_CD_XA, and CDIO_DISC_MODE_NO_INFO.

Referenced by isDiscmodeCdrom(), and main().

◆ cdio_is_discmode_dvd()

bool cdio_is_discmode_dvd ( discmode_t  discmode)

Return true if discmode is some sort of DVD.

Definition at line 154 of file disc.c.

References CDIO_DISC_MODE_DVD_OTHER, CDIO_DISC_MODE_DVD_PR, CDIO_DISC_MODE_DVD_PRW, CDIO_DISC_MODE_DVD_R, CDIO_DISC_MODE_DVD_RAM, CDIO_DISC_MODE_DVD_ROM, and CDIO_DISC_MODE_DVD_RW.

Referenced by isDiscmodeDvd(), and main().

Variable Documentation

◆ discmode2str

const char* discmode2str[]

Definition at line 34 of file disc.c.

Referenced by main().