"Fossies" - the Fresh Open Source Software Archive

Member "xorriso-1.5.4/libburn/toc.h" (30 Jan 2021, 1779 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 "toc.h" see the Fossies "Dox" file reference documentation.

    1 /* -*- indent-tabs-mode: t; tab-width: 8; c-basic-offset: 8; -*- */
    2 
    3 /* Copyright (c) 2004 - 2006 Derek Foreman, Ben Jansens
    4    Provided under GPL version 2 or later.
    5 */
    6 
    7 
    8 #ifndef __TOC_H
    9 #define __TOC_H
   10 
   11 struct command;
   12 
   13 #include "libburn.h"
   14 #include "structure.h"
   15 
   16 /* return if a given entry refers to a track position */
   17 #define TOC_ENTRY_IS_TRACK(drive, entrynum) \
   18     ((drive)->toc_entry[entrynum].point < 100)
   19 
   20 /* return if a given entry is in audio or data format */
   21 #define TOC_ENTRY_IS_AUDIO(drive, entrynum) \
   22     (~(drive)->toc_entry[entrynum].control & 4)
   23 
   24 /* return the point value for a given entry number */
   25 #define TOC_POINT(drive, entrynum) ((drive)->toc_entry[entrynum].point)
   26 
   27 /* return the track struct for a given entry number */
   28 #define TOC_TRACK(drive, entrynum) \
   29     ((drive)->track[TOC_POINT(drive, entrynum) - 1])
   30 
   31 /* return the lba of a toc entry */
   32 #define TOC_ENTRY_PLBA(drive, entrynum) \
   33     burn_msf_to_lba((drive)->toc_entry[(entrynum)].pmin, \
   34                        (drive)->toc_entry[(entrynum)].psec, \
   35                        (drive)->toc_entry[(entrynum)].pframe)
   36 
   37 /* flags for the q subchannel control field */
   38 #define TOC_CONTROL_AUDIO                       (0)
   39 #define TOC_CONTROL_DATA                        (1 << 2)
   40 #define TOC_CONTROL_AUDIO_TWO_CHANNELS          (0)
   41 #define TOC_CONTROL_AUDIO_FOUR_CHANNELS         (1 << 3)
   42 #define TOC_CONTROL_AUDIO_PRE_EMPHASIS          (1 << 0)
   43 #define TOC_CONTROL_DATA_RECORDED_UNINTERRUPTED (0)
   44 #define TOC_CONTROL_DATA_RECORDED_INCREMENT     (1 << 0)
   45 #define TOC_CONTROL_COPY_PROHIBITED             (0)
   46 #define TOC_CONTROL_COPY_PERMITTED              (1 << 1)
   47 
   48 /** read a sector from each track on disc to determine modes
   49     @param d The drive.
   50 */
   51 void toc_find_modes(struct burn_drive *d);
   52 
   53 #endif /*__TOC_H*/