2010-02-14 08:45:14 +00:00
|
|
|
|
|
|
|
/* Copyright (c) 2004 - 2006 Derek Foreman, Ben Jansens
|
2011-01-03 19:51:30 +00:00
|
|
|
Copyright (c) 2006 - 2011 Thomas Schmitt <scdbackup@gmx.net>
|
2010-02-14 08:45:14 +00:00
|
|
|
Provided under GPL version 2 or later.
|
|
|
|
*/
|
|
|
|
|
2006-08-15 20:37:04 +00:00
|
|
|
#ifndef BURN__STRUCTURE_H
|
|
|
|
#define BURN__STRUCTURE_H
|
|
|
|
|
|
|
|
struct isrc
|
|
|
|
{
|
|
|
|
int has_isrc;
|
|
|
|
char country[2]; /* each must be 0-9, A-Z */
|
|
|
|
char owner[3]; /* each must be 0-9, A-Z */
|
|
|
|
unsigned char year; /* must be 0-99 */
|
|
|
|
unsigned int serial; /* must be 0-99999 */
|
|
|
|
};
|
|
|
|
|
2011-12-12 09:26:41 +00:00
|
|
|
/* ts B11206 */
|
|
|
|
#define Libburn_pack_type_basE 0x80
|
|
|
|
#define Libburn_pack_num_typeS 0x10
|
|
|
|
#define Libburn_pack_type_nameS \
|
|
|
|
"TITLE", "PERFORMER", "SONGWRITER", "COMPOSER", \
|
|
|
|
"ARRANGER", "MESSAGE", "DISCID", "GENRE", \
|
|
|
|
"TOC", "TOC2", "", "", \
|
|
|
|
"", "CLOSED", "UPC_ISRC", "BLOCKSIZE"
|
|
|
|
|
|
|
|
struct burn_cdtext
|
|
|
|
{
|
|
|
|
unsigned char *(payload[Libburn_pack_num_typeS]);
|
|
|
|
int length[Libburn_pack_num_typeS];
|
|
|
|
int flags; /* bit0 - bit15= double byte characters */
|
|
|
|
};
|
|
|
|
|
2006-08-15 20:37:04 +00:00
|
|
|
struct burn_track
|
|
|
|
{
|
|
|
|
int refcnt;
|
|
|
|
struct burn_toc_entry *entry;
|
|
|
|
unsigned char indices;
|
2012-01-03 19:43:26 +00:00
|
|
|
/* lba address of the index. CD only. 0x7fffffff means undefined index.
|
|
|
|
To be programmed relative to track source start before burning,
|
|
|
|
but to hold absolute addresses after burning or reading.
|
|
|
|
*/
|
|
|
|
int index[100];
|
2006-08-15 20:37:04 +00:00
|
|
|
/** number of 0 bytes to write before data */
|
|
|
|
int offset;
|
|
|
|
/** how much offset has been used */
|
|
|
|
int offsetcount;
|
|
|
|
/** Number of zeros to write after data */
|
|
|
|
int tail;
|
|
|
|
/** how much tail has been used */
|
|
|
|
int tailcount;
|
|
|
|
/** 1 means Pad with zeros, 0 means start reading the next track */
|
|
|
|
int pad;
|
2007-02-14 20:32:56 +00:00
|
|
|
|
|
|
|
/* ts A70213 : wether to expand this track to full available media */
|
|
|
|
int fill_up_media;
|
|
|
|
|
2007-02-19 22:51:39 +00:00
|
|
|
/* ts A70218 : a track size to use if it is mandarory to have some */
|
|
|
|
off_t default_size;
|
|
|
|
|
2006-08-15 20:37:04 +00:00
|
|
|
/** Data source */
|
|
|
|
struct burn_source *source;
|
|
|
|
/** End of Source flag */
|
|
|
|
int eos;
|
2006-10-31 18:48:18 +00:00
|
|
|
|
2006-11-01 16:39:07 +00:00
|
|
|
/* ts A61101 */
|
|
|
|
off_t sourcecount;
|
|
|
|
off_t writecount;
|
2006-11-03 15:10:24 +00:00
|
|
|
off_t written_sectors;
|
2006-11-01 16:39:07 +00:00
|
|
|
|
2006-10-31 18:48:18 +00:00
|
|
|
/* ts A61031 */
|
|
|
|
/** Source is of undefined length */
|
|
|
|
int open_ended;
|
|
|
|
/** End of open ended track flag : offset+payload+tail are delivered */
|
|
|
|
int track_data_done;
|
2011-01-03 19:51:30 +00:00
|
|
|
/* ts B10103 */
|
|
|
|
/** End track writing on premature End-of-input if source is of
|
|
|
|
defined length.
|
|
|
|
0= normal operation in case of eoi
|
|
|
|
1= be ready to end track writing on eoi
|
|
|
|
2= eoi was encountered with previously set value of 1
|
|
|
|
*/
|
|
|
|
int end_on_premature_eoi;
|
2006-10-31 18:48:18 +00:00
|
|
|
|
2006-08-15 20:37:04 +00:00
|
|
|
/** The audio/data mode for the entry. Derived from control and
|
|
|
|
possibly from reading the track's first sector. */
|
|
|
|
int mode;
|
|
|
|
/** The track contains interval one of a pregap */
|
|
|
|
int pregap1;
|
|
|
|
/** The track contains interval two of a pregap */
|
|
|
|
int pregap2;
|
2012-01-10 12:20:23 +00:00
|
|
|
|
|
|
|
/* ts B20110 */
|
|
|
|
/** The number of sectors in pre-gap 2, if .pregap2 is set */
|
|
|
|
int pregap2_size;
|
|
|
|
|
2006-08-15 20:37:04 +00:00
|
|
|
/** The track contains a postgap */
|
|
|
|
int postgap;
|
2012-01-12 08:44:34 +00:00
|
|
|
|
|
|
|
/* ts B20111 */
|
|
|
|
/** The number of sectors in post-gap, if .postgap is set */
|
|
|
|
int postgap_size;
|
|
|
|
|
2006-08-15 20:37:04 +00:00
|
|
|
struct isrc isrc;
|
2006-10-24 10:20:35 +00:00
|
|
|
|
|
|
|
/* ts A61024 */
|
|
|
|
/** Byte swapping on source data stream : 0=none , 1=pairwise */
|
|
|
|
int swap_source_bytes;
|
2009-09-11 11:53:36 +00:00
|
|
|
|
|
|
|
/* ts A90910 : conversions from CD XA prepared input */
|
|
|
|
int cdxa_conversion; /* 0=none, 1=remove -xa1 headers (first 8 bytes)*/
|
|
|
|
|
2011-12-12 09:26:41 +00:00
|
|
|
/* ts B11206 */
|
|
|
|
struct burn_cdtext *cdtext[8];
|
|
|
|
|
2006-08-15 20:37:04 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
struct burn_session
|
|
|
|
{
|
|
|
|
unsigned char firsttrack;
|
|
|
|
unsigned char lasttrack;
|
|
|
|
int hidefirst;
|
|
|
|
unsigned char start_m;
|
|
|
|
unsigned char start_s;
|
|
|
|
unsigned char start_f;
|
|
|
|
struct burn_toc_entry *leadout_entry;
|
|
|
|
|
|
|
|
int tracks;
|
|
|
|
struct burn_track **track;
|
|
|
|
int refcnt;
|
2011-12-12 09:26:41 +00:00
|
|
|
|
|
|
|
/* ts B11206 */
|
|
|
|
struct burn_cdtext *cdtext[8];
|
|
|
|
unsigned char cdtext_char_code[8];
|
|
|
|
unsigned char cdtext_copyright[8];
|
|
|
|
unsigned char cdtext_language[8];
|
|
|
|
|
2011-12-27 11:56:54 +00:00
|
|
|
/* ts B11226 */
|
|
|
|
unsigned char mediacatalog[14]; /* overrideable by burn_write_opts */
|
2006-08-15 20:37:04 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
struct burn_disc
|
|
|
|
{
|
|
|
|
int sessions;
|
|
|
|
struct burn_session **session;
|
|
|
|
int refcnt;
|
|
|
|
};
|
|
|
|
|
|
|
|
int burn_track_get_shortage(struct burn_track *t);
|
|
|
|
|
2006-10-31 18:48:18 +00:00
|
|
|
|
|
|
|
/* ts A61031 : might go to libburn.h */
|
|
|
|
int burn_track_is_open_ended(struct burn_track *t);
|
|
|
|
int burn_track_is_data_done(struct burn_track *t);
|
|
|
|
|
2007-02-19 22:51:39 +00:00
|
|
|
/* ts A70125 : sets overall sectors of a track: offset+payload+padding */
|
2007-01-25 18:52:50 +00:00
|
|
|
int burn_track_set_sectors(struct burn_track *t, int sectors);
|
|
|
|
|
2007-02-19 22:51:39 +00:00
|
|
|
/* ts A70218 : sets the payload size alone */
|
|
|
|
int burn_track_set_size(struct burn_track *t, off_t size);
|
|
|
|
|
2007-02-14 20:32:56 +00:00
|
|
|
/* ts A70213 */
|
|
|
|
int burn_track_set_fillup(struct burn_track *t, int fill_up_media);
|
|
|
|
int burn_track_apply_fillup(struct burn_track *t, off_t max_size, int flag);
|
|
|
|
|
2007-02-19 22:51:39 +00:00
|
|
|
/* ts A70218 */
|
|
|
|
off_t burn_track_get_default_size(struct burn_track *t);
|
2007-02-14 20:32:56 +00:00
|
|
|
|
2006-10-31 18:48:18 +00:00
|
|
|
|
2008-08-09 07:18:53 +00:00
|
|
|
/* ts A80808 : Enhance CD toc to DVD toc */
|
2012-01-11 12:25:06 +00:00
|
|
|
int burn_disc_cd_toc_extensions(struct burn_drive *drive, int flag);
|
2008-08-09 07:18:53 +00:00
|
|
|
|
|
|
|
|
2011-12-12 09:26:41 +00:00
|
|
|
/* ts B11206 */
|
|
|
|
struct burn_cdtext *burn_cdtext_create(void);
|
|
|
|
void burn_cdtext_free(struct burn_cdtext **cdtext);
|
|
|
|
|
2012-01-23 09:30:48 +00:00
|
|
|
/* ts B20119 */
|
|
|
|
/* @param flag bit0= do not add post-gap
|
|
|
|
*/
|
|
|
|
int burn_track_get_sectors_2(struct burn_track *t, int flag);
|
|
|
|
|
2011-12-12 09:26:41 +00:00
|
|
|
|
2006-08-15 20:37:04 +00:00
|
|
|
#endif /* BURN__STRUCTURE_H */
|