New option -session_log

This commit is contained in:
2008-04-03 20:41:00 +00:00
parent fa9cac4177
commit a55f83167e
8 changed files with 121 additions and 12 deletions

View File

@ -326,6 +326,7 @@ int isoburn_prepare_disc_aux(struct burn_drive *d, struct burn_disc **disc,
if (new_img) {
iso_write_opts_set_ms_block(wopts, 0);
opts->effective_lba= 0;
iso_write_opts_set_appendable(wopts, 0);
iso_write_opts_set_overwrite_buf(wopts, NULL);
} else {
@ -343,6 +344,7 @@ int isoburn_prepare_disc_aux(struct burn_drive *d, struct burn_disc **disc,
{ret= -4; goto ex;}
}
iso_write_opts_set_ms_block(wopts, nwa);
opts->effective_lba= nwa;
iso_write_opts_set_appendable(wopts, 1);
iso_write_opts_set_overwrite_buf(wopts, o->target_iso_head);
}
@ -678,6 +680,7 @@ int isoburn_igopt_new(struct isoburn_imgen_opts **new_o, int flag)
o->gid= 0;
o->output_charset= 0;
o->fifo_size= 4*1024*1024;
o->effective_lba= -1;
return(1);
}
@ -837,3 +840,10 @@ 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)
{
*lba= o->effective_lba;
return(1);
}

View File

@ -319,6 +319,13 @@ struct isoburn_imgen_opts {
*/
int fifo_size;
/** Output value: Block address of session start as evaluatedfrom 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;
};
#endif /* Isoburn_includeD */

View File

@ -723,6 +723,18 @@ int isoburn_igopt_set_fifo_size(struct isoburn_imgen_opts *o, int fifo_size);
int isoburn_igopt_get_fifo_size(struct isoburn_imgen_opts *o, int *fifo_size);
/** Obtain after image preparation the block address where the session will
start on media.
This value cannot be set by the application but only be inquired.
@since 0.1.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_effective_lba(struct isoburn_imgen_opts *o, int *lba);
/* ----------------------------------------------------------------------- */
/* End of Options for image generation */
/* ----------------------------------------------------------------------- */