track.h

Go to the documentation of this file.
00001 /* -*- c -*-
00002     $Id: track_8h-source.html,v 1.9 2006/10/27 11:16:42 rocky Exp $
00003 
00004     Copyright (C) 2005, 2006 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 
00027 #ifdef __cplusplus
00028 extern "C" {
00029 #endif /* __cplusplus */
00030 
00032   extern const char *track_format2str[6];
00033   
00034   typedef enum  {
00035     TRACK_FORMAT_AUDIO,   
00036     TRACK_FORMAT_CDI,     
00037     TRACK_FORMAT_XA,      
00038     TRACK_FORMAT_DATA,    
00039     TRACK_FORMAT_PSX,     
00042     TRACK_FORMAT_ERROR    
00043   } track_format_t;
00044 
00045   typedef enum {
00046     CDIO_TRACK_FLAG_FALSE, 
00047     CDIO_TRACK_FLAG_TRUE, 
00048     CDIO_TRACK_FLAG_ERROR, 
00049     CDIO_TRACK_FLAG_UNKNOWN
00050   } track_flag_t;
00051 
00053   typedef struct {
00054     track_flag_t preemphasis; 
00055     track_flag_t copy_permit; 
00056     int channels;             
00059   } track_flags_t;
00060     
00073   extern enum cdio_track_enums {
00074     CDIO_CDROM_LBA           = 0x01, 
00075     CDIO_CDROM_MSF           = 0x02, 
00077     CDIO_CDROM_DATA_TRACK    = 0x04, 
00078     CDIO_CDROM_CDI_TRACK     = 0x10,
00079     CDIO_CDROM_XA_TRACK      = 0x20,
00080     CDIO_CD_MAX_TRACKS       =   99, 
00081     CDIO_CDROM_LEADOUT_TRACK = 0xAA, 
00082     CDIO_INVALID_TRACK       = 0xFF, 
00084    } cdio_track_enums;
00085   
00086 #define CDIO_CD_MIN_TRACK_NO  1 
00091   typedef enum {
00092     AUDIO,                      
00093     MODE1,                      
00094     MODE1_RAW,                  
00095     MODE2,                      
00096     MODE2_FORM1,                
00097     MODE2_FORM2,                
00098     MODE2_FORM_MIX,             
00099     MODE2_RAW                   
00100   } trackmode_t;
00101   
00113   cdtext_t *cdio_get_cdtext (CdIo_t *p_cdio, track_t i_track);
00114 
00121   track_t cdio_get_first_track_num(const CdIo_t *p_cdio);
00122   
00127   track_t cdio_get_last_track_num (const CdIo_t *p_cdio);
00128   
00129 
00137   track_t cdio_get_track(const CdIo_t *p_cdio, lsn_t lsn);
00138 
00143   int cdio_get_track_channels(const CdIo_t *p_cdio, track_t i_track);
00144   
00148   track_flag_t cdio_get_track_copy_permit(const CdIo_t *p_cdio, 
00149                                           track_t i_track);
00150   
00154   track_format_t cdio_get_track_format(const CdIo_t *p_cdio, track_t i_track);
00155   
00164   bool cdio_get_track_green(const CdIo_t *p_cdio, track_t i_track);
00165     
00170   lsn_t cdio_get_track_last_lsn(const CdIo_t *p_cdio, track_t i_track);
00171 
00184   lba_t cdio_get_track_lba(const CdIo_t *p_cdio, track_t i_track);
00185   
00198   lsn_t cdio_get_track_lsn(const CdIo_t *p_cdio, track_t i_track);
00199   
00210   bool cdio_get_track_msf(const CdIo_t *p_cdio, track_t i_track, 
00211                           /*out*/ msf_t *msf);
00212   
00216   track_flag_t cdio_get_track_preemphasis(const CdIo_t *p_cdio,
00217                                           track_t i_track);
00218   
00227   unsigned int cdio_get_track_sec_count(const CdIo_t *p_cdio, track_t i_track);
00228 
00229 #ifdef __cplusplus
00230 }
00231 #endif /* __cplusplus */
00232 
00233 #endif /* __CDIO_TRACK_H__ */
00234 

Generated on Fri Oct 27 06:38:08 2006 for libcdio by  doxygen 1.4.6