Add get_discmode to return what kind of CD or DVD we've got. This is
no where near finished. In fact I just started it on GNU/Linux. CD-TEXT on GNU/Linux: turn "warning" into "info". Reduce the chance of error (although we still don't get the CD-TEXT.)
This commit is contained in:
19
lib/cdio.c
19
lib/cdio.c
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
$Id: cdio.c,v 1.63 2004/07/18 05:12:03 rocky Exp $
|
||||
$Id: cdio.c,v 1.64 2004/07/21 10:19:21 rocky Exp $
|
||||
|
||||
Copyright (C) 2003, 2004 Rocky Bernstein <rocky@panix.com>
|
||||
Copyright (C) 2001 Herbert Valerio Riedel <hvr@gnu.org>
|
||||
@@ -39,7 +39,7 @@
|
||||
#include <cdio/logging.h>
|
||||
#include "cdio_private.h"
|
||||
|
||||
static const char _rcsid[] = "$Id: cdio.c,v 1.63 2004/07/18 05:12:03 rocky Exp $";
|
||||
static const char _rcsid[] = "$Id: cdio.c,v 1.64 2004/07/21 10:19:21 rocky Exp $";
|
||||
|
||||
|
||||
const char *track_format2str[6] =
|
||||
@@ -511,6 +511,21 @@ cdio_get_first_track_num (const CdIo *cdio)
|
||||
}
|
||||
}
|
||||
|
||||
/*!
|
||||
Get medium associated with cd_obj.
|
||||
*/
|
||||
discmode_t
|
||||
cdio_get_discmode (CdIo *cd_obj)
|
||||
{
|
||||
if (cd_obj == NULL) return CDIO_DISC_MODE_ERROR;
|
||||
|
||||
if (cd_obj->op.get_discmode) {
|
||||
return cd_obj->op.get_discmode (cd_obj->env);
|
||||
} else {
|
||||
return CDIO_DISC_MODE_NO_INFO;
|
||||
}
|
||||
}
|
||||
|
||||
/*!
|
||||
Return a string containing the name of the driver in use.
|
||||
if CdIo is NULL (we haven't initialized a specific device driver),
|
||||
|
||||
Reference in New Issue
Block a user