#include <sys/types.h>
Include dependency graph for libburn.h:
This graph shows which files directly or indirectly include this file:
Go to the source code of this file.
Data Structures | |
struct | burn_toc_entry |
Information about a track on a disc - this is from the q sub channel of the lead-in area of a disc. More... | |
struct | burn_source |
Data source for tracks. More... | |
struct | burn_drive_info |
Information on a drive in the system. More... | |
struct | burn_progress |
Operation progress report. More... | |
Defines | |
#define | BURN_CDROM 0 |
Session format for normal audio or data discs. | |
#define | BURN_CDI 0x10 |
Session format for obsolete CD-I discs. | |
#define | BURN_CDXA 0x20 |
Session format for CDROM-XA discs. | |
#define | BURN_POS_END 100 |
#define | BURN_MODE_BITS 127 |
Mask for mode bits. | |
#define | BURN_MODE0 (1 << 0) |
Track mode - mode 0 data 0 bytes of user data. | |
#define | BURN_MODE_RAW (1 << 1) |
Track mode - mode "raw" - all 2352 bytes supplied by app FOR DATA TRACKS ONLY! | |
#define | BURN_MODE1 (1 << 2) |
Track mode - mode 1 data 2048 bytes user data, and all the LEC money can buy. | |
#define | BURN_MODE2 (1 << 3) |
Track mode - mode 2 data defaults to formless, 2336 bytes of user data, unprotected | with a data form if required. | |
#define | BURN_FORM1 (1 << 4) |
Track mode modifier - Form 1, | with MODE2 for reasonable results 2048 bytes of user data, 4 bytes of subheader. | |
#define | BURN_FORM2 (1 << 5) |
Track mode modifier - Form 2, | with MODE2 for reasonable results lots of user data. | |
#define | BURN_AUDIO (1 << 6) |
Track mode - audio 2352 bytes per sector. | |
#define | BURN_4CH (1 << 7) |
Track mode modifier - 4 channel audio. | |
#define | BURN_COPY (1 << 8) |
Track mode modifier - Digital copy permitted, can be set on any track. | |
#define | BURN_PREEMPHASIS (1 << 9) |
Track mode modifier - 50/15uS pre-emphasis. | |
#define | BURN_SUBCODE_P16 (1 << 10) |
Input mode modifier - subcodes present packed 16. | |
#define | BURN_SUBCODE_P96 (1 << 11) |
Input mode modifier - subcodes present packed 96. | |
#define | BURN_SUBCODE_R96 (1 << 12) |
Input mode modifier - subcodes present raw 96. | |
#define | BURN_DRIVE_WHITELIST_LEN 255 |
Maximum number of particularly permissible drive addresses. | |
#define | BURN_DRIVE_ADR_LEN 1024 |
Maximum length+1 to expect with a persistent drive address string. | |
#define | BURN_MSGS_MESSAGE_LEN 4096 |
Typedefs | |
typedef int(*) | burn_abort_handler_t (void *handle, int signum, int flag) |
Enumerations | |
enum | burn_write_types { BURN_WRITE_PACKET, BURN_WRITE_TAO, BURN_WRITE_SAO, BURN_WRITE_RAW } |
Possible disc writing style/modes. More... | |
enum | burn_block_types { BURN_BLOCK_RAW0 = 1, BURN_BLOCK_RAW16 = 2, BURN_BLOCK_RAW96P = 4, BURN_BLOCK_RAW96R = 8, BURN_BLOCK_MODE1 = 256, BURN_BLOCK_MODE2R = 512, BURN_BLOCK_MODE2_PATHETIC = 1024, BURN_BLOCK_MODE2_LAME = 2048, BURN_BLOCK_MODE2_OBSCURE = 4096, BURN_BLOCK_MODE2_OK = 8192, BURN_BLOCK_SAO = 16384 } |
Data format to send to the drive. More... | |
enum | burn_disc_status { BURN_DISC_UNREADY, BURN_DISC_BLANK, BURN_DISC_EMPTY, BURN_DISC_APPENDABLE, BURN_DISC_FULL, BURN_DISC_UNGRABBED, BURN_DISC_UNSUITABLE } |
Possible status' of the drive in regard to the disc in it. More... | |
enum | burn_source_status { BURN_SOURCE_OK, BURN_SOURCE_EOF, BURN_SOURCE_FAILED } |
Possible data source return values. More... | |
enum | burn_drive_status { BURN_DRIVE_IDLE, BURN_DRIVE_SPAWNING, BURN_DRIVE_READING, BURN_DRIVE_WRITING, BURN_DRIVE_WRITING_LEADIN, BURN_DRIVE_WRITING_LEADOUT, BURN_DRIVE_ERASING, BURN_DRIVE_GRABBING, BURN_DRIVE_WRITING_PREGAP, BURN_DRIVE_CLOSING_TRACK, BURN_DRIVE_CLOSING_SESSION } |
Possible busy states for a drive. More... | |
Functions | |
int | burn_initialize (void) |
Initialize the library. | |
void | burn_finish (void) |
Shutdown the library. | |
int | burn_abort (int patience, int(*pacifier_func)(void *handle, int patience, int elapsed), void *handle) |
Abort any running drive operation and finally call burn_finish(). | |
int | burn_abort_pacifier (void *handle, int patience, int elapsed) |
A pacifier function suitable for burn_abort. | |
void | burn_set_verbosity (int level) |
ts A61006 : This is for development only. | |
void | burn_preset_device_open (int exclusive, int blocking, int abort_on_busy) |
Set parameters for behavior on opening device files. | |
int | burn_drive_scan_and_grab (struct burn_drive_info *drive_infos[], char *adr, int load) |
Aquire a drive with known persistent address.This is the sysadmin friendly way to open one drive and to leave all others untouched. | |
int | burn_drive_add_whitelist (char *device_address) |
Add a device to the list of permissible drives. | |
void | burn_drive_clear_whitelist (void) |
Remove all drives from whitelist. | |
int | burn_drive_scan (struct burn_drive_info *drive_infos[], unsigned int *n_drives) |
Scan for drives. | |
int | burn_drive_info_forget (struct burn_drive_info *drive_info, int force) |
Release memory about a single drive and any exclusive lock on it. | |
void | burn_drive_info_free (struct burn_drive_info drive_infos[]) |
Free a burn_drive_info array returned by burn_drive_scan. | |
int | burn_drive_get_adr (struct burn_drive_info *drive_info, char adr[]) |
Inquire the persistent address of the given drive. | |
int | burn_drive_is_enumerable_adr (char *adr) |
Evaluate wether the given address would be a possible persistent drive address of libburn. | |
int | burn_drive_convert_fs_adr (char *path, char adr[]) |
Try to convert a given existing filesystem address into a persistent drive address. | |
int | burn_drive_convert_scsi_adr (int bus_no, int host_no, int channel_no, int target_no, int lun_no, char adr[]) |
Try to convert a given SCSI address of bus,host,channel,target,lun into a persistent drive address. | |
int | burn_drive_obtain_scsi_adr (char *path, int *bus_no, int *host_no, int *channel_no, int *target_no, int *lun_no) |
Try to obtain bus,host,channel,target,lun from path. | |
int | burn_drive_grab (struct burn_drive *drive, int load) |
Grab a drive. | |
void | burn_drive_release (struct burn_drive *drive, int eject) |
Release a drive. | |
enum burn_disc_status | burn_disc_get_status (struct burn_drive *drive) |
Returns what kind of disc a drive is holding. | |
int | burn_disc_pretend_blank (struct burn_drive *drive) |
WARNING: This revives an old bug-like behavior that might be dangerous. | |
int | burn_disc_pretend_full (struct burn_drive *drive) |
WARNING: This overrides the safety measures against unsuitable media. | |
int | burn_disc_read_atip (struct burn_drive *drive) |
Reads ATIP information from inserted media. | |
int | burn_drive_get_start_end_lba (struct burn_drive *drive, int *start_lba, int *end_lba, int flag) |
Returns start and end lba of the media which is currently inserted in the given drive. | |
int | burn_disc_track_lba_nwa (struct burn_drive *d, struct burn_write_opts *o, int trackno, int *lba, int *nwa) |
Read start lba and Next Writeable Address of a track from media. | |
int | burn_disc_erasable (struct burn_drive *d) |
Tells whether a disc can be erased or not. | |
enum burn_drive_status | burn_drive_get_status (struct burn_drive *drive, struct burn_progress *p) |
Returns the progress and status of a drive. | |
burn_write_opts * | burn_write_opts_new (struct burn_drive *drive) |
Creates a write_opts struct for burning to the specified drive must be freed with burn_write_opts_free. | |
void | burn_write_opts_free (struct burn_write_opts *opts) |
Frees a write_opts struct created with burn_write_opts_new. | |
burn_read_opts * | burn_read_opts_new (struct burn_drive *drive) |
Creates a read_opts struct for reading from the specified drive must be freed with burn_write_opts_free. | |
void | burn_read_opts_free (struct burn_read_opts *opts) |
Frees a read_opts struct created with burn_read_opts_new. | |
void | burn_disc_erase (struct burn_drive *drive, int fast) |
Erase a disc in the drive. | |
void | burn_disc_read (struct burn_drive *drive, const struct burn_read_opts *o) |
Read a disc from the drive and write it to an fd pair. | |
void | burn_disc_write (struct burn_write_opts *o, struct burn_disc *disc) |
Write a disc in the drive. | |
void | burn_drive_cancel (struct burn_drive *drive) |
Cancel an operation on a drive. | |
int | burn_msf_to_sectors (int m, int s, int f) |
Convert a minute-second-frame (MSF) value to sector count. | |
void | burn_sectors_to_msf (int sectors, int *m, int *s, int *f) |
Convert a sector count to minute-second-frame (MSF). | |
int | burn_msf_to_lba (int m, int s, int f) |
Convert a minute-second-frame (MSF) value to an lba. | |
void | burn_lba_to_msf (int lba, int *m, int *s, int *f) |
Convert an lba to minute-second-frame (MSF). | |
burn_disc * | burn_disc_create (void) |
Create a new disc (for DAO recording). | |
void | burn_disc_free (struct burn_disc *d) |
Delete disc and decrease the reference count on all its sessions. | |
burn_session * | burn_session_create (void) |
Create a new session (For SAO at once recording, or to be added to a disc for DAO). | |
void | burn_session_free (struct burn_session *s) |
Free a session (and decrease reference count on all tracks inside). | |
int | burn_disc_add_session (struct burn_disc *d, struct burn_session *s, unsigned int pos) |
Add a session to a disc at a specific position, increasing the sessions's reference count. | |
int | burn_disc_remove_session (struct burn_disc *d, struct burn_session *s) |
Remove a session from a disc. | |
burn_track * | burn_track_create (void) |
Create a track (for TAO recording, or to put in a session). | |
void | burn_track_free (struct burn_track *t) |
Free a track. | |
int | burn_session_add_track (struct burn_session *s, struct burn_track *t, unsigned int pos) |
Add a track to a session at specified position. | |
int | burn_session_remove_track (struct burn_session *s, struct burn_track *t) |
Remove a track from a session. | |
void | burn_track_define_data (struct burn_track *t, int offset, int tail, int pad, int mode) |
Define the data in a track. | |
int | burn_track_set_byte_swap (struct burn_track *t, int swap_source_bytes) |
Define wether a track shall swap bytes of its input stream. | |
void | burn_track_set_isrc (struct burn_track *t, char *country, char *owner, unsigned char year, unsigned int serial) |
Set the ISRC details for a track. | |
void | burn_track_clear_isrc (struct burn_track *t) |
Disable ISRC parameters for a track. | |
void | burn_session_hide_first_track (struct burn_session *s, int onoff) |
Hide the first track in the "pre gap" of the disc. | |
burn_disc * | burn_drive_get_disc (struct burn_drive *d) |
Get the drive's disc struct - free when done. | |
enum burn_source_status | burn_track_set_source (struct burn_track *t, struct burn_source *s) |
Set the track's data source. | |
void | burn_source_free (struct burn_source *s) |
Free a burn_source (decrease its refcount and maybe free it). | |
burn_source * | burn_file_source_new (const char *path, const char *subpath) |
Creates a data source for an image file (and maybe subcode file). | |
burn_source * | burn_fd_source_new (int datafd, int subfd, off_t size) |
Creates a data source for an image file (a track) from an open readable filedescriptor, an eventually open readable subcodes file descriptor and eventually a fixed size in bytes. | |
int | burn_track_get_sectors (struct burn_track *) |
Tells how long a track will be on disc >>> NOTE: Not reliable with tracks of undefined length. | |
int | burn_track_get_counters (struct burn_track *t, off_t *read_bytes, off_t *written_bytes) |
Tells how many source bytes have been read and how many data bytes have been written by the track during burn. | |
void | burn_drive_set_speed (struct burn_drive *d, int read, int write) |
Sets drive read and write speed. | |
void | burn_structure_print_disc (struct burn_disc *d) |
void | burn_structure_print_session (struct burn_session *s) |
void | burn_structure_print_track (struct burn_track *t) |
int | burn_write_opts_set_write_type (struct burn_write_opts *opts, enum burn_write_types write_type, int block_type) |
Sets the write type for the write_opts struct. | |
void | burn_write_opts_set_toc_entries (struct burn_write_opts *opts, int count, struct burn_toc_entry *toc_entries) |
Supplies toc entries for writing - not normally required for cd mastering. | |
void | burn_write_opts_set_format (struct burn_write_opts *opts, int format) |
Sets the session format for a disc. | |
int | burn_write_opts_set_simulate (struct burn_write_opts *opts, int sim) |
Sets the simulate value for the write_opts struct. | |
int | burn_write_opts_set_underrun_proof (struct burn_write_opts *opts, int underrun_proof) |
Controls buffer underrun prevention. | |
void | burn_write_opts_set_perform_opc (struct burn_write_opts *opts, int opc) |
Sets whether to use opc or not with the write_opts struct. | |
void | burn_write_opts_set_has_mediacatalog (struct burn_write_opts *opts, int has_mediacatalog) |
void | burn_write_opts_set_mediacatalog (struct burn_write_opts *opts, unsigned char mediacatalog[13]) |
void | burn_write_opts_set_multi (struct burn_write_opts *opts, int multi) |
void | burn_read_opts_set_raw (struct burn_read_opts *opts, int raw_mode) |
Sets whether to read in raw mode or not. | |
void | burn_read_opts_set_c2errors (struct burn_read_opts *opts, int c2errors) |
Sets whether to report c2 errors or not. | |
void | burn_read_opts_read_subcodes_audio (struct burn_read_opts *opts, int subcodes_audio) |
Sets whether to read subcodes from audio tracks or not. | |
void | burn_read_opts_read_subcodes_data (struct burn_read_opts *opts, int subcodes_data) |
Sets whether to read subcodes from data tracks or not. | |
void | burn_read_opts_set_hardware_error_recovery (struct burn_read_opts *opts, int hardware_error_recovery) |
Sets whether to recover errors if possible. | |
void | burn_read_opts_report_recovered_errors (struct burn_read_opts *opts, int report_recovered_errors) |
Sets whether to report recovered errors or not. | |
void | burn_read_opts_transfer_damaged_blocks (struct burn_read_opts *opts, int transfer_damaged_blocks) |
Sets whether blocks with unrecoverable errors should be read or not. | |
void | burn_read_opts_set_hardware_error_retries (struct burn_read_opts *opts, unsigned char hardware_error_retries) |
Sets the number of retries to attempt when trying to correct an error. | |
int | burn_drive_get_write_speed (struct burn_drive *d) |
Gets the maximum write speed for a drive. | |
int | burn_drive_get_min_write_speed (struct burn_drive *d) |
Gets the minimum write speed for a drive. | |
int | burn_drive_get_read_speed (struct burn_drive *d) |
Gets the maximum read speed for a drive. | |
void | burn_track_get_entry (struct burn_track *t, struct burn_toc_entry *entry) |
Gets a copy of the toc_entry structure associated with a track. | |
void | burn_session_get_leadout_entry (struct burn_session *s, struct burn_toc_entry *entry) |
Gets a copy of the toc_entry structure associated with a session's lead out. | |
burn_session ** | burn_disc_get_sessions (struct burn_disc *d, int *num) |
Gets an array of all the sessions for the disc THIS IS NO LONGER VALID AFTER YOU ADD OR REMOVE A SESSION. | |
int | burn_disc_get_sectors (struct burn_disc *d) |
burn_track ** | burn_session_get_tracks (struct burn_session *s, int *num) |
Gets an array of all the tracks for a session THIS IS NO LONGER VALID AFTER YOU ADD OR REMOVE A TRACK. | |
int | burn_session_get_sectors (struct burn_session *s) |
int | burn_track_get_mode (struct burn_track *track) |
Gets the mode of a track. | |
int | burn_session_get_hidefirst (struct burn_session *session) |
Returns whether the first track of a session is hidden in the pregap. | |
void | burn_version (int *major, int *minor, int *micro) |
Returns the library's version in its parts. | |
int | burn_msgs_set_severities (char *queue_severity, char *print_severity, char *print_id) |
Control queueing and stderr printing of messages from libburn. | |
int | burn_msgs_obtain (char *minimum_severity, int *error_code, char msg_text[], int *os_errno, char severity[]) |
Obtain the oldest pending libburn message from the queue which has at least the given minimum_severity. | |
void | burn_set_signal_handling (void *handle, burn_abort_handler_t handler, int mode) |
Control builtin signal handling. |
#define BURN_4CH (1 << 7) |
#define BURN_AUDIO (1 << 6) |
Track mode - audio 2352 bytes per sector.
may be | with 4ch or preemphasis. NOT TO BE CONFUSED WITH BURN_MODE_RAW Audio data must be 44100Hz 16bit stereo with no riff or other header at beginning. Extra header data will cause pops or clicks. Audio data should also be in little-endian byte order. Big-endian audio data causes static.
Definition at line 92 of file libburn.h.
Referenced by libburner_payload(), and libburner_setup().
#define BURN_CDI 0x10 |
#define BURN_CDROM 0 |
#define BURN_COPY (1 << 8) |
#define BURN_DRIVE_ADR_LEN 1024 |
Maximum length+1 to expect with a persistent drive address string.
Definition at line 583 of file libburn.h.
Referenced by libburner_aquire_by_driveno(), and libburner_setup().
#define BURN_DRIVE_WHITELIST_LEN 255 |
#define BURN_FORM1 (1 << 4) |
#define BURN_FORM2 (1 << 5) |
#define BURN_MODE0 (1 << 0) |
#define BURN_MODE1 (1 << 2) |
Track mode - mode 1 data 2048 bytes user data, and all the LEC money can buy.
Definition at line 71 of file libburn.h.
Referenced by libburner_payload().
#define BURN_MODE2 (1 << 3) |
#define BURN_MODE_RAW (1 << 1) |
#define BURN_POS_END 100 |
#define BURN_PREEMPHASIS (1 << 9) |
#define BURN_SUBCODE_P16 (1 << 10) |
#define BURN_SUBCODE_P96 (1 << 11) |
#define BURN_SUBCODE_R96 (1 << 12) |
typedef int(*) burn_abort_handler_t(void *handle, int signum, int flag) |
enum burn_block_types |
Data format to send to the drive.
Definition at line 129 of file libburn.h.
00130 { 00131 /** sync, headers, edc/ecc provided by lib/user */ 00132 BURN_BLOCK_RAW0 = 1, 00133 /** sync, headers, edc/ecc and p/q subs provided by lib/user */ 00134 BURN_BLOCK_RAW16 = 2, 00135 /** sync, headers, edc/ecc and packed p-w subs provided by lib/user */ 00136 BURN_BLOCK_RAW96P = 4, 00137 /** sync, headers, edc/ecc and raw p-w subs provided by lib/user */ 00138 BURN_BLOCK_RAW96R = 8, 00139 /** only 2048 bytes of user data provided by lib/user */ 00140 BURN_BLOCK_MODE1 = 256, 00141 /** 2336 bytes of user data provided by lib/user */ 00142 BURN_BLOCK_MODE2R = 512, 00143 /** 2048 bytes of user data provided by lib/user 00144 subheader provided in write parameters 00145 are we ever going to support this shit? I vote no. 00146 (supposed to be supported on all drives...) 00147 */ 00148 BURN_BLOCK_MODE2_PATHETIC = 1024, 00149 /** 2048 bytes of data + 8 byte subheader provided by lib/user 00150 hey, this is also dumb 00151 */ 00152 BURN_BLOCK_MODE2_LAME = 2048, 00153 /** 2324 bytes of data provided by lib/user 00154 subheader provided in write parameters 00155 no sir, I don't like it. 00156 */ 00157 BURN_BLOCK_MODE2_OBSCURE = 4096, 00158 /** 2332 bytes of data supplied by lib/user 00159 8 bytes sub header provided in write parameters 00160 this is the second least suck mode2, and is mandatory for 00161 all drives to support. 00162 */ 00163 BURN_BLOCK_MODE2_OK = 8192, 00164 /** SAO block sizes are based on cue sheet, so use this. */ 00165 BURN_BLOCK_SAO = 16384 00166 };
enum burn_disc_status |
Possible status' of the drive in regard to the disc in it.
Definition at line 169 of file libburn.h.
00170 { 00171 /** The current status is not yet known */ 00172 BURN_DISC_UNREADY, 00173 /** The drive holds a blank disc */ 00174 BURN_DISC_BLANK, 00175 /** There is no disc at all in the drive */ 00176 BURN_DISC_EMPTY, 00177 /** There is an incomplete disc in the drive */ 00178 BURN_DISC_APPENDABLE, 00179 /** There is a disc with data on it in the drive */ 00180 BURN_DISC_FULL, 00181 00182 /* ts A61007 */ 00183 /** The drive was not grabbed when the status was inquired */ 00184 BURN_DISC_UNGRABBED, 00185 00186 /* ts A61020 */ 00187 /** The media seems not to be suitable for burning */ 00188 BURN_DISC_UNSUITABLE 00189 };
enum burn_drive_status |
Possible busy states for a drive.
Definition at line 205 of file libburn.h.
00206 { 00207 /** The drive is not in an operation */ 00208 BURN_DRIVE_IDLE, 00209 /** The library is spawning the processes to handle a pending 00210 operation (A read/write/etc is about to start but hasn't quite 00211 yet) */ 00212 BURN_DRIVE_SPAWNING, 00213 /** The drive is reading data from a disc */ 00214 BURN_DRIVE_READING, 00215 /** The drive is writing data to a disc */ 00216 BURN_DRIVE_WRITING, 00217 /** The drive is writing Lead-In */ 00218 BURN_DRIVE_WRITING_LEADIN, 00219 /** The drive is writing Lead-Out */ 00220 BURN_DRIVE_WRITING_LEADOUT, 00221 /** The drive is erasing a disc */ 00222 BURN_DRIVE_ERASING, 00223 /** The drive is being grabbed */ 00224 BURN_DRIVE_GRABBING, 00225 00226 /* ts A61102 */ 00227 /** The drive gets written zeroes before the track payload data */ 00228 BURN_DRIVE_WRITING_PREGAP, 00229 /** The drive is told to close a track (TAO only) */ 00230 BURN_DRIVE_CLOSING_TRACK, 00231 /** The drive is told to close a session (TAO only) */ 00232 BURN_DRIVE_CLOSING_SESSION 00233 00234 };
enum burn_source_status |
Possible data source return values.
BURN_SOURCE_OK | The source is ok. |
BURN_SOURCE_EOF | The source is at end of file. |
BURN_SOURCE_FAILED | The source is unusable. |
Definition at line 193 of file libburn.h.
00194 { 00195 /** The source is ok */ 00196 BURN_SOURCE_OK, 00197 /** The source is at end of file */ 00198 BURN_SOURCE_EOF, 00199 /** The source is unusable */ 00200 BURN_SOURCE_FAILED 00201 };
enum burn_write_types |
Possible disc writing style/modes.
Definition at line 107 of file libburn.h.
00108 { 00109 /** Packet writing. 00110 currently unsupported 00111 */ 00112 BURN_WRITE_PACKET, 00113 /** Track At Once recording. 00114 2s gaps between tracks, no fonky lead-ins 00115 */ 00116 BURN_WRITE_TAO, 00117 /** Session At Once. 00118 block type MUST be BURN_BLOCK_SAO 00119 */ 00120 BURN_WRITE_SAO, 00121 /** Raw disc at once recording. 00122 all subcodes must be provided by lib or user 00123 only raw block types are supported 00124 */ 00125 BURN_WRITE_RAW 00126 };
int burn_abort | ( | int | patience, | |
int(*)(void *handle, int patience, int elapsed) | pacifier_func, | |||
void * | handle | |||
) |
Abort any running drive operation and finally call burn_finish().
You MUST calm down the busy drive if an aborting event occurs during a burn run. For that you may call this function either from your own signal handling code or indirectly by activating the builtin signal handling: burn_set_signal_handling("my_app_name : ", NULL, 0); Else you may eventually call burn_drive_cancel() on the active drive and wait for it to assume state BURN_DRIVE_IDLE.
patience | Maximum number of seconds to wait for drives to finish | |
pacifier_func | If not NULL: a function to produce appeasing messages. See burn_abort_pacifier() for an example. |
int burn_abort_pacifier | ( | void * | handle, | |
int | patience, | |||
int | elapsed | |||
) |
A pacifier function suitable for burn_abort.
handle | If not NULL, a pointer to a text suitable for printf("%s") | |
patience | Maximum number of seconds to wait | |
elapsed | Elapsed number of seconds |
int burn_disc_add_session | ( | struct burn_disc * | d, | |
struct burn_session * | s, | |||
unsigned int | pos | |||
) |
Add a session to a disc at a specific position, increasing the sessions's reference count.
d | Disc to add the session to | |
s | Session to add to the disc | |
pos | position to add at (BURN_POS_END is "at the end") |
Referenced by libburner_payload().
struct burn_disc* burn_disc_create | ( | void | ) | [read] |
int burn_disc_erasable | ( | struct burn_drive * | d | ) |
Tells whether a disc can be erased or not.
Referenced by libburner_blank_disc(), and libburner_payload().
void burn_disc_erase | ( | struct burn_drive * | drive, | |
int | fast | |||
) |
Erase a disc in the drive.
The drive must be grabbed successfully BEFORE calling this functions. Always ensure that the drive reports a status of BURN_DISC_FULL before calling this function. An erase operation is not cancellable, as control of the operation is passed wholly to the drive and there is no way to interrupt it safely.
drive | The drive with which to erase a disc. | |
fast | Nonzero to do a fast erase, where only the disc's headers are erased; zero to erase the entire disc. |
Referenced by libburner_blank_disc().
void burn_disc_free | ( | struct burn_disc * | d | ) |
Delete disc and decrease the reference count on all its sessions.
d | The disc to be freed |
Referenced by libburner_payload().
int burn_disc_get_sectors | ( | struct burn_disc * | d | ) |
struct burn_session** burn_disc_get_sessions | ( | struct burn_disc * | d, | |
int * | num | |||
) | [read] |
Gets an array of all the sessions for the disc THIS IS NO LONGER VALID AFTER YOU ADD OR REMOVE A SESSION.
d | Disc to get session array for | |
num | Returns the number of sessions in the array |
enum burn_disc_status burn_disc_get_status | ( | struct burn_drive * | drive | ) |
Returns what kind of disc a drive is holding.
This function may need to be called more than once to get a proper status from it. See burn_disc_status for details.
drive | The drive to query for a disc. |
Referenced by libburner_blank_disc(), and libburner_payload().
int burn_disc_pretend_blank | ( | struct burn_drive * | drive | ) |
WARNING: This revives an old bug-like behavior that might be dangerous.
Sets the drive status to BURN_DISC_BLANK if it is BURN_DISC_UNREADY or BURN_DISC_UNSUITABLE. Thus marking media as writable which actually failed to declare themselves either blank or (partially) filled.
int burn_disc_pretend_full | ( | struct burn_drive * | drive | ) |
WARNING: This overrides the safety measures against unsuitable media.
Sets the drive status to BURN_DISC_FULL if it is BURN_DISC_UNREADY or BURN_DISC_UNSUITABLE. Thus marking media as blankable which actually failed to declare themselves either blank or (partially) filled.
void burn_disc_read | ( | struct burn_drive * | drive, | |
const struct burn_read_opts * | o | |||
) |
Read a disc from the drive and write it to an fd pair.
The drive must be grabbed successfully BEFORE calling this function. Always ensure that the drive reports a status of BURN_DISC_FULL before calling this function.
drive | The drive from which to read a disc. | |
o | The options for the read operation. |
int burn_disc_read_atip | ( | struct burn_drive * | drive | ) |
Reads ATIP information from inserted media.
To be obtained via burn_drive_get_write_speed(), burn_drive_get_min_write_speed(), burn_drive_get_start_end_lba(). The drive must be grabbed for this call.
drive | The drive to query. |
int burn_disc_remove_session | ( | struct burn_disc * | d, | |
struct burn_session * | s | |||
) |
Remove a session from a disc.
d | Disc to remove session from | |
s | Session pointer to find and remove |
int burn_disc_track_lba_nwa | ( | struct burn_drive * | d, | |
struct burn_write_opts * | o, | |||
int | trackno, | |||
int * | lba, | |||
int * | nwa | |||
) |
Read start lba and Next Writeable Address of a track from media.
Usually a track lba is obtained from the result of burn_track_get_entry(). This call retrieves an updated lba, eventual nwa, and can address the invisible track to come. The drive must be grabbed for this call. One may not issue this call during ongoing burn_disc_write() or burn_disc_erase().
d | The drive to query. | |
o | If not NULL: write parameters to be set on drive before query | |
trackno | 0=next track to come, >0 number of existing track |
void burn_disc_write | ( | struct burn_write_opts * | o, | |
struct burn_disc * | disc | |||
) |
Write a disc in the drive.
The drive must be grabbed successfully before calling this function. Always ensure that the drive reports a status of BURN_DISC_BLANK before calling this function.
o | The options for the writing operation. | |
disc | The struct burn_disc * that described the disc to be created |
Referenced by libburner_payload().
int burn_drive_add_whitelist | ( | char * | device_address | ) |
Add a device to the list of permissible drives.
As soon as some entry is in the whitelist all non-listed drives are banned from scanning.
void burn_drive_cancel | ( | struct burn_drive * | drive | ) |
Cancel an operation on a drive.
This will only work when the drive's busy state is BURN_DRIVE_READING or BURN_DRIVE_WRITING.
drive | The drive on which to cancel the current operation. |
void burn_drive_clear_whitelist | ( | void | ) |
Remove all drives from whitelist.
This enables all possible drives.
int burn_drive_convert_fs_adr | ( | char * | path, | |
char | adr[] | |||
) |
Try to convert a given existing filesystem address into a persistent drive address.
This succeeds with symbolic links or if a hint about the drive's system address can be read from the filesystem object and a matching drive is found.
path | The address of an existing file system object | |
adr | An application provided array of at least BURN_DRIVE_ADR_LEN characters size. The persistent address gets copied to it. |
int burn_drive_convert_scsi_adr | ( | int | bus_no, | |
int | host_no, | |||
int | channel_no, | |||
int | target_no, | |||
int | lun_no, | |||
char | adr[] | |||
) |
Try to convert a given SCSI address of bus,host,channel,target,lun into a persistent drive address.
If a SCSI address component parameter is < 0 then it is not decisive and the first enumerated address which matches the >= 0 parameters is taken as result. Note: bus and (host,channel) are supposed to be redundant.
adr | An application provided array of at least BURN_DRIVE_ADR_LEN characters size. The persistent address gets copied to it. |
int burn_drive_get_adr | ( | struct burn_drive_info * | drive_info, | |
char | adr[] | |||
) |
Inquire the persistent address of the given drive.
drive_info | The drive to inquire. Usually some &(drive_infos[driveno]) | |
adr | An application provided array of at least BURN_DRIVE_ADR_LEN characters size. The persistent address gets copied to it. |
Referenced by libburner_aquire_by_driveno().
struct burn_disc* burn_drive_get_disc | ( | struct burn_drive * | d | ) | [read] |
Get the drive's disc struct - free when done.
d | drive to query |
int burn_drive_get_min_write_speed | ( | struct burn_drive * | d | ) |
Gets the minimum write speed for a drive.
This might differ from burn_drive_get_write_speed() only after burn_disc_read_atip()
d | Drive to query |
int burn_drive_get_read_speed | ( | struct burn_drive * | d | ) |
Gets the maximum read speed for a drive.
d | Drive to query |
int burn_drive_get_start_end_lba | ( | struct burn_drive * | drive, | |
int * | start_lba, | |||
int * | end_lba, | |||
int | flag | |||
) |
Returns start and end lba of the media which is currently inserted in the given drive.
The drive has to be grabbed to have hope for reply. Shortcomming (not a feature): unless burn_disc_read_atip() was called only blank media will return valid info.
drive | The drive to query. | |
start_lba | Returns the start lba value | |
end_lba | Returns the end lba value | |
flag | Bitfield for control purposes (unused yet, submit 0) |
enum burn_drive_status burn_drive_get_status | ( | struct burn_drive * | drive, | |
struct burn_progress * | p | |||
) |
Returns the progress and status of a drive.
drive | The drive to query busy state for. | |
p | Returns the progress of the operation, NULL if you don't care |
Referenced by libburner_blank_disc(), and libburner_payload().
int burn_drive_get_write_speed | ( | struct burn_drive * | d | ) |
Gets the maximum write speed for a drive.
d | Drive to query |
int burn_drive_grab | ( | struct burn_drive * | drive, | |
int | load | |||
) |
Grab a drive.
This must be done before the drive can be used (for reading, writing, etc).
drive | The drive to grab. This is found in a returned burn_drive_info struct. | |
load | Nonzero to make the drive attempt to load a disc (close its tray door, etc). |
Referenced by libburner_aquire_by_driveno(), and libburner_regrab().
int burn_drive_info_forget | ( | struct burn_drive_info * | drive_info, | |
int | force | |||
) |
Release memory about a single drive and any exclusive lock on it.
Become unable to inquire or grab it. Expect FATAL consequences if you try.
drive_info | pointer to a single element out of the array obtained from burn_drive_scan() : &(drive_infos[driveno]) | |
force | controls degree of permissible drive usage at the moment this function is called, and the amount of automatically provided drive shutdown : 0= drive must be ungrabbed and BURN_DRIVE_IDLE 1= try to release drive resp. accept BURN_DRIVE_GRABBING Use these two only. Further values are to be defined. |
Referenced by libburner_aquire_by_driveno().
void burn_drive_info_free | ( | struct burn_drive_info | drive_infos[] | ) |
Free a burn_drive_info array returned by burn_drive_scan.
int burn_drive_is_enumerable_adr | ( | char * | adr | ) |
Evaluate wether the given address would be a possible persistent drive address of libburn.
int burn_drive_obtain_scsi_adr | ( | char * | path, | |
int * | bus_no, | |||
int * | host_no, | |||
int * | channel_no, | |||
int * | target_no, | |||
int * | lun_no | |||
) |
Try to obtain bus,host,channel,target,lun from path.
If there is an SCSI address at all, then this call should succeed with a persistent drive address obtained via burn_drive_get_adr(). It is also supposed to succeed with any device file of a (possibly emulated) SCSI device.
void burn_drive_release | ( | struct burn_drive * | drive, | |
int | eject | |||
) |
Release a drive.
This should not be done until the drive is no longer busy (see burn_drive_get_status). The drive is (O_EXCL) unlocked afterwards.
drive | The drive to release. | |
eject | Nonzero to make the drive eject the disc in it. |
Referenced by libburner_regrab(), and main().
int burn_drive_scan | ( | struct burn_drive_info * | drive_infos[], | |
unsigned int * | n_drives | |||
) |
Scan for drives.
This function MUST be called until it returns nonzero. No drives may be in use when this is called. All drive pointers are invalidated by using this function. Do NOT store drive pointers across calls to this function or death AND pain will ensue. After this call all drives depicted by the returned array are subject to eventual (O_EXCL) locking. See burn_preset_device_open(). This state ends either with burn_drive_info_forget() or with burn_drive_release(). It is unfriendly to other processes on the system to hold drives locked which one does not definitely plan to use soon.
drive_infos | Returns an array of drive info items (cdroms/burners). The returned array must be freed by burn_drive_info_free() before burn_finish(), and also before calling this function burn_drive_scan() again. | |
n_drives | Returns the number of drive items in drive_infos. |
Referenced by libburner_aquire_by_driveno().
int burn_drive_scan_and_grab | ( | struct burn_drive_info * | drive_infos[], | |
char * | adr, | |||
int | load | |||
) |
Aquire a drive with known persistent address.This is the sysadmin friendly way to open one drive and to leave all others untouched.
It bundles the following API calls to form a non-obtrusive way to use libburn: burn_drive_add_whitelist() , burn_drive_scan() , burn_drive_grab() You are *strongly urged* to use this call whenever you know the drive address in advance. If not, then you have to use directly above calls. In that case, you are strongly urged* to drop any unintended drive which will be exclusively occupied and not closed by burn_drive_scan(). This can be done by shutting down the library including a call to burn_finish(). You may later start a new libburn session and should then use the function described here with an address obtained after burn_drive_scan() via burn_drive_get_adr(&(drive_infos[driveno]), adr) . Another way is to drop the unwanted drives by burn_drive_info_forget().
drive_infos | On success returns a one element array with the drive (cdrom/burner). Thus use with driveno 0 only. On failure the array has no valid elements at all. The returned array should be freed via burn_drive_info_free() when it is no longer needed, and before calling a scan function again. This is a result from call burn_drive_scan(). See there. Use with driveno 0 only. | |
adr | The persistent address of the desired drive. Either obtained by burn_drive_get_adr() or guessed skillfully by application resp. its user. | |
load | Nonzero to make the drive attempt to load a disc (close its tray door, etc). |
Referenced by libburner_aquire_by_adr().
void burn_drive_set_speed | ( | struct burn_drive * | d, | |
int | read, | |||
int | write | |||
) |
Sets drive read and write speed.
d | The drive to set speed for | |
read | Read speed in k/s (0 is max) | |
write | Write speed in k/s (0 is max) |
Referenced by libburner_payload().
struct burn_source* burn_fd_source_new | ( | int | datafd, | |
int | subfd, | |||
off_t | size | |||
) | [read] |
Creates a data source for an image file (a track) from an open readable filedescriptor, an eventually open readable subcodes file descriptor and eventually a fixed size in bytes.
datafd | The source of data. | |
subfd | The eventual source for subcodes. Not used if -1. | |
size | The eventual fixed size of eventually both fds. If this value is 0, the size will be determined from datafd. |
Referenced by libburner_payload().
struct burn_source* burn_file_source_new | ( | const char * | path, | |
const char * | subpath | |||
) | [read] |
Creates a data source for an image file (and maybe subcode file).
void burn_finish | ( | void | ) |
Shutdown the library.
This should be called before exiting your application. Make sure that all drives you have grabbed are released before calling this.
Referenced by main().
int burn_initialize | ( | void | ) |
Initialize the library.
This must be called before using any other functions in the library. It may be called more than once with no effect. It is possible to 'restart' the library by shutting it down and re-initializing it. This is necessary if you follow the older and more general way of accessing a drive via burn_drive_scan() and burn_drive_grab(). See burn_drive_scan_and_grab() with its strong urges and its explanations.
Referenced by main().
void burn_lba_to_msf | ( | int | lba, | |
int * | m, | |||
int * | s, | |||
int * | f | |||
) |
Convert an lba to minute-second-frame (MSF).
lba | The lba | |
m | Returns the minute component | |
s | Returns the second component | |
f | Returns the frame component |
int burn_msf_to_lba | ( | int | m, | |
int | s, | |||
int | f | |||
) |
Convert a minute-second-frame (MSF) value to an lba.
m | Minute component | |
s | Second component | |
f | Frame component |
int burn_msf_to_sectors | ( | int | m, | |
int | s, | |||
int | f | |||
) |
Convert a minute-second-frame (MSF) value to sector count.
m | Minute component | |
s | Second component | |
f | Frame component |
int burn_msgs_obtain | ( | char * | minimum_severity, | |
int * | error_code, | |||
char | msg_text[], | |||
int * | os_errno, | |||
char | severity[] | |||
) |
Obtain the oldest pending libburn message from the queue which has at least the given minimum_severity.
This message and any older message of lower severity will get discarded from the queue and is then lost forever. Severity may be one of "NEVER", "FATAL", "SORRY", "WARNING", "HINT", "NOTE", "UPDATE", "DEBUG", "ALL". To call with minimum_severity "NEVER" will discard the whole queue.
error_code | Will become a unique error code as liste in libburn/libdax_msgs.h | |
msg_text | Must provide at least BURN_MSGS_MESSAGE_LEN bytes. | |
os_errno | Will become the eventual errno related to the message | |
severity | Will become the severity related to the message and should provide at least 80 bytes. |
int burn_msgs_set_severities | ( | char * | queue_severity, | |
char * | print_severity, | |||
char * | print_id | |||
) |
Control queueing and stderr printing of messages from libburn.
Severity may be one of "NEVER", "FATAL", "SORRY", "WARNING", "HINT", "NOTE", "UPDATE", "DEBUG", "ALL".
queue_severity | Gives the minimum limit for messages to be queued. Default: "NEVER". If you queue messages then you must consume them by burn_msgs_obtain(). | |
print_severity | Does the same for messages to be printed directly to stderr. Default: "FATAL". | |
print_id | A text prefix to be printed before the message. |
Referenced by main().
void burn_preset_device_open | ( | int | exclusive, | |
int | blocking, | |||
int | abort_on_busy | |||
) |
Set parameters for behavior on opening device files.
To be called early after burn_initialize() and before any bus scan. But not mandatory at all. Parameter value 1 enables a feature, 0 disables. Default is (1,0,0). Have a good reason before you change it.
exclusive | 1 = Try to open only devices which are not marked as busy and try to mark them busy if opened sucessfully. (O_EXCL) There are kernels which simply don't care about O_EXCL. Some have it off, some have it on, some are switchable. 2 = in case of a SCSI device, also try to open exclusively the matching /dev/sr, /dev/scd and /dev/st . 0 = no attempt to make drive access exclusive. | |
blocking | Try to wait for drives which do not open immediately but also do not return an error as well. (O_NONBLOCK) This might stall indefinitely with /dev/hdX hard disks. | |
abort_on_busy | Unconditionally abort process when a non blocking exclusive opening attempt indicates a busy drive. Use this only after thorough tests with your app. |
void burn_read_opts_free | ( | struct burn_read_opts * | opts | ) |
Frees a read_opts struct created with burn_read_opts_new.
opts | write_opts to free |
struct burn_read_opts* burn_read_opts_new | ( | struct burn_drive * | drive | ) | [read] |
Creates a read_opts struct for reading from the specified drive must be freed with burn_write_opts_free.
drive | The drive to read from |
void burn_read_opts_read_subcodes_audio | ( | struct burn_read_opts * | opts, | |
int | subcodes_audio | |||
) |
Sets whether to read subcodes from audio tracks or not.
opts | The read opts to change | |
subcodes_audio | If non-zero, read subcodes from audio tracks on the disc. |
void burn_read_opts_read_subcodes_data | ( | struct burn_read_opts * | opts, | |
int | subcodes_data | |||
) |
Sets whether to read subcodes from data tracks or not.
opts | The read opts to change | |
subcodes_data | If non-zero, read subcodes from data tracks on the disc. |
void burn_read_opts_report_recovered_errors | ( | struct burn_read_opts * | opts, | |
int | report_recovered_errors | |||
) |
Sets whether to report recovered errors or not.
opts | The read opts to change | |
report_recovered_errors | If non-zero, recovered errors will be reported. |
void burn_read_opts_set_c2errors | ( | struct burn_read_opts * | opts, | |
int | c2errors | |||
) |
Sets whether to report c2 errors or not.
opts | The read opts to change | |
c2errors | If non-zero, report c2 errors. |
void burn_read_opts_set_hardware_error_recovery | ( | struct burn_read_opts * | opts, | |
int | hardware_error_recovery | |||
) |
Sets whether to recover errors if possible.
opts | The read opts to change | |
hardware_error_recovery | If non-zero, attempt to recover errors if possible. |
void burn_read_opts_set_hardware_error_retries | ( | struct burn_read_opts * | opts, | |
unsigned char | hardware_error_retries | |||
) |
Sets the number of retries to attempt when trying to correct an error.
opts | The read opts to change | |
hardware_error_retries | The number of retries to attempt when correcting an error. |
void burn_read_opts_set_raw | ( | struct burn_read_opts * | opts, | |
int | raw_mode | |||
) |
Sets whether to read in raw mode or not.
opts | The read opts to change | |
raw_mode | If non-zero, reading will be done in raw mode, so that everything in the data tracks on the disc is read, including headers. |
void burn_read_opts_transfer_damaged_blocks | ( | struct burn_read_opts * | opts, | |
int | transfer_damaged_blocks | |||
) |
Sets whether blocks with unrecoverable errors should be read or not.
opts | The read opts to change | |
transfer_damaged_blocks | If non-zero, blocks with unrecoverable errors will still be read. |
void burn_sectors_to_msf | ( | int | sectors, | |
int * | m, | |||
int * | s, | |||
int * | f | |||
) |
Convert a sector count to minute-second-frame (MSF).
sectors | The sector count | |
m | Returns the minute component | |
s | Returns the second component | |
f | Returns the frame component |
int burn_session_add_track | ( | struct burn_session * | s, | |
struct burn_track * | t, | |||
unsigned int | pos | |||
) |
Add a track to a session at specified position.
s | Session to add to | |
t | Track to insert in session | |
pos | position to add at (BURN_POS_END is "at the end") |
Referenced by libburner_payload().
struct burn_session* burn_session_create | ( | void | ) | [read] |
Create a new session (For SAO at once recording, or to be added to a disc for DAO).
Referenced by libburner_payload().
void burn_session_free | ( | struct burn_session * | s | ) |
Free a session (and decrease reference count on all tracks inside).
s | Session to be freed |
Referenced by libburner_payload().
int burn_session_get_hidefirst | ( | struct burn_session * | session | ) |
Returns whether the first track of a session is hidden in the pregap.
session | the session to query |
void burn_session_get_leadout_entry | ( | struct burn_session * | s, | |
struct burn_toc_entry * | entry | |||
) |
Gets a copy of the toc_entry structure associated with a session's lead out.
s | Session to get the entry from | |
entry | Struct for the library to fill out |
int burn_session_get_sectors | ( | struct burn_session * | s | ) |
struct burn_track** burn_session_get_tracks | ( | struct burn_session * | s, | |
int * | num | |||
) | [read] |
Gets an array of all the tracks for a session THIS IS NO LONGER VALID AFTER YOU ADD OR REMOVE A TRACK.
s | session to get track array for | |
num | Returns the number of tracks in the array |
void burn_session_hide_first_track | ( | struct burn_session * | s, | |
int | onoff | |||
) |
Hide the first track in the "pre gap" of the disc.
s | session to change | |
onoff | 1 to enable hiding, 0 to disable |
int burn_session_remove_track | ( | struct burn_session * | s, | |
struct burn_track * | t | |||
) |
Remove a track from a session.
s | Session to remove track from | |
t | Track pointer to find and remove |
void burn_set_signal_handling | ( | void * | handle, | |
burn_abort_handler_t | handler, | |||
int | mode | |||
) |
Control builtin signal handling.
See also burn_abort().
handle | Opaque handle eventually pointing to an application provided memory object | |
handler | A function to be called on signals. It will get handle as argument. It should finally call burn_abort(). See there. | |
mode | : 0 call handler(handle, signum, 0) on nearly all signals 1 enable system default reaction on all signals 2 try to ignore nearly all signals 10 like mode 2 but handle SIGABRT like with mode 0 Arguments (text, NULL, 0) activate the builtin abort handler. It will eventually call burn_abort() and then perform exit(1). If text is not NULL then it is used as prefix for pacifier messages of burn_abort_pacifier(). |
Referenced by main().
void burn_set_verbosity | ( | int | level | ) |
ts A61006 : This is for development only.
Not suitable for applications. Set the verbosity level of the library. The default value is 0, which means that nothing is output on stderr. The more you increase this, the more debug output should be displayed on stderr for you.
level | The verbosity level desired. 0 for nothing, higher positive values for more information output. |
void burn_source_free | ( | struct burn_source * | s | ) |
Free a burn_source (decrease its refcount and maybe free it).
s | Source to free |
Referenced by libburner_payload().
void burn_structure_print_disc | ( | struct burn_disc * | d | ) |
Referenced by libburner_payload().
void burn_structure_print_session | ( | struct burn_session * | s | ) |
void burn_structure_print_track | ( | struct burn_track * | t | ) |
void burn_track_clear_isrc | ( | struct burn_track * | t | ) |
Disable ISRC parameters for a track.
t | The track to change |
struct burn_track* burn_track_create | ( | void | ) | [read] |
void burn_track_define_data | ( | struct burn_track * | t, | |
int | offset, | |||
int | tail, | |||
int | pad, | |||
int | mode | |||
) |
Define the data in a track.
t | the track to define | |
offset | The lib will write this many 0s before start of data | |
tail | The number of extra 0s to write after data | |
pad | 1 means the lib should pad the last sector with 0s if the track isn't exactly sector sized. (otherwise the lib will begin reading from the next track) | |
mode | data format (bitfield) |
Referenced by libburner_payload().
void burn_track_free | ( | struct burn_track * | t | ) |
int burn_track_get_counters | ( | struct burn_track * | t, | |
off_t * | read_bytes, | |||
off_t * | written_bytes | |||
) |
Tells how many source bytes have been read and how many data bytes have been written by the track during burn.
void burn_track_get_entry | ( | struct burn_track * | t, | |
struct burn_toc_entry * | entry | |||
) |
Gets a copy of the toc_entry structure associated with a track.
t | Track to get the entry from | |
entry | Struct for the library to fill out |
int burn_track_get_mode | ( | struct burn_track * | track | ) |
Gets the mode of a track.
track | the track to query |
int burn_track_get_sectors | ( | struct burn_track * | ) |
Tells how long a track will be on disc >>> NOTE: Not reliable with tracks of undefined length.
int burn_track_set_byte_swap | ( | struct burn_track * | t, | |
int | swap_source_bytes | |||
) |
Define wether a track shall swap bytes of its input stream.
t | The track to change | |
swap_source_bytes | 0=do not swap, 1=swap byte pairs |
void burn_track_set_isrc | ( | struct burn_track * | t, | |
char * | country, | |||
char * | owner, | |||
unsigned char | year, | |||
unsigned int | serial | |||
) |
Set the ISRC details for a track.
t | The track to change | |
country | the 2 char country code. Each character must be only numbers or letters. | |
owner | 3 char owner code. Each character must be only numbers or letters. | |
year | 2 digit year. A number in 0-99 (Yep, not Y2K friendly). | |
serial | 5 digit serial number. A number in 0-99999. |
enum burn_source_status burn_track_set_source | ( | struct burn_track * | t, | |
struct burn_source * | s | |||
) |
Set the track's data source.
t | The track to set the data source for | |
s | The data source to use for the contents of the track |
Referenced by libburner_payload().
void burn_version | ( | int * | major, | |
int * | minor, | |||
int * | micro | |||
) |
Returns the library's version in its parts.
major | The major version number | |
minor | The minor version number | |
micro | The micro version number |
void burn_write_opts_free | ( | struct burn_write_opts * | opts | ) |
Frees a write_opts struct created with burn_write_opts_new.
opts | write_opts to free |
Referenced by libburner_payload().
struct burn_write_opts* burn_write_opts_new | ( | struct burn_drive * | drive | ) | [read] |
Creates a write_opts struct for burning to the specified drive must be freed with burn_write_opts_free.
drive | The drive to write with |
Referenced by libburner_payload().
void burn_write_opts_set_format | ( | struct burn_write_opts * | opts, | |
int | format | |||
) |
Sets the session format for a disc.
opts | The write opts to change | |
format | The session format to set |
void burn_write_opts_set_has_mediacatalog | ( | struct burn_write_opts * | opts, | |
int | has_mediacatalog | |||
) |
void burn_write_opts_set_mediacatalog | ( | struct burn_write_opts * | opts, | |
unsigned char | mediacatalog[13] | |||
) |
void burn_write_opts_set_multi | ( | struct burn_write_opts * | opts, | |
int | multi | |||
) |
Referenced by libburner_payload().
void burn_write_opts_set_perform_opc | ( | struct burn_write_opts * | opts, | |
int | opc | |||
) |
Sets whether to use opc or not with the write_opts struct.
opts | The write opts to change | |
opc | If non-zero, optical power calibration will be performed at start of burn |
Referenced by libburner_payload().
int burn_write_opts_set_simulate | ( | struct burn_write_opts * | opts, | |
int | sim | |||
) |
Sets the simulate value for the write_opts struct.
opts | The write opts to change | |
sim | If non-zero, the drive will perform a simulation instead of a burn |
Referenced by libburner_payload().
void burn_write_opts_set_toc_entries | ( | struct burn_write_opts * | opts, | |
int | count, | |||
struct burn_toc_entry * | toc_entries | |||
) |
Supplies toc entries for writing - not normally required for cd mastering.
opts | The write opts to change | |
count | The number of entries | |
toc_entries |
int burn_write_opts_set_underrun_proof | ( | struct burn_write_opts * | opts, | |
int | underrun_proof | |||
) |
Controls buffer underrun prevention.
opts | The write opts to change | |
underrun_proof | if non-zero, buffer underrun protection is enabled |
Referenced by libburner_payload().
int burn_write_opts_set_write_type | ( | struct burn_write_opts * | opts, | |
enum burn_write_types | write_type, | |||
int | block_type | |||
) |
Sets the write type for the write_opts struct.
opts | The write opts to change | |
write_type | The write type to use | |
block_type | The block type to use |
Referenced by libburner_payload().