libcdio  2.1.0
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 {
51  track_flag_t preemphasis;
52  track_flag_t copy_permit;
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_ */
Definition: track.h:95
Definition: track.h:93
Definition: track.h:92
int channels
Definition: track.h:53
track_flag_t cdio_get_track_preemphasis(const CdIo_t *p_cdio, track_t i_track)
Definition: track.h:96
Definition: track.h:78
int32_t lsn_t
Definition: types.h:266
const char * track_format2str[6]
Definition: track.h:46
trackmode_t
Definition: track.h:88
Definition: track.h:72
uint8_t track_t
Definition: types.h:276
Definition: track.h:43
typedefPRAGMA_END_PACKED struct msf_s msf_t
Definition: types.h:224
Definition: track.h:94
Definition: track.h:71
int32_t lba_t
Definition: types.h:259
Definition: track.h:33
track_t cdio_get_track(const CdIo_t *p_cdio, lsn_t lsn)
lba_t cdio_get_track_lba(const CdIo_t *p_cdio, track_t i_track)
lba_t cdio_get_track_pregap_lba(const CdIo_t *p_cdio, track_t i_track)
lsn_t cdio_get_track_last_lsn(const CdIo_t *p_cdio, track_t i_track)
int cdio_get_track_channels(const CdIo_t *p_cdio, track_t i_track)
track_flag_t
Definition: track.h:42
Definition: track.h:45
track_flag_t preemphasis
Definition: track.h:51
Definition: track.h:44
Definition: track.h:91
Definition: track.h:34
Definition: track.h:75
track_t cdio_get_last_track_num(const CdIo_t *p_cdio)
track_flag_t cdio_get_track_copy_permit(const CdIo_t *p_cdio, track_t i_track)
cdio_track_enums
Definition: track.h:70
lsn_t cdio_get_track_pregap_lsn(const CdIo_t *p_cdio, track_t i_track)
Definition: track.h:74
struct _CdIo CdIo_t
Definition: cdio.h:47
track_format_t
Definition: track.h:31
lsn_t cdio_get_track_lsn(const CdIo_t *p_cdio, track_t i_track)
bool cdio_get_track_green(const CdIo_t *p_cdio, track_t i_track)
Definition: track.h:77
Definition: track.h:35
Definition: track.h:79
unsigned int cdio_get_track_sec_count(const CdIo_t *p_cdio, track_t i_track)
Definition: track.h:36
Definition: track.h:89
track_format_t cdio_get_track_format(const CdIo_t *p_cdio, track_t i_track)
bool cdio_get_track_msf(const CdIo_t *p_cdio, track_t i_track, msf_t *msf)
Definition: track.h:39
char * cdio_get_track_isrc(const CdIo_t *p_cdio, track_t i_track)
Definition: track.h:76
track_flag_t copy_permit
Definition: track.h:52
Structure containing attributes associated with a track.
Definition: track.h:50
Definition: track.h:32
Definition: track.h:90
track_t cdio_get_first_track_num(const CdIo_t *p_cdio)