2
$Id: disc.c,v 1.5 2005/02/05 14:42:28 rocky Exp $
4
Copyright (C) 2003, 2004, 2005 Rocky Bernstein <rocky@panix.com>
5
Copyright (C) 2001 Herbert Valerio Riedel <hvr@gnu.org>
7
This program is free software; you can redistribute it and/or modify
8
it under the terms of the GNU General Public License as published by
9
the Free Software Foundation; either version 2 of the License, or
10
(at your option) any later version.
12
This program is distributed in the hope that it will be useful,
13
but WITHOUT ANY WARRANTY; without even the implied warranty of
14
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15
GNU General Public License for more details.
17
You should have received a copy of the GNU General Public License
18
along with this program; if not, write to the Free Software
19
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
27
#include <cdio/cdio.h>
28
#include "cdio_private.h"
30
/* Must match discmode enumeration */
31
const char *discmode2str[] = {
42
"Unknown/unclassified DVD",
44
"Error in getting information",
49
Get the size of the CD in logical block address (LBA) units.
51
@param p_cdio the CD object queried
52
@return the lsn. On error 0 or CDIO_INVALD_LSN.
55
cdio_get_disc_last_lsn(const CdIo_t *p_cdio)
57
if (!p_cdio) return CDIO_INVALID_LSN;
58
return p_cdio->op.get_disc_last_lsn (p_cdio->env);
62
Get medium associated with cd_obj.
65
cdio_get_discmode (CdIo_t *cd_obj)
67
if (!cd_obj) return CDIO_DISC_MODE_ERROR;
69
if (cd_obj->op.get_discmode) {
70
return cd_obj->op.get_discmode (cd_obj->env);
72
return CDIO_DISC_MODE_NO_INFO;
77
Return a string containing the name of the driver in use.
78
if CdIo is NULL (we haven't initialized a specific device driver),
82
cdio_get_mcn (const CdIo_t *p_cdio)
84
if (p_cdio->op.get_mcn) {
85
return p_cdio->op.get_mcn (p_cdio->env);
92
cdio_is_discmode_cdrom(discmode_t discmode)
95
case CDIO_DISC_MODE_CD_DA:
96
case CDIO_DISC_MODE_CD_DATA:
97
case CDIO_DISC_MODE_CD_XA:
98
case CDIO_DISC_MODE_CD_MIXED:
99
case CDIO_DISC_MODE_NO_INFO:
107
cdio_is_discmode_dvd(discmode_t discmode)
110
case CDIO_DISC_MODE_DVD_ROM:
111
case CDIO_DISC_MODE_DVD_RAM:
112
case CDIO_DISC_MODE_DVD_R:
113
case CDIO_DISC_MODE_DVD_RW:
114
case CDIO_DISC_MODE_DVD_PR:
115
case CDIO_DISC_MODE_DVD_PRW: