libcdio  2.1.0
About: GNU libcdio is a library for CD-ROM and CD image access.
  Fossies Dox: libcdio-2.1.0.tar.bz2  ("inofficial" and yet experimental doxygen-generated source code documentation)  

track.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2005, 2006, 2008, 2012 Rocky Bernstein <rocky@gnu.org>
3 
4  This program is free software: you can redistribute it and/or modify
5  it under the terms of the GNU General Public License as published by
6  the Free Software Foundation, either version 3 of the License, or
7  (at your option) any later version.
8 
9  This program is distributed in the hope that it will be useful,
10  but WITHOUT ANY WARRANTY; without even the implied warranty of
11  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  GNU General Public License for more details.
13 
14  You should have received a copy of the GNU General Public License
15  along with this program. If not, see <http://www.gnu.org/licenses/>.
16 */
17 
21 #ifndef CDIO_TRACK_H_
22 #define CDIO_TRACK_H_
23 
24 #ifdef __cplusplus
25 extern "C" {
26 #endif /* __cplusplus */
27 
29  extern const char *track_format2str[6];
30 
31  typedef enum {
41 
42  typedef enum {
47  } track_flag_t;
48 
50  typedef struct {
53  int channels;
56  } track_flags_t;
57 
70  extern enum cdio_track_enums {
71  CDIO_CDROM_LBA = 0x01,
72  CDIO_CDROM_MSF = 0x02,
82 
83 #define CDIO_CD_MIN_TRACK_NO 1
88  typedef enum {
97  } trackmode_t;
98 
105  track_t cdio_get_first_track_num(const CdIo_t *p_cdio);
106 
111  track_t cdio_get_last_track_num (const CdIo_t *p_cdio);
112 
113 
121  track_t cdio_get_track(const CdIo_t *p_cdio, lsn_t lsn);
122 
127  int cdio_get_track_channels(const CdIo_t *p_cdio, track_t i_track);
128 
133  track_t i_track);
134 
138  track_format_t cdio_get_track_format(const CdIo_t *p_cdio, track_t i_track);
139 
148  bool cdio_get_track_green(const CdIo_t *p_cdio, track_t i_track);
149 
154  lsn_t cdio_get_track_last_lsn(const CdIo_t *p_cdio, track_t i_track);
155 
168  lba_t cdio_get_track_lba(const CdIo_t *p_cdio, track_t i_track);
169 
182  lsn_t cdio_get_track_lsn(const CdIo_t *p_cdio, track_t i_track);
183 
193  lba_t cdio_get_track_pregap_lba(const CdIo_t *p_cdio, track_t i_track);
194 
204  lsn_t cdio_get_track_pregap_lsn(const CdIo_t *p_cdio, track_t i_track);
205 
218  char * cdio_get_track_isrc (const CdIo_t *p_cdio, track_t i_track);
219 
230  bool cdio_get_track_msf(const CdIo_t *p_cdio, track_t i_track,
231  /*out*/ msf_t *msf);
232 
237  track_t i_track);
238 
247  unsigned int cdio_get_track_sec_count(const CdIo_t *p_cdio, track_t i_track);
248 
249 #ifdef __cplusplus
250 }
251 #endif /* __cplusplus */
252 
253 #endif /* CDIO_TRACK_H_ */
CDIO_CDROM_CDI_TRACK
Definition: track.h:75
lba_t
int32_t lba_t
Definition: types.h:259
CDIO_TRACK_FLAG_TRUE
Definition: track.h:44
TRACK_FORMAT_XA
Definition: track.h:34
track_flags_t::preemphasis
track_flag_t preemphasis
Definition: track.h:51
track_flags_t::copy_permit
track_flag_t copy_permit
Definition: track.h:52
CDIO_TRACK_FLAG_FALSE
Definition: track.h:43
lsn_t
int32_t lsn_t
Definition: types.h:266
cdio_get_track_channels
int cdio_get_track_channels(const CdIo_t *p_cdio, track_t i_track)
Definition: track.c:90
cdio_track_enums
cdio_track_enums
Definition: track.h:70
track_t
uint8_t track_t
Definition: types.h:276
cdio_get_track_lba
lba_t cdio_get_track_lba(const CdIo_t *p_cdio, track_t i_track)
Definition: track.c:241
TRACK_FORMAT_PSX
Definition: track.h:36
_CdIo
Definition: cdio_private.h:472
cdio_get_last_track_num
track_t cdio_get_last_track_num(const CdIo_t *p_cdio)
Definition: track.c:67
track_flags_t::channels
int channels
Definition: track.h:53
cdio_get_track_pregap_lsn
lsn_t cdio_get_track_pregap_lsn(const CdIo_t *p_cdio, track_t i_track)
Definition: track.c:349
cdio_get_track_preemphasis
track_flag_t cdio_get_track_preemphasis(const CdIo_t *p_cdio, track_t i_track)
cdio_get_track_isrc
char * cdio_get_track_isrc(const CdIo_t *p_cdio, track_t i_track)
Definition: track.c:301
CDIO_CDROM_MSF
Definition: track.h:72
cdio_get_track_lsn
lsn_t cdio_get_track_lsn(const CdIo_t *p_cdio, track_t i_track)
Definition: track.c:267
CDIO_CDROM_LBA
Definition: track.h:71
track_format2str
const char * track_format2str[6]
Definition: track.c:34
cdio_get_track_sec_count
unsigned int cdio_get_track_sec_count(const CdIo_t *p_cdio, track_t i_track)
Definition: track.c:412
MODE2_FORM_MIX
Definition: track.h:95
track_format_t
track_format_t
Definition: track.h:31
TRACK_FORMAT_DATA
Definition: track.h:35
CDIO_CDROM_XA_TRACK
Definition: track.h:76
CDIO_CD_MAX_TRACKS
Definition: track.h:77
cdio_get_track
track_t cdio_get_track(const CdIo_t *p_cdio, lsn_t lsn)
Definition: track.c:175
MODE1_RAW
Definition: track.h:91
cdio_get_track_format
track_format_t cdio_get_track_format(const CdIo_t *p_cdio, track_t i_track)
Definition: track.c:127
msf_s
MSF (minute/second/frame) structure.
Definition: types.h:219
TRACK_FORMAT_CDI
Definition: track.h:33
cdio_get_track_green
bool cdio_get_track_green(const CdIo_t *p_cdio, track_t i_track)
Definition: track.c:220
CDIO_CDROM_DATA_TRACK
Definition: track.h:74
MODE1
Definition: track.h:90
CDIO_TRACK_FLAG_ERROR
Definition: track.h:45
CDIO_TRACK_FLAG_UNKNOWN
Definition: track.h:46
cdio_get_first_track_num
track_t cdio_get_first_track_num(const CdIo_t *p_cdio)
Definition: track.c:47
CDIO_INVALID_TRACK
Definition: track.h:79
track_flags_t
Structure containing attributes associated with a track.
Definition: track.h:50
MODE2_FORM2
Definition: track.h:94
cdio_get_track_msf
bool cdio_get_track_msf(const CdIo_t *p_cdio, track_t i_track, msf_t *msf)
Definition: track.c:376
cdio_get_track_pregap_lba
lba_t cdio_get_track_pregap_lba(const CdIo_t *p_cdio, track_t i_track)
Definition: track.c:329
cdio_get_track_last_lsn
lsn_t cdio_get_track_last_lsn(const CdIo_t *p_cdio, track_t i_track)
Definition: track.c:359
CDIO_CDROM_LEADOUT_TRACK
Definition: track.h:78
TRACK_FORMAT_AUDIO
Definition: track.h:32
AUDIO
Definition: track.h:89
cdio_get_track_copy_permit
track_flag_t cdio_get_track_copy_permit(const CdIo_t *p_cdio, track_t i_track)
Definition: track.c:114
track_flag_t
track_flag_t
Definition: track.h:42
TRACK_FORMAT_ERROR
Definition: track.h:39
trackmode_t
trackmode_t
Definition: track.h:88
MODE2_FORM1
Definition: track.h:93
MODE2
Definition: track.h:92
MODE2_RAW
Definition: track.h:96