Go to the documentation of this file.
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]);
3444 int *count,
unsigned int **feature_codes);
3475 unsigned char *flags,
3476 unsigned char *additional_length,
3477 unsigned char **feature_data,
3478 char **feature_text);
3756 #define burn_header_version_major 1
3757 #define burn_header_version_minor 5
3758 #define burn_header_version_micro 2
3832 char *print_severity,
char *print_id);
3836 #define BURN_MSGS_MESSAGE_LEN 4096
3856 int *error_code,
char msg_text[],
int *os_errno,
3879 char severity[],
struct burn_drive *d);
4049 char *data, off_t data_count,
int flag);
4109 char data[], off_t data_size, off_t *data_count,
int flag);
4156 char data[], off_t data_size, off_t *data_count,
int flag);
4178 int start_sector,
int sector_count,
4179 char *target_path,
int flag);
4198 struct burn_track *track,
4199 char *target_path,
int flag);
4287 #define LIBDAX_AUDIOXTR_STRLEN 4096
4295 struct libdax_audioxtr;
4326 char **fmt,
char **fmt_info,
4327 int *num_channels,
int *sample_rate,
4328 int *bits_per_sample,
int *msb_first,
int flag);
4356 char buffer[],
int buffer_size,
int flag);
4414 #define Libburn_dummy_probe_write_modeS 1
4420 #define Libburn_disc_with_incomplete_sessioN 1
4428 #ifdef Libburn_develop_quality_scaN
4432 int burn_nec_optiarc_rep_err_rate(
struct burn_drive *d,
4433 int start_lba,
int rate_period,
int flag);
int refcount
Reference count for the data source.
int burn_drive_get_min_write_speed(struct burn_drive *d)
Gets the minimum write speed for a drive and eventually loaded media.
struct burn_session * burn_session_create(void)
Create a new session.
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 wrc
Expert info from ACh GET PERFORMANCE and/or mode page 2Ah.
unsigned char psec
Track start time seconds for normal tracks.
int current_is_cd_profile
Wether the current profile indicates CD media.
off_t buffered_bytes
The number of bytes sent to the drive buffer.
int burn_drive_grab(struct burn_drive *drive, int load)
Grab a drive.
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...
int burn_obtain_profile_name(int profile_code, char name[80])
Obtains the profile name associated with a profile code.
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....
int burn_disc_get_sectors(struct burn_disc *d)
int write_speed
Speed is given in 1000 bytes/s , 0 = invalid.
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.
The current status is not yet known.
unsigned int write_cdrw
Can the drive write CD-RW discs.
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_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_msf_to_lba(int m, int s, int f)
Convert a minute-second-frame (MSF) value to an lba.
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.
enum burn_disc_status burn_disc_get_status(struct burn_drive *drive)
Returns what kind of disc a drive is holding.
void burn_disc_write(struct burn_write_opts *o, struct burn_disc *disc)
Write a disc in the drive.
The reply structure for burn_disc_get_multi_caps()
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_session_get_sectors(struct burn_session *s)
void burn_write_opts_set_force(struct burn_write_opts *opts, int use_force)
Eventually makes libburn ignore the failure of some conformance checks:
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.
With CD: Raw disc at once recording.
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_disc * burn_disc_create(void)
Create a new disc.
int burn_write_opts_set_simulate(struct burn_write_opts *opts, int sim)
Sets the simulate value for the write_opts struct .
struct burn_drive * drive
The value by which this drive can be indexed when using functions in the library.
int burn_disc_pretend_full(struct burn_drive *drive)
WARNING: This overrides the safety measures against unsuitable media.
void burn_finish(void)
Shutdown the library.
unsigned int write_dvdr
Can the drive write DVD-R discs.
The drive is busy in synchronous write (if you see this then it has been interrupted)
int burn_disc_pretend_blank(struct burn_drive *drive)
WARNING: This revives an old bug-like behavior that might be dangerous.
sync, headers, edc/ecc provided by lib/user
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.
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_block_types
Data format to send to the drive.
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_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 sector
On write: The current sector being processed.
unsigned buffer_capacity
The capacity of the drive buffer.
void burn_write_opts_set_fillup(struct burn_write_opts *opts, int fill_up_media)
Caution: still immature and likely to change.
int burn_drive_add_whitelist(char *device_address)
Add a device to the list of permissible drives.
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_write_opts_free(struct burn_write_opts *opts)
Frees a write_opts struct created with burn_write_opts_new.
int burn_get_read_capacity(struct burn_drive *d, int *capacity, int flag)
Inquire the maximum amount of readable 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...
The drive holds a blank disc.
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_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_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...
The source is at end of file.
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_source * burn_file_source_new(const char *path, const char *subpath)
Creates a data source for an image file (and maybe subcode file)
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 raw_block_types
The supported block types in raw mode.
void burn_track_clear_isrc(struct burn_track *t)
Disable ISRC parameters for a track.
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.
The drive is erasing a disc.
unsigned char session_msb
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_cdtext_from_packfile(char *path, unsigned char **text_packs, int *num_packs, int flag)
Read an array of CD-TEXT packs from a file.
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.
sync, headers, edc/ecc and p/q subs provided by lib/user
unsigned int read_cdr
Can the drive read CD-R discs.
int burn_initialize(void)
Initialize the library.
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_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_sev_to_text(int severity_number, char **severity_name, int flag)
Convert a severity number into a severity name.
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_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.
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 might_simulate
Wether the current profile is able to perform simulated write.
int burn_drive_wrote_well(struct burn_drive *d)
Inquire whether the most recent asynchronous media job was successful.
int burn_track_get_sectors(struct burn_track *)
Tells how many sectors a track will have on disc, or already has on disc.
int burn_is_aborting(int flag)
int burn_disc_read_atip(struct burn_drive *drive)
Reads ATIP information from inserted media.
void burn_session_free(struct burn_session *s)
Free a session (and decrease reference count on all tracks inside)
int current_profile
Profile number which was current when the reply was generated.
unsigned char session
Session the track is in.
enum burn_write_types advised_write_mode
Generally advised write mode.
With CD: Session At Once Block type MUST be BURN_BLOCK_SAO ts A70122: Currently not capable of mixing...
int burn_session_get_hidefirst(struct burn_session *session)
Returns whether the first track of a session is hidden in the pregap.
int burn_msgs_set_severities(char *queue_severity, char *print_severity, char *print_id)
Control queueing and stderr printing of messages from libburn.
The media seems to be unsuitable for reading and for writing.
int burn_track_get_mode(struct burn_track *track)
Gets the mode of a track.
int sessions
The total number of sessions.
void burn_disc_format(struct burn_drive *drive, off_t size, int flag)
Format media for use with libburn.
char location[17]
Invalid: Was: "Location of the drive in the filesystem.".
burn_disc_status
Possible status of the drive in regard to the disc in it.
unsigned char extensions_valid
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...
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_session_remove_track(struct burn_session *s, struct burn_track *t)
Remove a track from a session.
unsigned buffer_available
The free space in the drive buffer (might be slightly outdated)
int burn_drive_get_immed(struct burn_drive *drive)
Inquire the current setting of usage of the Immed bit.
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: Track At Once recording 2s gaps between tracks, no fonky lead-ins.
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 start_sector
The starting logical block address.
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.
Data source interface for tracks.
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_disc_erasable(struct burn_drive *d)
Tells whether a disc can be erased or not.
void burn_preset_device_open(int exclusive, int blocking, int abort_on_busy)
Set parameters for behavior on opening device files.
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.
enum burn_write_types selected_write_mode
Write mode as given by parameter wt of burn_disc_get_multi_caps().
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_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_write_opts_set_underrun_proof(struct burn_write_opts *opts, int underrun_proof)
Controls buffer underrun prevention.
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().
only 2048 bytes of user data provided by lib/user
sync, headers, edc/ecc and packed p-w subs provided by lib/user
int end_lba
The attributed capacity of appropriate media in logical block units i.e.
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.
The drive is reading data from a 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_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.
The drive is told to close a track (TAO only)
unsigned int write_simulate
Can the drive simulate a write.
int version
Valid only if above member .
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.
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().
int sao_block_types
The supported block types in sao 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.
int libdax_audioxtr_destroy(struct libdax_audioxtr **xtr, int flag)
Clean up after extraction and destroy extractor object.
int burn_drive_scan(struct burn_drive_info *drive_infos[], unsigned int *n_drives)
Scan for drives.
int burn_abort_pacifier(void *handle, int patience, int elapsed)
A pacifier function suitable for burn_abort.
burn_drive_status
Possible busy states for a drive.
int tao_block_types
The supported block types in tao mode.
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_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...
int profile_loaded
The media type that was current at the time of report -2 = state unknown, -1 = no media was loaded ,...
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_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.
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.
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...
struct burn_track * burn_track_create(void)
Create a track.
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_set_hardware_error_recovery(struct burn_read_opts *opts, int hardware_error_recovery)
Sets whether to recover errors if possible.
void burn_set_signal_handling(void *handle, burn_abort_handler_t handler, int mode)
Control built-in signal handling.
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().
struct burn_disc * burn_drive_get_disc(struct burn_drive *d)
Get the drive's disc struct - free when done.
unsigned char pmin
Track start time minutes for normal tracks.
unsigned int write_cdr
Can the drive write CD-R discs.
unsigned buffer_min_fill
The minimum number of bytes stored in buffer during write.
int libdax_audioxtr_new(struct libdax_audioxtr **xtr, char *path, int flag)
Open an audio file, check wether suitable, create extractor object.
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.
unsigned int read_dvdr
Can the drive read DVD-R discs.
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 session
Current session.
There is an incomplete disc in the drive.
2048 bytes of user data provided by lib/user subheader provided in write parameters are we ever going...
The drive is formatting media.
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_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.
The library is spawning the processes to handle a pending operation (A read/write/etc is about to sta...
There is no disc at all in the drive.
void burn_structure_print_session(struct burn_session *s)
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().
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_sectors_to_msf(int sectors, int *m, int *s, int *f)
Convert a sector count to minute-second-frame (MSF)
int burn_set_messenger(void *messenger)
Replace the messenger object handle of libburn by a compatible handle obtained from a related library...
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...
unsigned int read_cdrw
Can the drive read CD-RW discs.
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.
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_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 * data
Source specific data.
void burn_set_verbosity(int level)
ts A61006 : This is for development only.
struct burn_source * next
Next source, for when a source runs dry and padding is disabled WARNING: This is an obscure feature.
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).
int burn_drive_get_read_speed(struct burn_drive *d)
Gets the maximum read speed for a drive.
void burn_set_scsi_logging(int flag)
Enable or disable logging of SCSI commands.
int(* read)(struct burn_source *, unsigned char *buffer, int size)
Read data from the source.
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_isrc_string(struct burn_track *t, char isrc[13], int flag)
Set the composed ISRC string for a track.
void burn_disc_free(struct burn_disc *d)
Delete disc and decrease the reference count on all its sessions.
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_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_clear_indice(struct burn_track *t, int flag)
Remove all index start addresses and reset to the default indexing of CD SAO sessions.
The drive is writing Lead-Out.
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...
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.
void burn_write_opts_set_has_mediacatalog(struct burn_write_opts *opts, int has_mediacatalog)
This call activates the Media Catalog Number for writing.
Information about a track on a disc - this is from the q sub channel of the lead-in area of a disc.
void burn_track_free(struct burn_track *t)
Free a track.
int(* cancel)(struct burn_source *source)
Informs the burn_source that the consumer of data prematurely ended reading.
2336 bytes of user data provided by lib/user
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_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_source_free(struct burn_source *s)
Free a burn_source (decrease its refcount and maybe free it)
int burn_disc_pretend_full_uncond(struct burn_drive *drive)
WARNING: This overrides the safety measures against unsuitable media.
int last_recorded_address
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.
burn_source_status
Possible data source return values.
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.
In replies this indicates that not any writing will work.
The drive is told to close a session (TAO only)
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...
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...
void burn_session_hide_first_track(struct burn_session *s, int onoff)
Hide the first track in the "pre gap" of the disc.
The drive is being grabbed.
void burn_read_opts_set_c2errors(struct burn_read_opts *opts, int c2errors)
Sets whether to report c2 errors or not.
SAO block sizes are based on cue sheet, so use this.
void burn_lba_to_msf(int lba, int *m, int *s, int *f)
Convert an lba to minute-second-frame (MSF)
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_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.
unsigned char pframe
Track start time frames for normal tracks.
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.
unsigned int read_dvdram
Can the drive read DVD-RAM discs.
unsigned char point
Track number or special information.
void burn_version(int *major, int *minor, int *micro)
Returns the library's version in its parts.
int(* read_xt)(struct burn_source *, unsigned char *buffer, int size)
This substitutes for (*read)() in versions above 0.
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_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...
The drive is not in an operation.
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_speedlist(struct burn_drive *d, struct burn_speed_descriptor **speed_list)
Obtain a copy of the current speed descriptor list.
int burn_drive_snooze(struct burn_drive *d, int flag)
Calm down or alert a drive.
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.
void burn_drive_cancel(struct burn_drive *drive)
Cancel an operation on a drive.
struct burn_speed_descriptor * next
void burn_write_opts_set_format(struct burn_write_opts *opts, int format)
Sets the session format for a disc.
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().
off_t start_range_high
The highest addressable start address.
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_disc_remove_session(struct burn_disc *d, struct burn_session *s)
Remove a session from a disc.
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.
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...
int burn_disc_get_profile(struct burn_drive *d, int *pno, char name[80])
Tells the MMC Profile identifier of the loaded media.
sync, headers, edc/ecc and raw p-w subs provided by lib/user
unsigned char adr
Type of data.
off_t start_range_low
The lowest permissible start address.
int burn_drive_get_write_speed(struct burn_drive *d)
Gets the maximum write speed for a drive and eventually loaded media.
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_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 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.
void burn_structure_print_disc(struct burn_disc *d)
The drive is writing Lead-In.
unsigned int write_dvdram
Can the drive write DVD-RAM discs.
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...
void burn_drive_release(struct burn_drive *drive, int eject)
Release a drive.
int burn_drive_probe_cd_write_modes(struct burn_drive_info *drive_info)
int burn_track_set_cdxa_conv(struct burn_track *t, int value)
Activates CD XA compatibility modes.
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...
There is a disc with data on it in the drive.
The drive is writing data to a disc.
void burn_drive_clear_whitelist(void)
Remove all drives from whitelist.
enum burn_source_status burn_track_set_source(struct burn_track *t, struct burn_source *s)
Set the track's data source.
off_t start_alignment
The alignment for start addresses.
unsigned int c2_errors
DEPRECATED: Can the drive report C2 errors.
2332 bytes of data supplied by lib/user 8 bytes sub header provided in write parameters this is the s...
struct burn_speed_descriptor * prev
List chaining.
off_t(* get_size)(struct burn_source *)
Get the size of the source's data.
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.
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)
burn_write_types
Possible disc writing style/modes.
int sectors
On write: The number of sectors.
The drive is busy in synchronous read (if you see this then it has been interrupted)
int might_do_tao
Potential availability of write modes 4= needs no size prediction, not to be chosen automatically 3= ...
int indices
The total number of indices.
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.
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 tracks
The total number of tracks.
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_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_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 ...
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 ...
int buffer_size
DEPRECATED: The size of the drive's buffer (in kilobytes)
char vendor[9]
Name of the vendor of the drive.
char * burn_list_sev_texts(int flag)
Return a blank separated list of severity names.
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.
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 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_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...
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_session_dispose_cdtext(struct burn_session *s, int block)
Remove all CD-TEXT attributes of the given block from the session.
void burn_disc_erase(struct burn_drive *drive, int fast)
Erase a disc in the drive.
The drive gets written zeroes before the track payload data.
struct burn_drive * burn_write_opts_get_drive(struct burn_write_opts *opts)
Inquires the drive associated with a burn_write_opts object.
2048 bytes of data + 8 byte subheader provided by lib/user hey, this is also dumb
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.
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 ...
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.
char revision[5]
Revision of the drive.
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_track_define_data(struct burn_track *t, int offset, int tail, int pad, int mode)
Define the data in a track.
void(* free_data)(struct burn_source *)
Clean up the source specific data.
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_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.
Information on a drive in the system.
int packet_block_types
The supported block types in packet mode.
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_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_allow_drive_role_4(int allowed)
Allow drive role 4 "random access read-only" and drive role 5 "random access write-only".
char product[17]
Name of the drive.
void burn_read_opts_free(struct burn_read_opts *opts)
Frees a read_opts struct created with burn_read_opts_new.
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...
2324 bytes of data provided by lib/user subheader provided in write parameters no sir,...
unsigned int read_dvdrom
Can the drive read DVD-ROM discs.
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.
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_msf_to_sectors(int m, int s, int f)
Convert a minute-second-frame (MSF) value to sector count.
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() ...
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_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...
The drive was not grabbed when the status was inquired.
Operation progress report.
int(* set_size)(struct burn_source *source, off_t size)
Program the reply of (*get_size) to a fixed value.
Description of a speed capability as reported by the drive in conjunction with eventually loaded medi...
#define BURN_REASONS_LEN
The length of a rejection reasons string for burn_precheck_write() and burn_write_opts_auto_write_typ...
Generated for libburn by
1.8.16