New API function isoburn_igopt_get_data_start()

This commit is contained in:
Thomas Schmitt 2009-02-28 17:59:20 +00:00
parent e2a2185f6f
commit 3a40796647
4 changed files with 43 additions and 3 deletions

View File

@ -353,6 +353,7 @@ int isoburn_prepare_disc_aux(struct burn_drive *in_d, struct burn_drive *out_d,
IsoWriteOpts *wopts= NULL;
enum burn_disc_status state;
int ret, fifo_chunks, lba, nwa, i, new_img, early_indev_release;
uint32_t data_start= -1;
size_t buffer_size= 0, buffer_free= 0;
char msg[160];
@ -470,6 +471,16 @@ int isoburn_prepare_disc_aux(struct burn_drive *in_d, struct burn_drive *out_d,
if(in_o->iso_data_source!=NULL)
isoburn_data_source_shutdown(in_o->iso_data_source, 0);
}
#ifdef Libisofs_has_iwo_get_data_starT
ret= iso_write_opts_get_data_start(wopts, &data_start, 0);
#else
ret= ISO_ERROR;
#endif
opts->data_start_lba= -1;
if(ret > 0 && data_start <= 0x7FFFFFFF)
opts->data_start_lba= data_start;
/* TODO check return values for failure. propertly clean-up on error */
@ -801,6 +812,7 @@ int isoburn_igopt_new(struct isoburn_imgen_opts **new_o, int flag)
o->output_charset= NULL;
o->fifo_size= 4*1024*1024;
o->effective_lba= -1;
o->data_start_lba= -1;
return(1);
}
@ -975,3 +987,9 @@ int isoburn_igopt_get_effective_lba(struct isoburn_imgen_opts *o, int *lba)
}
int isoburn_igopt_get_data_start(struct isoburn_imgen_opts *o, int *lba)
{
*lba= o->data_start_lba;
return(1);
}

View File

@ -430,12 +430,19 @@ struct isoburn_imgen_opts {
int fifo_size;
/** Output value: Block address of session start as evaluatedfrom media
/** Output value: Block address of session start as evaluated from media
and other options by libisoburn and libburn.
If <0 : Invalid
If >=0: Valid block number. Block size is always 2 KiB.
*/
int effective_lba;
/** Output value: Block address of data section start as predicted by
libisofs.
If < 16: Invalid
If >=16: Valid block number. Block size is always 2 KiB.
*/
int data_start_lba;
};

View File

@ -216,7 +216,7 @@ void isoburn_version(int *major, int *minor, int *micro);
*/
#define isoburn_libisofs_req_major 0
#define isoburn_libisofs_req_minor 6
#define isoburn_libisofs_req_micro 13
#define isoburn_libisofs_req_micro 14
/** The minimum version of libburn to be used with this version of libisoburn
at compile time.
@ -1060,6 +1060,21 @@ int isoburn_igopt_get_fifo_size(struct isoburn_imgen_opts *o, int *fifo_size);
int isoburn_igopt_get_effective_lba(struct isoburn_imgen_opts *o, int *lba);
/** Obtain after image preparation the lowest block address of file content
data. Failure can occur if libisofs is too old to provide this information,
if the result exceeds 31 bit, or if the call is made before image
preparation.
This value cannot be set by the application but only be inquired.
@since 0.3.4
@param o The option set to work on
@param lba The block number of the session start on media.
<0 means that no address has been determined yet.
@return 1 success, <=0 failure
*/
int isoburn_igopt_get_data_start(struct isoburn_imgen_opts *o, int *lba);
/* ----------------------------------------------------------------------- */
/* End of Options for image generation */
/* ----------------------------------------------------------------------- */

View File

@ -1 +1 @@
#define Xorriso_timestamP "2009.02.28.175747"
#define Xorriso_timestamP "2009.02.28.175926"