30 #include <sys/types.h> 34 #if defined(__cplusplus) 35 #define BURN_BEGIN_DECLS \ 38 #define BURN_END_DECLS \ 42 #define BURN_BEGIN_DECLS 43 #define BURN_END_DECLS 64 struct burn_write_opts;
71 #define BURN_CDXA 0x20 73 #define BURN_POS_END 100 76 #define BURN_MODE_BITS 127 81 #define BURN_MODE0 (1 << 0) 85 #define BURN_MODE_RAW (1 << 1) 89 #define BURN_MODE1 (1 << 2) 94 #define BURN_MODE2 (1 << 3) 98 #define BURN_FORM1 (1 << 4) 102 #define BURN_FORM2 (1 << 5) 110 #define BURN_AUDIO (1 << 6) 112 #define BURN_4CH (1 << 7) 114 #define BURN_COPY (1 << 8) 116 #define BURN_PREEMPHASIS (1 << 9) 118 #define BURN_SUBCODE_P16 (1 << 10) 120 #define BURN_SUBCODE_P96 (1 << 11) 122 #define BURN_SUBCODE_R96 (1 << 12) 130 #define BURN_SCMS (1 << 13) 804 int (*pacifier_func)(
void *handle,
int patience,
int elapsed),
965 char* adr,
int load);
971 #define BURN_DRIVE_WHITELIST_LEN 255 1008 unsigned int *n_drives);
1038 #define BURN_DRIVE_ADR_LEN 1024 1102 int target_no,
int lun_no,
char adr[]);
1135 char *dir_adr,
char **templ,
int num_templ,
int flag);
1146 int *channel_no,
int *target_no,
int *lun_no);
1341 int *start_lba,
int *
end_lba,
int flag);
1366 int m_lo,
int s_lo,
int f_lo,
int flag);
1395 unsigned int *disc_id,
char bar_code[9],
int *app_code,
1419 unsigned char **text_packs,
int *num_packs,
1437 int *alloc_blocks,
int *free_blocks,
int flag);
1457 char **book_name,
int *part_version,
int *num_layers,
1458 int *num_blocks,
int flag);
1479 int trackno,
int *lba,
int *nwa);
1550 struct burn_write_opts *o);
1616 char **product_id,
char **media_code1,
char **media_code2,
1617 char **book_type,
int flag);
1636 char *manuf_code,
char *media_code,
int flag);
1750 #define BURN_FORMAT_IS_UNFORMATTED 1 1751 #define BURN_FORMAT_IS_FORMATTED 2 1752 #define BURN_FORMAT_IS_UNKNOWN 3 1776 unsigned *bl_sas,
int *num_formats);
1794 int *type, off_t *size,
unsigned *tdp);
1805 void burn_disc_read(
struct burn_drive *drive,
const struct burn_read_opts *o);
1814 #define BURN_REASONS_LEN 4096 1849 void burn_disc_write(
struct burn_write_opts *o,
struct burn_disc *disc);
1871 int start,
int flag);
2048 char *path,
int fifo_size,
struct burn_source **fifo,
2049 unsigned char **text_packs,
int *num_packs,
int flag);
2138 int char_codes[8],
int copyrights[8],
2139 int languages[8],
int flag);
2148 #define BURN_CDTEXT_LANGUAGES_0X00 \ 2149 "Unknown", "Albanian", "Breton", "Catalan", \ 2150 "Croatian", "Welsh", "Czech", "Danish", \ 2151 "German", "English", "Spanish", "Esperanto", \ 2152 "Estonian", "Basque", "Faroese", "French", \ 2153 "Frisian", "Irish", "Gaelic", "Galician", \ 2154 "Icelandic", "Italian", "Lappish", "Latin", \ 2155 "Latvian", "Luxembourgian", "Lithuanian", "Hungarian", \ 2156 "Maltese", "Dutch", "Norwegian", "Occitan", \ 2157 "Polish", "Portuguese", "Romanian", "Romansh", \ 2158 "Serbian", "Slovak", "Slovenian", "Finnish", \ 2159 "Swedish", "Turkish", "Flemish", "Wallon" 2169 #define BURN_CDTEXT_LANGUAGES_0X45 \ 2170 "Zulu", "Vietnamese", "Uzbek", \ 2171 "Urdu", "Ukrainian", "Thai", "Telugu", \ 2172 "Tatar", "Tamil", "Tadzhik", "Swahili", \ 2173 "Sranan Tongo", "Somali", "Sinhalese", "Shona", \ 2174 "Serbo-croat", "Ruthenian", "Russian", "Quechua", \ 2175 "Pushtu", "Punjabi", "Persian", "Papamiento", \ 2176 "Oriya", "Nepali", "Ndebele", "Marathi", \ 2177 "Moldavian", "Malaysian", "Malagasay", "Macedonian", \ 2178 "Laotian", "Korean", "Khmer", "Kazakh", \ 2179 "Kannada", "Japanese", "Indonesian", "Hindi", \ 2180 "Hebrew", "Hausa", "Gurani", "Gujurati", \ 2181 "Greek", "Georgian", "Fulani", "Dari", \ 2182 "Churash", "Chinese", "Burmese", "Bulgarian", \ 2183 "Bengali", "Bielorussian", "Bambora", "Azerbaijani", \ 2184 "Assamese", "Armenian", "Arabic", "Amharic" 2194 #define BURN_CDTEXT_FILLER \ 2214 int char_codes[8],
int copyrights[8],
2215 int block_languages[8],
int flag);
2266 int pack_type,
char *pack_type_name,
2267 unsigned char *payload,
int length,
int flag);
2276 #define BURN_CDTEXT_GENRE_LIST \ 2277 "Not Used", "Not Defined", "Adult Contemporary", "Alternative Rock", \ 2278 "Childrens Music", "Classical", "Contemporary Christian", "Country", \ 2279 "Dance", "Easy Listening", "Erotic", "Folk", \ 2280 "Gospel", "Hip Hop", "Jazz", "Latin", \ 2281 "Musical", "New Age", "Opera", "Operetta", \ 2282 "Pop Music", "Rap", "Reggae", "Rock Music", \ 2283 "Rhythm & Blues", "Sound Effects", "Spoken Word", "World Music" 2287 #define BURN_CDTEXT_NUM_GENRES 28 2313 int pack_type,
char *pack_type_name,
2314 unsigned char **payload,
int *length,
int flag);
2348 char *path,
int block,
int flag);
2375 unsigned char **text_packs,
int *num_packs,
2418 int start_tno,
int track_count,
2419 char **result,
int *char_code,
int flag);
2452 int *num_packs,
int flag);
2501 int pack_type,
char *pack_type_name,
2502 unsigned char *payload,
int length,
int flag);
2524 int pack_type,
char *pack_type_name,
2525 unsigned char **payload,
int *length,
int flag);
2567 unsigned char year,
unsigned int serial);
2605 unsigned int relative_lba,
int flag);
2719 const char *subpath);
2827 off_t start, off_t size,
int flag);
2874 int chunksize,
int chunks,
int flag);
2896 int *free_bytes,
char **status_text);
2914 int *total_min_fill,
int *interval_min_fill,
2915 int *put_counter,
int *get_counter,
2916 int *empty_counter,
int *full_counter);
2996 off_t *read_bytes, off_t *written_bytes);
3045 int min_usec,
int max_usec,
int timeout_sec,
3046 int min_percent,
int max_percent);
3105 struct burn_write_opts *opts,
struct burn_disc *disc,
3156 int underrun_proof);
3174 unsigned char mediacatalog[13]);
3183 int has_mediacatalog);
3244 unsigned char *text_packs,
3245 int num_packs,
int flag);
3367 int subcodes_audio);
3381 int hardware_error_recovery);
3388 int report_recovered_errors);
3395 int transfer_damaged_blocks);
3402 unsigned char hardware_error_retries);
3419 int profiles[64],
char is_current[64]);
3707 #define burn_header_version_major 1 3708 #define burn_header_version_minor 4 3709 #define burn_header_version_micro 8 3783 char *print_severity,
char *print_id);
3787 #define BURN_MSGS_MESSAGE_LEN 4096 3807 int *error_code,
char msg_text[],
int *os_errno,
3830 char severity[],
struct burn_drive *d);
4000 char *data, off_t data_count,
int flag);
4060 char data[], off_t data_size, off_t *data_count,
int flag);
4107 char data[], off_t data_size, off_t *data_count,
int flag);
4129 int start_sector,
int sector_count,
4130 char *target_path,
int flag);
4149 struct burn_track *track,
4150 char *target_path,
int flag);
4238 #define LIBDAX_AUDIOXTR_STRLEN 4096 4246 struct libdax_audioxtr;
4277 char **fmt,
char **fmt_info,
4278 int *num_channels,
int *sample_rate,
4279 int *bits_per_sample,
int *msb_first,
int flag);
4307 char buffer[],
int buffer_size,
int flag);
4365 #define Libburn_dummy_probe_write_modeS 1 4371 #define Libburn_disc_with_incomplete_sessioN 1 4379 #ifdef Libburn_develop_quality_scaN 4383 int burn_nec_optiarc_rep_err_rate(
struct burn_drive *d,
4384 int start_lba,
int rate_period,
int flag);
2324 bytes of data provided by lib/user subheader provided in write parameters no sir...
void burn_disc_write(struct burn_write_opts *o, struct burn_disc *disc)
Write a disc in the drive.
The drive is formatting media.
The current status is not yet known.
void burn_write_opts_free(struct burn_write_opts *opts)
Frees a write_opts struct created with burn_write_opts_new.
int burn_session_get_sectors(struct burn_session *s)
Information about a track on a disc - this is from the q sub channel of the lead-in area of a disc...
Operation progress report.
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 ...
With CD: Session At Once Block type MUST be BURN_BLOCK_SAO ts A70122: Currently not capable of mixing...
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...
The drive is reading data from a disc.
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_write_opts * burn_write_opts_new(struct burn_drive *drive)
Creates a write_opts struct for burning to the specified drive.
int burn_disc_pretend_full(struct burn_drive *drive)
WARNING: This overrides the safety measures against unsuitable media.
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 ...
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_disc_erase(struct burn_drive *drive, int fast)
Erase a disc in the drive.
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_set_immed(struct burn_drive *drive, int enable)
Enable or disable use of the Immed bit with long running SCSI commands.
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...
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_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.
off_t(* get_size)(struct burn_source *)
Get the size of the source's data.
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...
struct burn_drive * burn_write_opts_get_drive(struct burn_write_opts *opts)
Inquires the drive associated with a burn_write_opts object.
void burn_write_opts_set_fillup(struct burn_write_opts *opts, int fill_up_media)
Caution: still immature and likely to change.
int(* cancel)(struct burn_source *source)
Informs the burn_source that the consumer of data prematurely ended reading.
void burn_read_opts_free(struct burn_read_opts *opts)
Frees a read_opts struct created with burn_read_opts_new.
int session
Current session.
int refcount
Reference count for the data source.
unsigned int write_cdrw
Can the drive write CD-RW discs.
int burn_obtain_profile_name(int profile_code, char name[80])
Obtains the profile name associated with a profile code.
off_t start_range_high
The highest addressable start address.
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...
sync, headers, edc/ecc provided by lib/user
int burn_disc_get_sectors(struct burn_disc *d)
unsigned int write_dvdram
Can the drive write DVD-RAM discs.
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_disc_pretend_blank(struct burn_drive *drive)
WARNING: This revives an old bug-like behavior that might be dangerous.
unsigned int read_dvdr
Can the drive read DVD-R discs.
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.
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...
enum burn_drive_status burn_drive_get_status(struct burn_drive *drive, struct burn_progress *p)
Returns the progress and status of a drive.
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...
struct burn_drive * drive
The value by which this drive can be indexed when using functions in the library. ...
unsigned char extensions_valid
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.
The library is spawning the processes to handle a pending operation (A read/write/etc is about to sta...
int sessions
The total number of sessions.
void burn_write_opts_set_force(struct burn_write_opts *opts, int use_force)
Eventually makes libburn ignore the failure of some conformance checks:
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...
The source is at end of file.
int burn_disc_erasable(struct burn_drive *d)
Tells whether a disc can be erased or not.
In replies this indicates that not any writing will work.
int burn_sev_to_text(int severity_number, char **severity_name, int flag)
Convert a severity number into a severity name.
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_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.
int burn_msf_to_lba(int m, int s, int f)
Convert a minute-second-frame (MSF) value to an lba.
int burn_is_aborting(int flag)
The drive is busy in synchronous write (if you see this then it has been interrupted) ...
void burn_session_free(struct burn_session *s)
Free a session (and decrease reference count on all tracks inside)
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.
int(* set_size)(struct burn_source *source, off_t size)
Program the reply of (*get_size) to a fixed value.
int burn_drive_get_immed(struct burn_drive *drive)
Inquire the current setting of usage of the Immed bit.
The media seems to be unsuitable for reading and for writing.
int burn_write_opts_set_underrun_proof(struct burn_write_opts *opts, int underrun_proof)
Controls buffer underrun prevention.
unsigned char session_msb
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_disc_get_format_descr(struct burn_drive *drive, int index, int *type, off_t *size, unsigned *tdp)
Inquire parameters of an available media format.
struct burn_disc * burn_disc_create(void)
Create a new disc.
unsigned int c2_errors
DEPRECATED: Can the drive report C2 errors.
int burn_msgs_set_severities(char *queue_severity, char *print_severity, char *print_id)
Control queueing and stderr printing of messages from libburn.
int wrc
Expert info from ACh GET PERFORMANCE and/or mode page 2Ah.
int burn_drive_get_min_write_speed(struct burn_drive *d)
Gets the minimum write speed for a drive and eventually loaded media.
The drive gets written zeroes before the track payload data.
With CD: Track At Once recording 2s gaps between tracks, no fonky lead-ins.
burn_disc_status
Possible status of the drive in regard to the disc in it.
The drive is not in an operation.
2336 bytes of user data provided by lib/user
void burn_track_clear_isrc(struct burn_track *t)
Disable ISRC parameters for a track.
int indices
The total number of indices.
struct burn_track * burn_track_create(void)
Create a track.
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_allow_untested_profiles(int yes)
Allows the use of media types which are implemented in libburn but not yet tested.
int burn_track_get_mode(struct burn_track *track)
Gets the mode of a track.
int end_lba
The attributed capacity of appropriate media in logical block units i.e.
2048 bytes of user data provided by lib/user subheader provided in write parameters are we ever going...
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(), or stored as *.cdt file, or submitted to burn_make_input_sheet_v07t().
off_t start_range_low
The lowest permissible start address.
unsigned buffer_available
The free space in the drive buffer (might be slightly outdated)
enum burn_write_types selected_write_mode
Write mode as given by parameter wt of burn_disc_get_multi_caps().
unsigned int read_cdr
Can the drive read CD-R discs.
burn_drive_status
Possible busy states for a drive.
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_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_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_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()
struct burn_speed_descriptor * next
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_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 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.
The drive is writing data to a disc.
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().
There is no disc at all in the drive.
void burn_finish(void)
Shutdown the library.
struct burn_disc * burn_drive_get_disc(struct burn_drive *d)
Get the drive's disc struct - free when done.
int burn_initialize(void)
Initialize the library.
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...
sync, headers, edc/ecc and p/q subs provided by lib/user
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.
burn_block_types
Data format to send to the drive.
sync, headers, edc/ecc and packed p-w subs provided by lib/user
int libdax_audioxtr_new(struct libdax_audioxtr **xtr, char *path, int flag)
Open an audio file, check wether suitable, create extractor object.
int burn_track_get_sectors(struct burn_track *)
Tells how many sectors a track will have on disc, or already has on disc.
unsigned int write_simulate
Can the drive simulate a write.
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().
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 burn_get_read_capacity(struct burn_drive *d, int *capacity, int flag)
Inquire the maximum amount of readable data.
unsigned char session
Session the track is in.
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_drive_get_serial_no(struct burn_drive *d, char **sno, int *sno_len)
Returns the Drive Serial Number as of MMC feature 108h.
void burn_drive_set_speed(struct burn_drive *d, int read, int write)
Sets drive read and write speed Note: "k" is 1000, not 1024.
int sao_block_types
The supported block types in sao mode.
int(* read)(struct burn_source *, unsigned char *buffer, int size)
Read data from the source.
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...
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.
Information on a drive in the system.
void * data
Source specific data.
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_set_signal_handling(void *handle, burn_abort_handler_t handler, int mode)
Control built-in signal handling.
char product[17]
Name of 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...
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...
int burn_abort_pacifier(void *handle, int patience, int elapsed)
A pacifier function suitable for burn_abort.
void burn_read_opts_set_raw(struct burn_read_opts *opts, int raw_mode)
Sets whether to read in raw mode or not.
int burn_drive_wrote_well(struct burn_drive *d)
Inquire whether the most recent asynchronous media job was successful.
int burn_set_messenger(void *messenger)
Replace the messenger object handle of libburn by a compatible handle obtained from a related library...
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_disc_read_atip(struct burn_drive *drive)
Reads ATIP information from inserted media.
int burn_session_get_hidefirst(struct burn_session *session)
Returns whether the first track of a session is hidden in the pregap.
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...
only 2048 bytes of user data provided by lib/user
void burn_read_opts_set_hardware_error_recovery(struct burn_read_opts *opts, int hardware_error_recovery)
Sets whether to recover errors if possible.
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_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_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 tracks
The total number of tracks.
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.
Data source interface for tracks.
int burn_drive_convert_fs_adr(char *path, char adr[])
Try to convert a given existing filesystem address into a drive device file address.
void burn_track_free(struct burn_track *t)
Free a track.
void burn_disc_free(struct burn_disc *d)
Delete disc and decrease the reference count on all its sessions.
void burn_source_free(struct burn_source *s)
Free a burn_source (decrease its refcount and maybe free it)
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...
The drive is told to close a session (TAO only)
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 buffer_size
DEPRECATED: The size of the drive's buffer (in kilobytes)
int source
Where this info comes from : 0 = misc 1 = mode page 2Ah 2 = ACh GET PERFORMANCE Type 03h 3 = ACh GET ...
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...
With CD: Raw disc at once recording.
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_drive_reset_simulate(struct burn_drive *d, int simulate)
Control the write simulation mode before or after burn_write_opts get into effect.
unsigned int read_cdrw
Can the drive read CD-RW discs.
int burn_drive_get_read_speed(struct burn_drive *d)
Gets the maximum read speed for a drive.
off_t buffered_bytes
The number of bytes sent to the drive buffer.
void burn_disc_format(struct burn_drive *drive, off_t size, int flag)
Format media for use with libburn.
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_session_remove_track(struct burn_session *s, struct burn_track *t)
Remove a track from a session.
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, an eventually open readable subcodes file descriptor and eventually a fixed size in bytes.
int burn_drive_scan_and_grab(struct burn_drive_info *drive_infos[], char *adr, int load)
Acquire a drive with known device file address.
void burn_sectors_to_msf(int sectors, int *m, int *s, int *f)
Convert a sector count to minute-second-frame (MSF)
unsigned buffer_min_fill
The minimum number of bytes stored in buffer during write.
burn_source_status
Possible data source return values.
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.
unsigned int write_cdr
Can the drive write CD-R discs.
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...
The drive is writing Lead-In.
void burn_preset_device_open(int exclusive, int blocking, int abort_on_busy)
Set parameters for behavior on opening device files.
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 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)...
The drive is writing Lead-Out.
int burn_drive_scan(struct burn_drive_info *drive_infos[], unsigned int *n_drives)
Scan for drives.
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.
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.
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_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_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...
The drive is being grabbed.
int burn_disc_get_profile(struct burn_drive *d, int *pno, char name[80])
Tells the MMC Profile identifier of the loaded media.
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.
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...
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.
void burn_set_verbosity(int level)
ts A61006 : This is for development only.
void burn_set_scsi_logging(int flag)
Enable or disable logging of SCSI commands.
void burn_read_opts_set_c2errors(struct burn_read_opts *opts, int c2errors)
Sets whether to report c2 errors or not.
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.
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.
int packet_block_types
The supported block types in packet mode.
int libdax_audioxtr_destroy(struct libdax_audioxtr **xtr, int flag)
Clean up after extraction and destroy extractor object.
void burn_drive_release(struct burn_drive *drive, int eject)
Release a drive.
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.
void burn_drive_cancel(struct burn_drive *drive)
Cancel an operation on a drive.
int burn_disc_get_msc1(struct burn_drive *d, int *start_lba)
Read start lba of the first track in the last complete session.
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().
The reply structure for burn_disc_get_multi_caps()
2332 bytes of data supplied by lib/user 8 bytes sub header provided in write parameters this is the s...
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...
The drive was not grabbed when the status was inquired.
void burn_write_opts_set_has_mediacatalog(struct burn_write_opts *opts, int has_mediacatalog)
This call activates the Media Catalog Number for writing.
unsigned char pmin
Track start time minutes for normal tracks.
sync, headers, edc/ecc and raw p-w subs provided by lib/user
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().
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_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()
int burn_track_set_cdxa_conv(struct burn_track *t, int value)
Activates CD XA compatibility modes.
unsigned char point
Track number or special information.
void burn_write_opts_set_format(struct burn_write_opts *opts, int format)
Sets the session format for a disc.
int version
Valid only if above member .
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.
unsigned char adr
Type of data.
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_drive_get_write_speed(struct burn_drive *d)
Gets the maximum write speed for a drive and eventually loaded media.
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 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_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_track_set_byte_swap(struct burn_track *t, int swap_source_bytes)
Define whether a track shall swap bytes of its input stream.
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_disc_pretend_full_uncond(struct burn_drive *drive)
WARNING: This overrides the safety measures against unsuitable media.
struct burn_speed_descriptor * prev
List chaining.
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).
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 last_recorded_address
char location[17]
Invalid: Was: "Location of the drive in the filesystem.".
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.
struct burn_source * next
Next source, for when a source runs dry and padding is disabled WARNING: This is an obscure feature...
int(* read_xt)(struct burn_source *, unsigned char *buffer, int size)
This substitutes for (*read)() in versions above 0.
unsigned int read_dvdram
Can the drive read DVD-RAM discs.
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 current_profile
Profile number which was current when the reply was generated.
int burn_drive_get_speedlist(struct burn_drive *d, struct burn_speed_descriptor **speed_list)
Obtain a copy of the current speed descriptor list.
char * burn_list_sev_texts(int flag)
Return a blank separated list of severity names.
unsigned char pframe
Track start time frames for normal tracks.
int burn_drive_snooze(struct burn_drive *d, int flag)
Calm down or alert a drive.
There is a disc with data on it in the drive.
int start_sector
The starting logical block address.
int burn_drive_probe_cd_write_modes(struct burn_drive_info *drive_info)
SAO block sizes are based on cue sheet, so use this.
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 sector
On write: The current sector being processed.
unsigned buffer_capacity
The capacity of the drive buffer.
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_os_free_buffer(void *buffer, size_t amount, int flag)
Dispose a memory area which was obtained by burn_os_alloc_buffer(),.
void burn_allow_drive_role_4(int allowed)
Allow drive role 4 "random access read-only" and drive role 5 "random access write-only".
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 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_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_hide_first_track(struct burn_session *s, int onoff)
Hide the first track in the "pre gap" of the disc.
unsigned int write_dvdr
Can the drive write DVD-R discs.
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 sectors
On write: The number of sectors.
void burn_lba_to_msf(int lba, int *m, int *s, int *f)
Convert an lba to minute-second-frame (MSF)
The drive is busy in synchronous read (if you see this then it has been interrupted) ...
int raw_block_types
The supported block types in raw mode.
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.
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...
char vendor[9]
Name of the vendor of the drive.
enum burn_source_status burn_track_set_source(struct burn_track *t, struct burn_source *s)
Set the track's data source.
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 ...
int tao_block_types
The supported block types in tao mode.
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. ...
int might_simulate
Wether the current profile is able to perform simulated write.
void burn_structure_print_disc(struct burn_disc *d)
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_write_types
Possible disc writing style/modes.
void burn_version(int *major, int *minor, int *micro)
Returns the library's version in its parts.
int burn_disc_remove_session(struct burn_disc *d, struct burn_session *s)
Remove a session from a disc.
unsigned char control
Type of data in the track.
char * burn_scsi_transport_id(int flag)
Note: Above version numbers are also recorded in configure.ac because libtool wants them as parameter...
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_read_subcodes_data(struct burn_read_opts *opts, int subcodes_data)
Sets whether to read subcodes from data tracks or not.
There is an incomplete disc in the drive.
Description of a speed capability as reported by the drive in conjunction with eventually loaded medi...
unsigned char psec
Track start time seconds for normal tracks.
int burn_drive_grab(struct burn_drive *drive, int load)
Grab a drive.
The drive is erasing a disc.
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_track_define_data(struct burn_track *t, int offset, int tail, int pad, int mode)
Define the data in a track.
enum burn_write_types advised_write_mode
Generally advised write mode.
int might_do_tao
Potential availability of write modes 4= needs no size prediction, not to be chosen automatically 3= ...
int burn_drive_re_assess(struct burn_drive *d, int flag)
Re-assess drive and media status.
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_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_msf_to_sectors(int m, int s, int f)
Convert a minute-second-frame (MSF) value to sector count.
int burn_session_dispose_cdtext(struct burn_session *s, int block)
Remove all CD-TEXT attributes of the given block from the session.
void(* free_data)(struct burn_source *)
Clean up the source specific data.
off_t start_alignment
The alignment for start addresses.
char revision[5]
Revision of the drive.
void burn_drive_clear_whitelist(void)
Remove all drives from whitelist.
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 profile_loaded
The media type that was current at the time of report -2 = state unknown, -1 = no media was loaded ...
int current_is_cd_profile
Wether the current profile indicates CD media.
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.
int burn_drive_d_get_adr(struct burn_drive *drive, char adr[])
Inquire the device file address of the given drive.
void burn_structure_print_track(struct burn_track *t)
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.
2048 bytes of data + 8 byte subheader provided by lib/user hey, this is also dumb ...
unsigned int read_dvdrom
Can the drive read DVD-ROM discs.
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.
The drive holds a blank disc.
int burn_drive_add_whitelist(char *device_address)
Add a device to the list of permissible drives.
void burn_write_opts_set_stdio_fsync(struct burn_write_opts *opts, int rythm)
Sets the rhythm by which stdio pseudo drives force their output data to be consumed by the receiving ...
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...
enum burn_disc_status burn_disc_get_status(struct burn_drive *drive)
Returns what kind of disc a drive is holding.
int write_speed
Speed is given in 1000 bytes/s , 0 = invalid.
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.
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...
#define BURN_REASONS_LEN
The length of a rejection reasons string for burn_precheck_write() and burn_write_opts_auto_write_typ...
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.
int burn_write_opts_set_simulate(struct burn_write_opts *opts, int sim)
Sets the simulate value for the write_opts struct .
The drive is told to close a track (TAO only)
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_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...
struct burn_session * burn_session_create(void)
Create a new session.