37#if defined(__cplusplus)
38#define BURN_BEGIN_DECLS \
41#define BURN_END_DECLS \
45#define BURN_BEGIN_DECLS
67struct burn_write_opts;
76#define BURN_POS_END 100
79#define BURN_MODE_BITS 127
84#define BURN_MODE0 (1 << 0)
88#define BURN_MODE_RAW (1 << 1)
92#define BURN_MODE1 (1 << 2)
97#define BURN_MODE2 (1 << 3)
101#define BURN_FORM1 (1 << 4)
105#define BURN_FORM2 (1 << 5)
113#define BURN_AUDIO (1 << 6)
115#define BURN_4CH (1 << 7)
117#define BURN_COPY (1 << 8)
119#define BURN_PREEMPHASIS (1 << 9)
121#define BURN_SUBCODE_P16 (1 << 10)
123#define BURN_SUBCODE_P96 (1 << 11)
125#define BURN_SUBCODE_R96 (1 << 12)
133#define BURN_SCMS (1 << 13)
807 int (*pacifier_func)(
void *handle,
int patience,
int elapsed),
968 char* adr,
int load);
974#define BURN_DRIVE_WHITELIST_LEN 255
1011 unsigned int *n_drives);
1041#define BURN_DRIVE_ADR_LEN 1024
1105 int target_no,
int lun_no,
char adr[]);
1138 char *dir_adr,
char **templ,
int num_templ,
int flag);
1149 int *channel_no,
int *target_no,
int *lun_no);
1344 int *start_lba,
int *
end_lba,
int flag);
1369 int m_lo,
int s_lo,
int f_lo,
int flag);
1398 unsigned int *disc_id,
char bar_code[9],
int *app_code,
1422 unsigned char **text_packs,
int *num_packs,
1440 int *alloc_blocks,
int *free_blocks,
int flag);
1460 char **book_name,
int *part_version,
int *num_layers,
1461 int *num_blocks,
int flag);
1482 int trackno,
int *lba,
int *nwa);
1553 struct burn_write_opts *o);
1619 char **product_id,
char **media_code1,
char **media_code2,
1620 char **book_type,
int flag);
1639 char *manuf_code,
char *media_code,
int flag);
1753#define BURN_FORMAT_IS_UNFORMATTED 1
1754#define BURN_FORMAT_IS_FORMATTED 2
1755#define BURN_FORMAT_IS_UNKNOWN 3
1779 unsigned *bl_sas,
int *num_formats);
1797 int *type, off_t *size,
unsigned *tdp);
1817#define BURN_REASONS_LEN 4096
1874 int start,
int flag);
2051 char *path,
int fifo_size,
struct burn_source **fifo,
2052 unsigned char **text_packs,
int *num_packs,
int flag);
2141 int char_codes[8],
int copyrights[8],
2142 int languages[8],
int flag);
2151#define BURN_CDTEXT_LANGUAGES_0X00 \
2152 "Unknown", "Albanian", "Breton", "Catalan", \
2153 "Croatian", "Welsh", "Czech", "Danish", \
2154 "German", "English", "Spanish", "Esperanto", \
2155 "Estonian", "Basque", "Faroese", "French", \
2156 "Frisian", "Irish", "Gaelic", "Galician", \
2157 "Icelandic", "Italian", "Lappish", "Latin", \
2158 "Latvian", "Luxembourgian", "Lithuanian", "Hungarian", \
2159 "Maltese", "Dutch", "Norwegian", "Occitan", \
2160 "Polish", "Portuguese", "Romanian", "Romansh", \
2161 "Serbian", "Slovak", "Slovenian", "Finnish", \
2162 "Swedish", "Turkish", "Flemish", "Wallon"
2172#define BURN_CDTEXT_LANGUAGES_0X45 \
2173 "Zulu", "Vietnamese", "Uzbek", \
2174 "Urdu", "Ukrainian", "Thai", "Telugu", \
2175 "Tatar", "Tamil", "Tadzhik", "Swahili", \
2176 "Sranan Tongo", "Somali", "Sinhalese", "Shona", \
2177 "Serbo-croat", "Ruthenian", "Russian", "Quechua", \
2178 "Pushtu", "Punjabi", "Persian", "Papamiento", \
2179 "Oriya", "Nepali", "Ndebele", "Marathi", \
2180 "Moldavian", "Malaysian", "Malagasay", "Macedonian", \
2181 "Laotian", "Korean", "Khmer", "Kazakh", \
2182 "Kannada", "Japanese", "Indonesian", "Hindi", \
2183 "Hebrew", "Hausa", "Gurani", "Gujurati", \
2184 "Greek", "Georgian", "Fulani", "Dari", \
2185 "Churash", "Chinese", "Burmese", "Bulgarian", \
2186 "Bengali", "Bielorussian", "Bambora", "Azerbaijani", \
2187 "Assamese", "Armenian", "Arabic", "Amharic"
2197#define BURN_CDTEXT_FILLER \
2217 int char_codes[8],
int copyrights[8],
2218 int block_languages[8],
int flag);
2269 int pack_type,
char *pack_type_name,
2270 unsigned char *payload,
int length,
int flag);
2279#define BURN_CDTEXT_GENRE_LIST \
2280 "Not Used", "Not Defined", "Adult Contemporary", "Alternative Rock", \
2281 "Childrens Music", "Classical", "Contemporary Christian", "Country", \
2282 "Dance", "Easy Listening", "Erotic", "Folk", \
2283 "Gospel", "Hip Hop", "Jazz", "Latin", \
2284 "Musical", "New Age", "Opera", "Operetta", \
2285 "Pop Music", "Rap", "Reggae", "Rock Music", \
2286 "Rhythm & Blues", "Sound Effects", "Spoken Word", "World Music"
2290#define BURN_CDTEXT_NUM_GENRES 28
2316 int pack_type,
char *pack_type_name,
2317 unsigned char **payload,
int *length,
int flag);
2351 char *path,
int block,
int flag);
2378 unsigned char **text_packs,
int *num_packs,
2421 int start_tno,
int track_count,
2422 char **result,
int *char_code,
int flag);
2455 int *num_packs,
int flag);
2504 int pack_type,
char *pack_type_name,
2505 unsigned char *payload,
int length,
int flag);
2527 int pack_type,
char *pack_type_name,
2528 unsigned char **payload,
int *length,
int flag);
2570 unsigned char year,
unsigned int serial);
2608 unsigned int relative_lba,
int flag);
2722 const char *subpath);
2830 off_t start, off_t size,
int flag);
2877 int chunksize,
int chunks,
int flag);
2899 int *free_bytes,
char **status_text);
2917 int *total_min_fill,
int *interval_min_fill,
2918 int *put_counter,
int *get_counter,
2919 int *empty_counter,
int *full_counter);
2999 off_t *read_bytes, off_t *written_bytes);
3066 struct timeval *prev_time,
3067 int *us_corr, off_t b_since_prev,
int flag);
3105 int min_usec,
int max_usec,
int timeout_sec,
3106 int min_percent,
int max_percent);
3165 struct burn_write_opts *opts,
struct burn_disc *disc,
3216 int underrun_proof);
3234 unsigned char mediacatalog[13]);
3243 int has_mediacatalog);
3304 unsigned char *text_packs,
3305 int num_packs,
int flag);
3446 int subcodes_audio);
3460 int hardware_error_recovery);
3467 int report_recovered_errors);
3474 int transfer_damaged_blocks);
3481 unsigned char hardware_error_retries);
3498 int profiles[64],
char is_current[64]);
3523 int *count,
unsigned int **feature_codes);
3554 unsigned char *flags,
3555 unsigned char *additional_length,
3556 unsigned char **feature_data,
3557 char **feature_text);
3835#define burn_header_version_major 1
3836#define burn_header_version_minor 5
3837#define burn_header_version_micro 6
3911 char *print_severity,
char *print_id);
3915#define BURN_MSGS_MESSAGE_LEN 4096
3935 int *error_code,
char msg_text[],
int *os_errno,
3958 char severity[],
struct burn_drive *d);
4128 char *data, off_t data_count,
int flag);
4191 char data[], off_t data_size, off_t *data_count,
int flag);
4238 char data[], off_t data_size, off_t *data_count,
int flag);
4260 int start_sector,
int sector_count,
4261 char *target_path,
int flag);
4280 struct burn_track *track,
4281 char *target_path,
int flag);
4369#define LIBDAX_AUDIOXTR_STRLEN 4096
4377struct libdax_audioxtr;
4408 char **fmt,
char **fmt_info,
4409 int *num_channels,
int *sample_rate,
4410 int *bits_per_sample,
int *msb_first,
int flag);
4438 char buffer[],
int buffer_size,
int flag);
4496#define Libburn_dummy_probe_write_modeS 1
4502#define Libburn_disc_with_incomplete_sessioN 1
4510#ifdef Libburn_develop_quality_scaN
4514int burn_nec_optiarc_rep_err_rate(
struct burn_drive *d,
4515 int start_lba,
int rate_period,
int flag);
int burn_drive_get_all_profiles(struct burn_drive *d, int *num_profiles, int profiles[64], char is_current[64])
Gets the list of profile codes supported by the drive.
void burn_write_opts_set_obs_pad(struct burn_write_opts *opts, int pad)
Overrides the automatic decision whether to pad up the last write chunk to its full size.
int burn_disc_pretend_full_uncond(struct burn_drive *drive)
WARNING: This overrides the safety measures against unsuitable media.
int burn_make_input_sheet_v07t(unsigned char *text_packs, int num_packs, int start_tno, int track_count, char **result, int *char_code, int flag)
Convert an array of CD-TEXT packs into the text format of Sony CD-TEXT Input Sheet Version 0....
void burn_set_scsi_logging(int flag)
Enable or disable logging of SCSI commands.
int burn_write_opts_set_simulate(struct burn_write_opts *opts, int sim)
Sets the simulate value for the write_opts struct .
struct burn_source * burn_offst_source_new(struct burn_source *inp, struct burn_source *prev, off_t start, off_t size, int flag)
Creates an offset source which shall provide a byte interval of a stream to its consumer.
int burn_drive_get_min_write_speed(struct burn_drive *d)
Gets the minimum write speed for a drive and eventually loaded media.
char * burn_guess_manufacturer(int profile_no, char *manuf_code, char *media_code, int flag)
Guess the name of a manufacturer by profile number, manufacturer code and media code.
int burn_session_get_sectors(struct burn_session *s)
char * burn_guess_cd_manufacturer(int m_li, int s_li, int f_li, int m_lo, int s_lo, int f_lo, int flag)
Guess the manufacturer name of CD media from the ATIP addresses of lead-in and lead-out.
int burn_track_set_byte_swap(struct burn_track *t, int swap_source_bytes)
Define whether a track shall swap bytes of its input stream.
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.
int burn_msf_to_lba(int m, int s, int f)
Convert a minute-second-frame (MSF) value to an lba.
void burn_track_free(struct burn_track *t)
Free a track.
#define BURN_REASONS_LEN
The length of a rejection reasons string for burn_precheck_write() and burn_write_opts_auto_write_typ...
int burn_session_get_start_tno(struct burn_session *session, int flag)
Inquire the CD track start number, as set by default or by burn_session_set_start_tno().
struct 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_read_opts_fre...
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_severit...
void burn_write_opts_free(struct burn_write_opts *opts)
Frees a write_opts struct created with burn_write_opts_new.
void burn_set_verbosity(int level)
ts A61006 : This is for development only.
int burn_disc_get_profile(struct burn_drive *d, int *pno, char name[80])
Tells the MMC Profile identifier of the loaded media.
int libdax_audioxtr_get_id(struct libdax_audioxtr *xtr, char **fmt, char **fmt_info, int *num_channels, int *sample_rate, int *bits_per_sample, int *msb_first, int flag)
Obtain identification parameters of opened audio source.
void burn_structure_print_session(struct burn_session *s)
int burn_read_data(struct burn_drive *d, off_t byte_address, char data[], off_t data_size, off_t *data_count, int flag)
Read data in random access mode.
void burn_source_free(struct burn_source *s)
Free a burn_source (decrease its refcount and maybe free it)
void burn_disc_format(struct burn_drive *drive, off_t size, int flag)
Format media for use with libburn.
int burn_drive_leave_locked(struct burn_drive *d, int flag)
Like burn_drive_release() but keeping the drive tray closed and its eject button disabled.
int burn_drive_convert_fs_adr(char *path, char adr[])
Try to convert a given existing filesystem address into a drive device file address.
int burn_track_set_postgap_size(struct burn_track *t, int size, int flag)
Define whether a post-gap shall be written at the end of the track and how many sectors this gap shal...
int burn_drive_d_get_adr(struct burn_drive *drive, char adr[])
Inquire the device file address of the given 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.
int burn_drive_get_adr(struct burn_drive_info *drive_info, char adr[])
Inquire the device file address of a drive via a given drive_info object.
int burn_cdtext_from_session(struct burn_session *s, unsigned char **text_packs, int *num_packs, int flag)
Produce an array of CD-TEXT packs that could be submitted to burn_write_opts_set_leadin_text(),...
int burn_drive_set_stream_recording(struct burn_drive *drive, int recmode, int start, int flag)
Control stream recording during the write run and eventually set the start LBA for stream recording.
int burn_drive_reset_simulate(struct burn_drive *d, int simulate)
Control the write simulation mode before or after burn_write_opts get into effect.
int burn_disc_get_phys_format_info(struct burn_drive *d, int *disk_category, char **book_name, int *part_version, int *num_layers, int *num_blocks, int flag)
Retrieve some media information which is mainly specific to media of the DVD-R family: DVD-R ,...
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.
void burn_session_free(struct burn_session *s)
Free a session (and decrease reference count on all tracks inside)
int burn_disc_get_incomplete_sessions(struct burn_disc *d)
Obtains the number of incomplete sessions which are recorded in the result array of burn_disc_get_ses...
int burn_drive_scan(struct burn_drive_info *drive_infos[], unsigned int *n_drives)
Scan for drives.
int burn_session_set_cdtext(struct burn_session *s, int block, int pack_type, char *pack_type_name, unsigned char *payload, int length, int flag)
Attach text or binary data as CD-TEXT attributes to a session.
void burn_write_opts_set_fail21h_sev(struct burn_write_opts *opts, char *severity)
Set the severity to be used with write error messages which are potentially caused by not using write...
int burn_nominal_slowdown(int kb_per_second, int max_corr, struct timeval *prev_time, int *us_corr, off_t b_since_prev, int flag)
Waits until the time has elapsed since the given previous time to transmit the given byte count with ...
int(* burn_abort_handler_t)(void *handle, int signum, int flag)
The prototype of a handler function suitable for burn_set_signal_handling() Such a function has to re...
int burn_track_get_cdtext(struct burn_track *t, int block, int pack_type, char *pack_type_name, unsigned char **payload, int *length, int flag)
Obtain a CD-TEXT attribute that was set by burn_track_set_cdtext().
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_text_to_sev(char *severity_name, int *severity_number, int flag)
Convert a severity name into a severity number, which gives the severity rank of the name.
int burn_drive_snooze(struct burn_drive *d, int flag)
Calm down or alert a drive.
int burn_lookup_device_link(char *dev_adr, char link_adr[], char *dir_adr, char **templ, int num_templ, int flag)
Try to convert a given drive device file address into the address of a symbolic link that points to t...
enum burn_source_status burn_track_set_source(struct burn_track *t, struct burn_source *s)
Set the track's data source.
struct burn_drive * burn_write_opts_get_drive(struct burn_write_opts *opts)
Inquires the drive associated with a burn_write_opts object.
int burn_disc_get_leadin_text(struct burn_drive *d, unsigned char **text_packs, int *num_packs, int flag)
Read the array of CD-TEXT packs from the Lead-in of an audio CD.
void burn_write_opts_set_has_mediacatalog(struct burn_write_opts *opts, int has_mediacatalog)
This call activates the Media Catalog Number for writing.
int burn_disc_read_atip(struct burn_drive *drive)
Reads ATIP information from inserted media.
void burn_write_opts_set_format(struct burn_write_opts *opts, int format)
Sets the session format for a disc.
burn_block_types
Data format to send to the drive.
@ BURN_BLOCK_SAO
SAO block sizes are based on cue sheet, so use this.
@ BURN_BLOCK_MODE2_OBSCURE
2324 bytes of data provided by lib/user subheader provided in write parameters no sir,...
@ BURN_BLOCK_MODE2_PATHETIC
2048 bytes of user data provided by lib/user subheader provided in write parameters are we ever going...
@ BURN_BLOCK_MODE2_OK
2332 bytes of data supplied by lib/user 8 bytes sub header provided in write parameters this is the s...
@ BURN_BLOCK_RAW0
sync, headers, edc/ecc provided by lib/user
@ BURN_BLOCK_RAW96P
sync, headers, edc/ecc and packed p-w subs provided by lib/user
@ BURN_BLOCK_MODE2_LAME
2048 bytes of data + 8 byte subheader provided by lib/user hey, this is also dumb
@ BURN_BLOCK_RAW16
sync, headers, edc/ecc and p/q subs provided by lib/user
@ BURN_BLOCK_MODE1
only 2048 bytes of user data provided by lib/user
@ BURN_BLOCK_MODE2R
2336 bytes of user data provided by lib/user
@ BURN_BLOCK_RAW96R
sync, headers, edc/ecc and raw p-w subs provided by lib/user
void burn_write_opts_set_stdio_fsync(struct burn_write_opts *opts, int rhythm)
Sets the rhythm by which stdio pseudo drives force their output data to be consumed by the receiving ...
void * burn_os_alloc_buffer(size_t amount, int flag)
Allocate a memory area that is suitable for reading with a file descriptor opened by burn_os_open_tra...
int libdax_audioxtr_get_size(struct libdax_audioxtr *o, off_t *size, int flag)
Obtain a prediction about the extracted size based on internal information of the formatted file.
int burn_track_get_mode(struct burn_track *track)
Gets the mode of a track.
void burn_version(int *major, int *minor, int *micro)
Returns the library's version in its parts.
void burn_write_opts_set_stream_recording(struct burn_write_opts *opts, int value)
Eventually makes use of the more modern write command AAh WRITE12 and sets the Streaming bit.
int burn_disc_get_multi_caps(struct burn_drive *d, enum burn_write_types wt, struct burn_multi_caps **caps, int flag)
Allocates a struct burn_multi_caps (see above) and fills it with values which are appropriate for the...
int burn_drive_grab(struct burn_drive *drive, int load)
Grab a drive.
int burn_track_clear_indice(struct burn_track *t, int flag)
Remove all index start addresses and reset to the default indexing of CD SAO sessions.
void burn_write_opts_set_fillup(struct burn_write_opts *opts, int fill_up_media)
Caution: still immature and likely to change.
burn_drive_status
Possible busy states for a drive.
@ BURN_DRIVE_FORMATTING
The drive is formatting media.
@ BURN_DRIVE_READING_SYNC
The drive is busy in synchronous read (if you see this then it has been interrupted)
@ BURN_DRIVE_WRITING_LEADIN
The drive is writing Lead-In.
@ BURN_DRIVE_WRITING
The drive is writing data to a disc.
@ BURN_DRIVE_CLOSING_SESSION
The drive is told to close a session (TAO only)
@ BURN_DRIVE_GRABBING
The drive is being grabbed.
@ BURN_DRIVE_WRITING_LEADOUT
The drive is writing Lead-Out.
@ BURN_DRIVE_ERASING
The drive is erasing a disc.
@ BURN_DRIVE_WRITING_SYNC
The drive is busy in synchronous write (if you see this then it has been interrupted)
@ BURN_DRIVE_SPAWNING
The library is spawning the processes to handle a pending operation (A read/write/etc is about to sta...
@ BURN_DRIVE_CLOSING_TRACK
The drive is told to close a track (TAO only)
@ BURN_DRIVE_WRITING_PREGAP
The drive gets written zeroes before the track payload data.
@ BURN_DRIVE_READING
The drive is reading data from a disc.
@ BURN_DRIVE_IDLE
The drive is not in an operation.
void burn_drive_get_feature_codes(struct burn_drive *d, int *count, unsigned int **feature_codes)
Obtains the list of SCSI Feature Codes from feature descriptors which were obtained from the drive wh...
int burn_os_free_buffer(void *buffer, size_t amount, int flag)
Dispose a memory area which was obtained by burn_os_alloc_buffer(),.
int burn_disc_get_cd_info(struct burn_drive *d, char disc_type[80], unsigned int *disc_id, char bar_code[9], int *app_code, int *valid)
Retrieve some media information which is mainly specific to CD.
int burn_write_opts_set_underrun_proof(struct burn_write_opts *opts, int underrun_proof)
Controls buffer underrun prevention.
int burn_set_messenger(void *messenger)
Replace the messenger object handle of libburn by a compatible handle obtained from a related library...
struct burn_disc * burn_disc_create(void)
Create a new 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.
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.
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_set_c2errors(struct burn_read_opts *opts, int c2errors)
Sets whether to report c2 errors or not.
int libdax_audioxtr_destroy(struct libdax_audioxtr **xtr, int flag)
Clean up after extraction and destroy extractor object.
void burn_write_opts_set_dvd_obs(struct burn_write_opts *opts, int obs)
Overrides the write chunk size for DVD and BD media which is normally determined according to media t...
void burn_set_signal_handling(void *handle, burn_abort_handler_t handler, int mode)
Control built-in signal handling.
int burn_drive_probe_cd_write_modes(struct burn_drive_info *drive_info)
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 drive device file address.
int burn_disc_get_bd_spare_info(struct burn_drive *d, int *alloc_blocks, int *free_blocks, int flag)
Read the current usage of the eventual BD Spare Area.
int burn_drive_free_speedlist(struct burn_speed_descriptor **speed_list)
Dispose a speed descriptor list copy which was obtained by burn_drive_get_speedlist().
int burn_track_set_isrc_string(struct burn_track *t, char isrc[13], int flag)
Set the composed ISRC string for a track.
int burn_initialize(void)
Initialize the library.
void burn_fifo_get_statistics(struct burn_source *fifo, int *total_min_fill, int *interval_min_fill, int *put_counter, int *get_counter, int *empty_counter, int *full_counter)
Inquire various counters which reflect the fifo operation.
int burn_track_set_index(struct burn_track *t, int index_number, unsigned int relative_lba, int flag)
Define an index start address within a track.
int burn_os_open_track_src(char *path, int open_flags, int flag)
Opens a file with eventual acceleration preparations which may depend on the operating system and on ...
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.
int burn_track_set_size(struct burn_track *t, off_t size)
Sets a fixed track size after the data source object has already been created.
void burn_track_clear_isrc(struct burn_track *t)
Disable ISRC parameters for a track.
int libdax_audioxtr_read(struct libdax_audioxtr *xtr, char buffer[], int buffer_size, int flag)
Obtain next buffer full of extracted data in desired format (only raw audio for now).
int burn_drive_extract_audio(struct burn_drive *drive, int start_sector, int sector_count, char *target_path, int flag)
Extract an interval of audio sectors from CD and store it as a WAVE audio file on hard disk.
int libdax_audioxtr_new(struct libdax_audioxtr **xtr, char *path, int flag)
Open an audio file, check whether suitable, create extractor object.
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 dur...
void burn_write_opts_set_bdr_obs_exempt(struct burn_write_opts *opts, int value)
Exempts BD-R media from the elsewise unavoidable automatic padding of the last write chunk to its ful...
void burn_drive_set_speed(struct burn_drive *d, int read, int write)
Sets drive read and write speed.
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_msf_to_sectors(int m, int s, int f)
Convert a minute-second-frame (MSF) value to sector count.
int burn_drive_was_feat21_failure(struct burn_drive *d)
Inquire whether a write error occurred which is suspected to have happened due to a false report abou...
int burn_track_set_cdtext(struct burn_track *t, int block, int pack_type, char *pack_type_name, unsigned char *payload, int length, int flag)
Attach text or binary data as CD-TEXT attributes to a track.
int burn_disc_close_damaged(struct burn_write_opts *o, int flag)
Try to close the last track and session of media which have bit0 set in the return value of call burn...
int burn_disc_get_format_descr(struct burn_drive *drive, int index, int *type, off_t *size, unsigned *tdp)
Inquire parameters of an available media format.
int burn_disc_pretend_full(struct burn_drive *drive)
WARNING: This overrides the safety measures against unsuitable media.
int burn_track_set_pregap_size(struct burn_track *t, int size, int flag)
Define whether a pre-gap shall be written before the track and how many sectors this pre-gap shall ha...
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_disc_write(struct burn_write_opts *o, struct burn_disc *disc)
Write a disc in the drive.
void burn_drive_release(struct burn_drive *drive, int eject)
Release a drive.
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_erasable(struct burn_drive *d)
Tells whether a disc can be erased or not.
void burn_drive_cancel(struct burn_drive *drive)
Cancel an operation on a drive.
struct 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,...
int burn_drive_get_media_sno(struct burn_drive *d, char **sno, int *sno_len)
Returns the Media Serial Number as of MMC feature 109h and command ABh READ MEDIA SERIAL NUMBER.
void burn_lba_to_msf(int lba, int *m, int *s, int *f)
Convert an lba to minute-second-frame (MSF)
int burn_track_dispose_cdtext(struct burn_track *t, int block)
Remove all CD-TEXT attributes of the given block from the track.
int burn_drive_wrote_well(struct burn_drive *d)
Inquire whether the most recent asynchronous media job was successful.
int burn_drive_add_whitelist(char *device_address)
Add a device to the list of permissible drives.
int burn_drive_set_speed_exact(struct burn_drive *d, int read, int write)
Sets drive read and write speed using the "Exact" bit of SCSI command SET STREAMING.
void burn_write_opts_set_force(struct burn_write_opts *opts, int use_force)
Lets libburn ignore the failure of some conformance checks:
void burn_disc_erase(struct burn_drive *drive, int fast)
Erase a disc in the drive.
enum burn_write_types burn_write_opts_auto_write_type(struct burn_write_opts *opts, struct burn_disc *disc, char reasons[BURN_REASONS_LEN], int flag)
As an alternative to burn_write_opts_set_write_type() this function tries to find a suitable write ty...
off_t burn_disc_available_space(struct burn_drive *d, struct burn_write_opts *o)
Return the best possible estimation of the currently available capacity of the media.
int burn_session_set_cdtext_par(struct burn_session *s, int char_codes[8], int copyrights[8], int languages[8], int flag)
Set the Character Codes, the Copyright bytes, and the Language Codes for CD-TEXT blocks 0 to 7.
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.
int burn_drive_get_speedlist(struct burn_drive *d, struct burn_speed_descriptor **speed_list)
Obtain a copy of the current speed descriptor list.
int burn_track_set_default_size(struct burn_track *t, off_t size)
Set a default track size to be used only if the track turns out to be of unpredictable length and if ...
burn_write_types
Possible disc writing style/modes.
@ BURN_WRITE_RAW
With CD: Raw disc at once recording.
@ BURN_WRITE_PACKET
Packet writing.
@ BURN_WRITE_TAO
With CD: Track At Once recording 2s gaps between tracks, no fonky lead-ins.
@ BURN_WRITE_SAO
With CD: Session At Once Block type MUST be BURN_BLOCK_SAO ts A70122: Currently not capable of mixing...
@ BURN_WRITE_NONE
In replies this indicates that not any writing will work.
int burn_fifo_fill(struct burn_source *fifo, int fill, int flag)
Start the fifo worker thread and wait either until the requested number of bytes have arrived or unti...
int burn_is_aborting(int flag)
void burn_structure_print_track(struct burn_track *t)
enum burn_drive_status burn_drive_get_status(struct burn_drive *drive, struct burn_progress *p)
Returns the progress and status of a drive.
void burn_fifo_next_interval(struct burn_source *fifo, int *interval_min_fill)
Inquire the fifo minimum fill counter for intervals and reset that counter.
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.
int burn_obtain_profile_name(int profile_code, char name[80])
Obtains the profile name associated with a profile code.
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.
int burn_drive_set_immed(struct burn_drive *drive, int enable)
Enable or disable use of the Immed bit with long running SCSI commands.
int burn_session_set_start_tno(struct burn_session *session, int tno, int flag)
Set the number which shall be written as CD track number with the first track of the session.
int burn_abort(int patience, int(*pacifier_func)(void *handle, int patience, int elapsed), void *handle)
Abort any running drive operation and eventually call burn_finish().
int burn_session_by_cue_file(struct burn_session *session, char *path, int fifo_size, struct burn_source **fifo, unsigned char **text_packs, int *num_packs, int flag)
Read a CDRWIN cue sheet file and equip the session object by tracks and CD-TEXT according to the cont...
int burn_drive_get_bd_r_pow(struct burn_drive *drive)
Tells whether a BD-R medium with Pseudo Overwrite (POW) formatting is in the drive.
int burn_drive_get_drive_role(struct burn_drive *d)
Inquire whether the drive object is a real MMC drive or a pseudo-drive created by a stdio: address.
struct 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...
burn_source_status
Possible data source return values.
@ BURN_SOURCE_EOF
The source is at end of file.
@ BURN_SOURCE_OK
The source is ok.
@ BURN_SOURCE_FAILED
The source is unusable.
int burn_disc_free_multi_caps(struct burn_multi_caps **caps)
Removes from memory a multi session info structure which was returned by burn_disc_get_multi_caps().
int burn_drive_equals_adr(struct burn_drive *d1, char *adr2, int drive_role2)
Find out whether a given address string would lead to the given drive object.
struct burn_source * burn_fifo_source_new(struct burn_source *inp, int chunksize, int chunks, int flag)
Creates a fifo which acts as proxy for an already existing data source.
int burn_drive_is_enumerable_adr(char *adr)
Evaluate whether the given address would be a drive device file address which could be listed by a ru...
int burn_random_access_write(struct burn_drive *d, off_t byte_address, char *data, off_t data_count, int flag)
Write data in random access mode.
int burn_fifo_peek_data(struct burn_source *fifo, char *buf, int bufsize, int flag)
Obtain a preview of the first input data of a fifo which was created by burn_fifo_source_new().
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_session_hide_first_track(struct burn_session *s, int onoff)
Hide the first track in the "pre gap" of the disc.
void burn_allow_untested_profiles(int yes)
Allows the use of media types which are implemented in libburn but not yet tested.
int burn_session_remove_track(struct burn_session *s, struct burn_track *t)
Remove a track from a session.
int burn_drive_re_assess(struct burn_drive *d, int flag)
Re-assess drive and media status.
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.
int burn_drive_get_feature(struct burn_drive *d, unsigned int feature_code, unsigned char *flags, unsigned char *additional_length, unsigned char **feature_data, char **feature_text)
Obtains the fields and data of a particular feature which were obtained from the drive when it was la...
struct burn_session * burn_session_create(void)
Create a new session.
void burn_read_opts_report_recovered_errors(struct burn_read_opts *opts, int report_recovered_errors)
Sets whether to report recovered errors or not.
int burn_disc_get_sectors(struct burn_disc *d)
int burn_session_get_cdtext(struct burn_session *s, int block, int pack_type, char *pack_type_name, unsigned char **payload, int *length, int flag)
Obtain a CD-TEXT attribute that was set by burn_session_set_cdtext()
void burn_write_opts_set_start_byte(struct burn_write_opts *opts, off_t value)
Sets a start address for writing to media and write modes which are able to choose this address at al...
void burn_finish(void)
Shutdown the library.
int burn_sev_to_text(int severity_number, char **severity_name, int flag)
Convert a severity number into a severity name.
int burn_disc_pretend_blank(struct burn_drive *drive)
WARNING: This revives an old bug-like behavior that might be dangerous.
int burn_session_get_hidefirst(struct burn_session *session)
Returns whether the first track of a session is hidden in the pregap.
int burn_read_audio(struct burn_drive *d, int sector_no, char data[], off_t data_size, off_t *data_count, int flag)
Read CD audio sectors in random access mode.
int burn_disc_get_formats(struct burn_drive *drive, int *status, off_t *size, unsigned *bl_sas, int *num_formats)
Inquire the formatting status, the associated sizes and the number of available formats.
void burn_sectors_to_msf(int sectors, int *m, int *s, int *f)
Convert a sector count to minute-second-frame (MSF)
enum burn_disc_status burn_disc_get_status(struct burn_drive *drive)
Returns what kind of disc a drive is holding.
int burn_session_dispose_cdtext(struct burn_session *s, int block)
Remove all CD-TEXT attributes of the given block from the session.
int burn_session_get_cdtext_par(struct burn_session *s, int char_codes[8], int copyrights[8], int block_languages[8], int flag)
Obtain the current settings as of burn_session_set_cdtext_par()
int burn_precheck_write(struct burn_write_opts *o, struct burn_disc *disc, char reasons[BURN_REASONS_LEN], int silent)
Examines a completed setup for burn_disc_write() whether it is permissible with drive and media.
int burn_disc_next_track_is_damaged(struct burn_drive *d, int flag)
Tells whether a previous attempt to determine the Next Writeable Address of the upcoming track reveil...
void burn_disc_free(struct burn_disc *d)
Delete disc and decrease the reference count on all its sessions.
int burn_cdtext_from_packfile(char *path, unsigned char **text_packs, int *num_packs, int flag)
Read an array of CD-TEXT packs from a file.
int burn_msgs_submit(int error_code, char msg_text[], int os_errno, char severity[], struct burn_drive *d)
Submit a message to the libburn queueing system.
int burn_disc_get_msc1(struct burn_drive *d, int *start_lba)
Read start lba of the first track in the last complete session.
void burn_drive_info_free(struct burn_drive_info drive_infos[])
When no longer needed, free a whole burn_drive_info array which was returned by burn_drive_scan().
void burn_write_opts_set_multi(struct burn_write_opts *opts, int multi)
Sets the multi flag which eventually marks the emerging session as not being the last one and thus cr...
int burn_abort_pacifier(void *handle, int patience, int elapsed)
A pacifier function suitable for burn_abort.
void burn_read_opts_free(struct burn_read_opts *opts)
Frees a read_opts struct created with burn_read_opts_new.
burn_disc_status
Possible status of the drive in regard to the disc in it.
@ BURN_DISC_UNREADY
The current status is not yet known.
@ BURN_DISC_EMPTY
There is no disc at all in the drive.
@ BURN_DISC_UNGRABBED
The drive was not grabbed when the status was inquired.
@ BURN_DISC_BLANK
The drive holds a blank disc.
@ BURN_DISC_UNSUITABLE
The media seems to be unsuitable for reading and for writing.
@ BURN_DISC_APPENDABLE
There is an incomplete disc in the drive.
@ BURN_DISC_FULL
There is a disc with data on it in the drive.
int burn_drive_get_read_speed(struct burn_drive *d)
Gets the maximum read speed for a drive.
void burn_drive_clear_whitelist(void)
Remove all drives from whitelist.
struct burn_write_opts * burn_write_opts_new(struct burn_drive *drive)
Creates a write_opts struct for burning to the specified drive.
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_write_opts_set_leadin_text(struct burn_write_opts *opts, unsigned char *text_packs, int num_packs, int flag)
Submit an array of CD-TEXT packs which shall be written to the Lead-in of a SAO write run on CD.
char * burn_scsi_transport_id(int flag)
Note: Above version numbers are also recorded in configure.ac because libtool wants them as parameter...
int burn_get_read_capacity(struct burn_drive *d, int *capacity, int flag)
Inquire the maximum amount of readable data.
struct burn_disc * burn_drive_get_disc(struct burn_drive *d)
Get the drive's disc struct - free when done.
void burn_write_opts_set_mediacatalog(struct burn_write_opts *opts, unsigned char mediacatalog[13])
The Q sub-channel of a CD may contain a Media Catalog Number of 13 decimal digits.
struct burn_track * burn_track_create(void)
Create a track.
int burn_disc_remove_session(struct burn_disc *d, struct burn_session *s)
Remove a session from a disc.
int libdax_audioxtr_detach_fd(struct libdax_audioxtr *o, int *fd, int flag)
Try to obtain a file descriptor which will deliver extracted data to normal calls of read(2).
int burn_track_get_sectors(struct burn_track *)
Tells how many sectors a track will have on disc, or already has on disc.
void burn_preset_device_open(int exclusive, int blocking, int abort_on_busy)
Set parameters for behavior on opening device files.
int burn_drive_get_write_speed(struct burn_drive *d)
Gets the maximum write speed for a drive and eventually loaded media.
int burn_drive_scan_and_grab(struct burn_drive_info *drive_infos[], char *adr, int load)
Acquire a drive with known device file address.
int burn_drive_get_immed(struct burn_drive *drive)
Inquire the current setting of usage of the Immed bit.
int burn_disc_get_media_id(struct burn_drive *d, char **product_id, char **media_code1, char **media_code2, char **book_type, int flag)
Obtain product id and standards defined media codes.
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_track_define_data(struct burn_track *t, int offset, int tail, int pad, int mode)
Define the data in a track.
int burn_drive_extract_audio_track(struct burn_drive *drive, struct burn_track *track, char *target_path, int flag)
Extract all audio sectors of a track from CD and store them as a WAVE audio file on hard disk.
int burn_session_input_sheet_v07t(struct burn_session *session, char *path, int block, int flag)
Read a Sony CD-TEXT Input Sheet Version 0.7T file and attach its text attributes to the given session...
int burn_drive_get_serial_no(struct burn_drive *d, char **sno, int *sno_len)
Returns the Drive Serial Number as of MMC feature 108h.
struct burn_session ** burn_disc_get_sessions(struct burn_disc *d, int *num)
Gets an array of all complete sessions for the disc THIS IS NO LONGER VALID AFTER YOU ADD OR REMOVE A...
int burn_fifo_inquire_status(struct burn_source *fifo, int *size, int *free_bytes, char **status_text)
Inquires state and fill parameters of a fifo burn_source which was created by burn_fifo_source_new() ...
int burn_track_set_cdxa_conv(struct burn_track *t, int value)
Activates CD XA compatibility modes.
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.
struct burn_source * burn_file_source_new(const char *path, const char *subpath)
Creates a data source for an image file (and maybe subcode file)
void burn_structure_print_disc(struct burn_disc *d)
int burn_drive_set_buffer_waiting(struct burn_drive *d, int enable, int min_usec, int max_usec, int timeout_sec, int min_percent, int max_percent)
Controls the behavior with writing when the drive buffer is suspected to be full.
char * burn_list_sev_texts(int flag)
Return a blank separated list of severity names.
void burn_allow_drive_role_4(int allowed)
Allow drive role 4 "random access read-only" and drive role 5 "random access write-only".
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.
int burn_drive_get_best_speed(struct burn_drive *d, int speed_goal, struct burn_speed_descriptor **best_descr, int flag)
Look up the fastest speed descriptor which is not faster than the given speed_goal.
Information on a drive in the system.
char location[17]
Invalid: Was: "Location of the drive in the filesystem.".
unsigned int read_cdr
Can the drive read CD-R discs.
unsigned int write_simulate
Can the drive simulate a write.
unsigned int write_dvdr
Can the drive write DVD-R discs.
unsigned int read_cdrw
Can the drive read CD-RW discs.
int packet_block_types
The supported block types in packet mode.
unsigned int read_dvdrom
Can the drive read DVD-ROM discs.
char product[17]
Name of the drive.
int sao_block_types
The supported block types in sao mode.
int tao_block_types
The supported block types in tao mode.
unsigned int write_cdrw
Can the drive write CD-RW discs.
unsigned int read_dvdr
Can the drive read DVD-R discs.
int buffer_size
DEPRECATED: The size of the drive's buffer (in kilobytes)
unsigned int read_dvdram
Can the drive read DVD-RAM discs.
struct burn_drive * drive
The value by which this drive can be indexed when using functions in the library.
unsigned int write_cdr
Can the drive write CD-R discs.
int raw_block_types
The supported block types in raw mode.
unsigned int write_dvdram
Can the drive write DVD-RAM discs.
char revision[5]
Revision of the drive.
unsigned int c2_errors
DEPRECATED: Can the drive report C2 errors.
char vendor[9]
Name of the vendor of the drive.
The reply structure for burn_disc_get_multi_caps()
int current_profile
Profile number which was current when the reply was generated.
int might_simulate
Whether the current profile is able to perform simulated write.
off_t start_alignment
The alignment for start addresses.
int might_do_tao
Potential availability of write modes 4= needs no size prediction, not to be chosen automatically 3= ...
off_t start_range_low
The lowest permissible start address.
enum burn_write_types selected_write_mode
Write mode as given by parameter wt of burn_disc_get_multi_caps().
off_t start_range_high
The highest addressable start address.
enum burn_write_types advised_write_mode
Generally advised write mode.
int current_is_cd_profile
Whether the current profile indicates CD media.
Operation progress report.
off_t buffered_bytes
The number of bytes sent to the drive buffer.
int session
Current session.
unsigned buffer_min_fill
The minimum number of bytes stored in buffer during write.
int start_sector
The starting logical block address.
unsigned buffer_capacity
The capacity of the drive buffer.
int tracks
The total number of tracks.
int sector
On write: The current sector being processed.
int sessions
The total number of sessions.
int indices
The total number of indices.
unsigned buffer_available
The free space in the drive buffer (might be slightly outdated)
int sectors
On write: The number of sectors.
Data source interface for tracks.
int(* set_size)(struct burn_source *source, off_t size)
Program the reply of (*get_size) to a fixed value.
void(* free_data)(struct burn_source *)
Clean up the source specific data.
off_t(* get_size)(struct burn_source *)
Get the size of the source's data.
int(* read_sub)(struct burn_source *, unsigned char *buffer, int size)
Read subchannel data from the source (NULL if lib generated) WARNING: This is an obscure feature with...
int(* read)(struct burn_source *, unsigned char *buffer, int size)
Read data from the source.
int(* cancel)(struct burn_source *source)
Informs the burn_source that the consumer of data prematurely ended reading.
struct burn_source * next
Next source, for when a source runs dry and padding is disabled WARNING: This is an obscure feature.
int refcount
Reference count for the data source.
void * data
Source specific data.
int(* read_xt)(struct burn_source *, unsigned char *buffer, int size)
This substitutes for (*read)() in versions above 0.
int version
Valid only if above member .
Description of a speed capability as reported by the drive in conjunction with eventually loaded medi...
struct burn_speed_descriptor * next
int wrc
Expert info from ACh GET PERFORMANCE and/or mode page 2Ah.
struct burn_speed_descriptor * prev
List chaining.
int end_lba
The attributed capacity of appropriate media in logical block units i.e.
int profile_loaded
The media type that was current at the time of report -2 = state unknown, -1 = no media was loaded ,...
int write_speed
Speed is given in 1000 bytes/s , 0 = invalid.
int source
Where this info comes from : 0 = misc 1 = mode page 2Ah 2 = ACh GET PERFORMANCE Type 03h 3 = ACh GET ...
Information about a track on a disc - this is from the q sub channel of the lead-in area of a disc.
unsigned char adr
Type of data.
unsigned char extensions_valid
unsigned char psec
Track start time seconds for normal tracks.
unsigned char pmin
Track start time minutes for normal tracks.
int last_recorded_address
unsigned char point
Track number or special information.
unsigned char session
Session the track is in.
unsigned char control
Type of data in the track.
unsigned char pframe
Track start time frames for normal tracks.
unsigned char session_msb