Regularize MMC commands more. Add ALLOW_PREVENT_MEDIUM.
Start CDTEXT. _cdio_linux.c: better at reporting errors.
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
# $Id: Makefile.am,v 1.9 2004/05/10 03:28:51 rocky Exp $
|
||||
# $Id: Makefile.am,v 1.10 2004/07/08 01:27:58 rocky Exp $
|
||||
#
|
||||
# Copyright (C) 2003 Rocky Bernstein <rocky@panix.com>
|
||||
# Copyright (C) 2003, 2004 Rocky Bernstein <rocky@panix.com>
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
@@ -24,6 +24,7 @@
|
||||
libcdioincludedir=$(includedir)/cdio
|
||||
libcdioinclude_HEADERS = \
|
||||
cdio.h \
|
||||
cdtext.h \
|
||||
cd_types.h \
|
||||
iso9660.h \
|
||||
logging.h \
|
||||
|
||||
87
include/cdio/cdtext.h
Normal file
87
include/cdio/cdtext.h
Normal file
@@ -0,0 +1,87 @@
|
||||
/*
|
||||
$Id: cdtext.h,v 1.1 2004/07/08 01:27:58 rocky Exp $
|
||||
|
||||
Copyright (C) 2004 Rocky Bernstein <rocky@panix.com>
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
/*!
|
||||
* \file cdtext.h
|
||||
* \brief Header CDTEXT information
|
||||
*/
|
||||
|
||||
|
||||
#ifndef __CDIO_CDTEXT_H__
|
||||
#define __CDIO_CDTEXT_H__
|
||||
|
||||
#include <cdio/cdio.h>
|
||||
|
||||
#define CDIO_CDTEXT_MAX_PACK_DATA 255
|
||||
#define CDIO_CDTEXT_MAX_TEXT_DATA 12
|
||||
|
||||
#define CDIO_CDTEXT_TITLE 0x80
|
||||
#define CDIO_CDTEXT_PERFORMER 0x81
|
||||
#define CDIO_CDTEXT_SONGWRITER 0x82
|
||||
#define CDIO_CDTEXT_COMPOSER 0x83
|
||||
#define CDIO_CDTEXT_ARRANGER 0x84
|
||||
#define CDIO_CDTEXT_MESSAGE 0x85
|
||||
#define CDIO_CDTEXT_DISCID 0x86
|
||||
#define CDIO_CDTEXT_GENRE 0x87
|
||||
|
||||
PRAGMA_BEGIN_PACKED
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif /* __cplusplus */
|
||||
|
||||
struct CDText_data
|
||||
{
|
||||
uint8_t type;
|
||||
track_t i_track;
|
||||
uint8_t seq;
|
||||
uint8_t characterPosition:4; /* character position */
|
||||
uint8_t block:3; /* block number 0..7 */
|
||||
uint8_t bDBC:1; /* double byte character */
|
||||
char text[12];
|
||||
uint8_t crc[2];
|
||||
} GNUC_PACKED;
|
||||
|
||||
PRAGMA_END_PACKED
|
||||
|
||||
typedef struct CDText_data CDText_data_t;
|
||||
|
||||
/**
|
||||
* Query the CDTEXT information
|
||||
*
|
||||
* @param cd The CD object to extract CDTEXT data from
|
||||
*
|
||||
* @return An allocated structure containing CDTEXT information found.
|
||||
* NULL is returned if there was a problem.
|
||||
*/
|
||||
CDText_data_t *cdio_cdtext_query(const CdIo *cd);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif /* __cplusplus */
|
||||
|
||||
#endif /* __CDIO_ISO9660_H__ */
|
||||
|
||||
/*
|
||||
* Local variables:
|
||||
* c-file-style: "gnu"
|
||||
* tab-width: 8
|
||||
* indent-tabs-mode: nil
|
||||
* End:
|
||||
*/
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
$Id: scsi_mmc.h,v 1.5 2004/06/27 22:00:08 rocky Exp $
|
||||
$Id: scsi_mmc.h,v 1.6 2004/07/08 01:27:59 rocky Exp $
|
||||
|
||||
Copyright (C) 2003, 2004 Rocky Bernstein <rocky@panix.com>
|
||||
|
||||
@@ -36,17 +36,18 @@
|
||||
|
||||
/*! The generic packet command opcodes for CD/DVD Logical Units. */
|
||||
|
||||
#define CDIO_MMC_MODE_SENSE 0x1a
|
||||
#define CDIO_MMC_START_STOP 0x1b
|
||||
#define CDIO_MMC_GPCMD_READ_10 0x28
|
||||
#define CDIO_MMC_GPCMD_READ_SUBCHANNEL 0x42
|
||||
#define CDIO_MMC_READ_TOC 0x43
|
||||
#define CDIO_MMC_MODE_SELECT 0x55
|
||||
#define CDIO_MMC_MODE_SELECT_6 0x15
|
||||
#define CDIO_MMC_MODE_SENSE_10 0x5a
|
||||
#define CDIO_MMC_GPCMD_READ_12 0xa8
|
||||
#define CDIO_MMC_GPCMD_READ_CD 0xbe
|
||||
#define CDIO_MMC_GPCMD_READ_MSF 0xb9
|
||||
#define CDIO_MMC_GPCMD_MODE_SENSE 0x1a
|
||||
#define CDIO_MMC_GPCMD_START_STOP 0x1b
|
||||
#define CDIO_MMC_GPCMD_READ_10 0x28
|
||||
#define CDIO_MMC_GPCMD_READ_SUBCHANNEL 0x42
|
||||
#define CDIO_MMC_GPCMD_READ_TOC 0x43
|
||||
#define CDIO_MMC_GPCMD_MODE_SELECT 0x55
|
||||
#define CDIO_MMC_GPCMD_MODE_SELECT_6 0x15
|
||||
#define CDIO_MMC_GPCMD_MODE_SENSE_10 0x5a
|
||||
#define CDIO_MMC_GPCMD_READ_12 0xa8
|
||||
#define CDIO_MMC_GPCMD_READ_CD 0xbe
|
||||
#define CDIO_MMC_GPCMD_READ_MSF 0xb9
|
||||
#define CDIO_MMC_GPCMD_ALLOW_MEDIUM_REMOVAL 0x1e
|
||||
|
||||
|
||||
/*! Page codes for MODE SENSE and MODE SET. */
|
||||
|
||||
Reference in New Issue
Block a user