cdio.{c,h}: moved various reading and device/driver routines out into the below

read.{c,h}: separate include for the reading routines.
disc.{c,h}: more moved here from corresponding cdio.
device.c: a place for device/driver related routines.
interface.c: break up line to make debugging easier.
This commit is contained in:
rocky
2005-01-09 16:07:46 +00:00
parent db486c617d
commit 6f7e9e182b
12 changed files with 1125 additions and 957 deletions

View File

@@ -1,5 +1,5 @@
/*
$Id: disc.c,v 1.2 2005/01/04 10:58:03 rocky Exp $
$Id: disc.c,v 1.3 2005/01/09 16:07:46 rocky Exp $
Copyright (C) 2003, 2004, 2005 Rocky Bernstein <rocky@panix.com>
Copyright (C) 2001 Herbert Valerio Riedel <hvr@gnu.org>
@@ -27,6 +27,24 @@
#include <cdio/cdio.h>
#include "cdio_private.h"
/* Must match discmode enumeration */
const char *discmode2str[] = {
"CD-DA",
"CD-DATA (Mode 1)",
"CD DATA (Mode 2)",
"CD-ROM Mixed",
"DVD-ROM",
"DVD-RAM",
"DVD-R",
"DVD-RW",
"DVD+R",
"DVD+RW",
"Unknown/unclassified DVD",
"No information",
"Error in getting information",
"CD-i"
};
unsigned int
cdio_get_disc_last_lsn(const CdIo *p_cdio)
{
@@ -63,3 +81,16 @@ cdio_get_mcn (const CdIo *p_cdio)
}
}
/*!
Get the size of the CD in logical block address (LBA) units.
@param p_cdio the CD object queried
@return the size or 0 if there was an error.
*/
uint32_t
cdio_stat_size (const CdIo_t *p_cdio)
{
if (!p_cdio) return 0;
return p_cdio->op.stat_size (p_cdio->env);
}