xorriso  1.5.4.pl02
About: GNU xorriso creates, loads, manipulates and writes ISO 9660 filesystem images with Rock Ridge extensions. It is suitable for incremental data backup and for production of bootable ISO 9660 images. GNU xorriso is a statical compilation of the libraries libburn, libisofs, libisoburn, and libjte.
  Fossies Dox: xorriso-1.5.4.pl02.tar.gz  ("unofficial" and yet experimental doxygen-generated source code documentation)  

structure.h
Go to the documentation of this file.
1 
2 /* Copyright (c) 2004 - 2006 Derek Foreman, Ben Jansens
3  Copyright (c) 2006 - 2011 Thomas Schmitt <scdbackup@gmx.net>
4  Provided under GPL version 2 or later.
5 */
6 
7 #ifndef BURN__STRUCTURE_H
8 #define BURN__STRUCTURE_H
9 
10 struct isrc
11 {
12  int has_isrc;
13  char country[2]; /* each must be 0-9, A-Z */
14  char owner[3]; /* each must be 0-9, A-Z */
15  unsigned char year; /* must be 0-99 */
16  unsigned int serial; /* must be 0-99999 */
17 };
18 
19 /* ts B11206 */
20 #define Libburn_pack_type_basE 0x80
21 #define Libburn_pack_num_typeS 0x10
22 #define Libburn_pack_type_nameS \
23  "TITLE", "PERFORMER", "SONGWRITER", "COMPOSER", \
24  "ARRANGER", "MESSAGE", "DISCID", "GENRE", \
25  "TOC", "TOC2", "", "", \
26  "", "CLOSED", "UPC_ISRC", "BLOCKSIZE"
27 
29 {
30  unsigned char *(payload[Libburn_pack_num_typeS]);
32  int flags; /* bit0 - bit15= double byte characters */
33 };
34 
35 struct burn_track
36 {
37  int refcnt;
39  unsigned char indices;
40  /* lba address of the index. CD only. 0x7fffffff means undefined index.
41  To be programmed relative to track source start before burning,
42  but to hold absolute addresses after burning or reading.
43  */
44  int index[100];
45  /** number of 0 bytes to write before data */
46  int offset;
47  /** how much offset has been used */
49  /** Number of zeros to write after data */
50  int tail;
51  /** how much tail has been used */
52  int tailcount;
53  /** 1 means Pad with zeros, 0 means start reading the next track */
54  int pad;
55 
56  /* ts A70213 : whether to expand this track to full available media */
58 
59  /* ts A70218 : a track size to use if it is mandarory to have some */
60  off_t default_size;
61 
62  /** Data source */
64  /** End of Source flag */
65  int eos;
66 
67  /* ts A61101 */
68  off_t sourcecount;
69  off_t writecount;
71 
72  /* ts A61031 */
73  /** Source is of undefined length */
75  /** End of open ended track flag : offset+payload+tail are delivered */
77  /* ts B10103 */
78  /** End track writing on premature End-of-input if source is of
79  defined length.
80  0= normal operation in case of eoi
81  1= be ready to end track writing on eoi
82  2= eoi was encountered with previously set value of 1
83  */
85 
86  /** The audio/data mode for the entry. Derived from control and
87  possibly from reading the track's first sector. */
88  int mode;
89  /** The track contains interval one of a pregap */
90  int pregap1;
91  /** The track contains interval two of a pregap */
92  int pregap2;
93 
94  /* ts B20110 */
95  /** The number of sectors in pre-gap 2, if .pregap2 is set */
97 
98  /** The track contains a postgap */
99  int postgap;
100 
101  /* ts B20111 */
102  /** The number of sectors in post-gap, if .postgap is set */
104 
105  struct isrc isrc;
106 
107  /* ts A61024 */
108  /** Byte swapping on source data stream : 0=none , 1=pairwise */
110 
111  /* ts A90910 : conversions from CD XA prepared input */
112  int cdxa_conversion; /* 0=none, 1=remove -xa1 headers (first 8 bytes)*/
113 
114  /* ts B11206 */
115  struct burn_cdtext *cdtext[8];
116 
117 };
118 
120 {
121  unsigned char firsttrack;
122  unsigned char lasttrack;
124  unsigned char start_m;
125  unsigned char start_s;
126  unsigned char start_f;
128 
129  int tracks;
130  struct burn_track **track;
131  int refcnt;
132 
133  /* ts B11206 */
134  struct burn_cdtext *cdtext[8];
135  unsigned char cdtext_char_code[8];
136  unsigned char cdtext_copyright[8];
137  unsigned char cdtext_language[8];
138 
139  /* ts B11226 */
140  unsigned char mediacatalog[14]; /* overridable by burn_write_opts */
141 };
142 
143 struct burn_disc
144 {
145  int sessions;
147 
148 #ifdef Libburn_disc_with_incomplete_sessioN
149  int incomplete_sessions;
150 #endif
151 
152  int refcnt;
153 };
154 
155 int burn_track_get_shortage(struct burn_track *t);
156 
157 
158 /* ts A61031 : might go to libburn.h */
159 int burn_track_is_open_ended(struct burn_track *t);
160 int burn_track_is_data_done(struct burn_track *t);
161 
162 /* ts A70125 : sets overall sectors of a track: offset+payload+padding */
163 int burn_track_set_sectors(struct burn_track *t, int sectors);
164 
165 /* ts A70218 : sets the payload size alone */
166 int burn_track_set_size(struct burn_track *t, off_t size);
167 
168 /* ts A70213 */
169 int burn_track_set_fillup(struct burn_track *t, int fill_up_media);
170 int burn_track_apply_fillup(struct burn_track *t, off_t max_size, int flag);
171 
172 /* ts A70218 */
173 off_t burn_track_get_default_size(struct burn_track *t);
174 
175 
176 /* ts A80808 : Enhance CD toc to DVD toc */
177 int burn_disc_cd_toc_extensions(struct burn_drive *drive, int flag);
178 
179 
180 /* ts B11206 */
181 struct burn_cdtext *burn_cdtext_create(void);
182 void burn_cdtext_free(struct burn_cdtext **cdtext);
183 
184 /* ts B20119 */
185 /* @param flag bit0= do not add post-gap
186 */
187 int burn_track_get_sectors_2(struct burn_track *t, int flag);
188 
189 
190 #endif /* BURN__STRUCTURE_H */
int length[0x10]
Definition: structure.h:31
unsigned char * payload[0x10]
Definition: structure.h:30
int sessions
Definition: structure.h:145
int refcnt
Definition: structure.h:152
struct burn_session ** session
Definition: structure.h:146
unsigned char cdtext_char_code[8]
Definition: structure.h:135
unsigned char start_m
Definition: structure.h:124
unsigned char cdtext_language[8]
Definition: structure.h:137
unsigned char start_s
Definition: structure.h:125
unsigned char cdtext_copyright[8]
Definition: structure.h:136
unsigned char mediacatalog[14]
Definition: structure.h:140
struct burn_cdtext * cdtext[8]
Definition: structure.h:134
struct burn_toc_entry * leadout_entry
Definition: structure.h:127
unsigned char lasttrack
Definition: structure.h:122
unsigned char start_f
Definition: structure.h:126
struct burn_track ** track
Definition: structure.h:130
unsigned char firsttrack
Definition: structure.h:121
Definition: libburn.h:351
int open_ended
Definition: structure.h:74
int end_on_premature_eoi
Definition: structure.h:84
int refcnt
Definition: structure.h:37
int pregap2_size
Definition: structure.h:96
int postgap_size
Definition: structure.h:103
int swap_source_bytes
Definition: structure.h:109
int tailcount
Definition: structure.h:52
struct burn_source * source
Definition: structure.h:63
unsigned char indices
Definition: structure.h:39
int pregap2
Definition: structure.h:92
int pregap1
Definition: structure.h:90
int cdxa_conversion
Definition: structure.h:112
off_t written_sectors
Definition: structure.h:70
int index[100]
Definition: structure.h:44
int fill_up_media
Definition: structure.h:57
int offsetcount
Definition: structure.h:48
int tail
Definition: structure.h:50
int offset
Definition: structure.h:46
struct burn_cdtext * cdtext[8]
Definition: structure.h:115
int mode
Definition: structure.h:88
int postgap
Definition: structure.h:99
off_t sourcecount
Definition: structure.h:68
off_t writecount
Definition: structure.h:69
off_t default_size
Definition: structure.h:60
struct burn_toc_entry * entry
Definition: structure.h:38
int track_data_done
Definition: structure.h:76
Definition: structure.h:11
unsigned int serial
Definition: structure.h:16
unsigned char year
Definition: structure.h:15
char country[2]
Definition: structure.h:13
char owner[3]
Definition: structure.h:14
int has_isrc
Definition: structure.h:12
off_t burn_track_get_default_size(struct burn_track *t)
Definition: structure.c:629
int burn_track_set_fillup(struct burn_track *t, int fill_up_media)
Definition: structure.c:577
struct burn_cdtext * burn_cdtext_create(void)
Definition: structure.c:891
#define Libburn_pack_num_typeS
Definition: structure.h:21
int burn_track_set_size(struct burn_track *t, off_t size)
Definition: structure.c:565
int burn_track_is_data_done(struct burn_track *t)
Definition: structure.c:649
int burn_track_apply_fillup(struct burn_track *t, off_t max_size, int flag)
Definition: structure.c:590
int burn_track_get_shortage(struct burn_track *t)
Definition: structure.c:654
int burn_disc_cd_toc_extensions(struct burn_drive *drive, int flag)
Definition: structure.c:753
void burn_cdtext_free(struct burn_cdtext **cdtext)
Definition: structure.c:907
int burn_track_get_sectors_2(struct burn_track *t, int flag)
Definition: structure.c:512
int burn_track_set_sectors(struct burn_track *t, int sectors)
Definition: structure.c:549
int burn_track_is_open_ended(struct burn_track *t)
Definition: structure.c:614