"Fossies" - the Fresh Open Source Software Archive

Member "xorriso-1.5.4/libburn/structure.h" (30 Jan 2021, 4889 Bytes) of package /linux/misc/xorriso-1.5.4.pl02.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) C and C++ source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file. For more information about "structure.h" see the Fossies "Dox" file reference documentation and the last Fossies "Diffs" side-by-side code changes report: 1.5.2_vs_1.5.4.

    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 
   28 struct burn_cdtext
   29 {
   30     unsigned char *(payload[Libburn_pack_num_typeS]);
   31     int length[Libburn_pack_num_typeS];
   32     int flags;                   /* bit0 - bit15= double byte characters */
   33 };
   34 
   35 struct burn_track
   36 {
   37     int refcnt;
   38     struct burn_toc_entry *entry;
   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 */
   48     int offsetcount;
   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 */
   57     int fill_up_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 */
   63     struct burn_source *source;
   64     /** End of Source flag */
   65     int eos;
   66 
   67     /* ts A61101 */
   68     off_t sourcecount;
   69     off_t writecount;
   70     off_t written_sectors;
   71 
   72     /* ts A61031 */
   73     /** Source is of undefined length */
   74     int open_ended;
   75     /** End of open ended track flag : offset+payload+tail are delivered */
   76     int track_data_done;
   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     */
   84     int end_on_premature_eoi;
   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 */
   96     int pregap2_size;
   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 */
  103     int postgap_size;
  104 
  105     struct isrc isrc;
  106 
  107     /* ts A61024 */
  108     /** Byte swapping on source data stream : 0=none , 1=pairwise */
  109     int swap_source_bytes;
  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 
  119 struct burn_session
  120 {
  121     unsigned char firsttrack;
  122     unsigned char lasttrack;
  123     int hidefirst;
  124     unsigned char start_m;
  125     unsigned char start_s;
  126     unsigned char start_f;
  127     struct burn_toc_entry *leadout_entry;
  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;
  146     struct burn_session **session;
  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 */