Main Page | Data Structures | Directories | File List | Data Fields | Globals

track.h

Go to the documentation of this file.
00001 /* -*- c -*-
00002     $Id: track.h,v 1.8 2005/02/25 09:47:10 rocky Exp $
00003 
00004     Copyright (C) 2005 Rocky Bernstein <rocky@panix.com>
00005 
00006     This program is free software; you can redistribute it and/or modify
00007     it under the terms of the GNU General Public License as published by
00008     the Free Software Foundation; either version 2 of the License, or
00009     (at your option) any later version.
00010 
00011     This program is distributed in the hope that it will be useful,
00012     but WITHOUT ANY WARRANTY; without even the implied warranty of
00013     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00014     GNU General Public License for more details.
00015 
00016     You should have received a copy of the GNU General Public License
00017     along with this program; if not, write to the Free Software
00018     Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00019 */
00020 
00024 #ifndef __CDIO_TRACK_H__
00025 #define __CDIO_TRACK_H__
00026 
00033 #define CDIO_CDROM_LEADOUT_TRACK 0xAA
00034 
00036 #define CDIO_CD_MAX_TRACKS    99 
00037 
00038 #define CDIO_CD_MIN_TRACK_NO   1
00039 
00043 #define CDIO_INVALID_TRACK   0xFF
00044   
00045 #ifdef __cplusplus
00046 extern "C" {
00047 #endif /* __cplusplus */
00048 
00050   extern const char *track_format2str[6];
00051   
00052   typedef enum  {
00053     TRACK_FORMAT_AUDIO,   
00054     TRACK_FORMAT_CDI,     
00055     TRACK_FORMAT_XA,      
00056     TRACK_FORMAT_DATA,    
00057     TRACK_FORMAT_PSX,     
00060     TRACK_FORMAT_ERROR    
00061   } track_format_t;
00062 
00063   typedef enum {
00064     CDIO_TRACK_FLAG_FALSE, 
00065     CDIO_TRACK_FLAG_TRUE, 
00066     CDIO_TRACK_FLAG_ERROR, 
00067     CDIO_TRACK_FLAG_UNKNOWN
00068   } track_flag_t;
00069 
00071   typedef struct {
00072     track_flag_t preemphasis; 
00073     track_flag_t copy_permit; 
00074     int channels;             
00077   } track_flags_t;
00078     
00084   extern enum cdio_track_enums {
00085     CDIO_CDROM_LBA        = 0x01, 
00086     CDIO_CDROM_MSF        = 0x02, 
00088     CDIO_CDROM_DATA_TRACK = 0x04, 
00089     CDIO_CDROM_CDI_TRACK  = 0x10,
00090     CDIO_CDROM_XA_TRACK   = 0x20
00091    } cdio_track_enums;
00092   
00096   typedef enum {
00097     AUDIO,                      
00098     MODE1,                      
00099     MODE1_RAW,                  
00100     MODE2,                      
00101     MODE2_FORM1,                
00102     MODE2_FORM2,                
00103     MODE2_FORM_MIX,             
00104     MODE2_RAW                   
00105   } trackmode_t;
00106   
00108 #define CDIO_CDROM_LBA 0x01 
00109 #define CDIO_CDROM_MSF 0x02 
00113 #define CDIO_CDROM_DATA_TRACK   0x04
00114 #define CDIO_CDROM_CDI_TRACK    0x10
00115 #define CDIO_CDROM_XA_TRACK     0x20
00116       
00128   cdtext_t *cdio_get_cdtext (CdIo_t *p_cdio, track_t i_track);
00129 
00136   track_t cdio_get_first_track_num(const CdIo_t *p_cdio);
00137   
00142   track_t cdio_get_last_track_num (const CdIo_t *p_cdio);
00143   
00144 
00152   track_t cdio_get_track(const CdIo_t *p_cdio, lsn_t lsn);
00153 
00158   int cdio_get_track_channels(const CdIo_t *p_cdio, track_t i_track);
00159   
00163   track_flag_t cdio_get_track_copy_permit(const CdIo_t *p_cdio, 
00164                                           track_t i_track);
00165   
00169   track_format_t cdio_get_track_format(const CdIo_t *p_cdio, track_t i_track);
00170   
00179   bool cdio_get_track_green(const CdIo_t *p_cdio, track_t i_track);
00180     
00185   lsn_t cdio_get_track_last_lsn(const CdIo_t *p_cdio, track_t i_track);
00186 
00199   lba_t cdio_get_track_lba(const CdIo_t *p_cdio, track_t i_track);
00200   
00213   lsn_t cdio_get_track_lsn(const CdIo_t *p_cdio, track_t i_track);
00214   
00225   bool cdio_get_track_msf(const CdIo_t *p_cdio, track_t i_track, 
00226                           /*out*/ msf_t *msf);
00227   
00231   track_flag_t cdio_get_track_preemphasis(const CdIo_t *p_cdio,
00232                                           track_t i_track);
00233   
00242   unsigned int cdio_get_track_sec_count(const CdIo_t *p_cdio, track_t i_track);
00243 
00244 #ifdef __cplusplus
00245 }
00246 #endif /* __cplusplus */
00247 
00248 #endif /* __CDIO_TRACK_H__ */
00249 

Generated on Mon Sep 26 07:52:33 2005 for libcdio by  doxygen 1.4.4