Added fifo_size to struct isoburn_source_opts

This commit is contained in:
Thomas Schmitt 2007-10-23 12:24:24 +00:00
parent 73020b5c31
commit 4faad4cb40
3 changed files with 26 additions and 4 deletions

View File

@ -238,7 +238,7 @@ int isoburn_prepare_disc_aux(struct burn_drive *d, struct burn_disc **disc,
struct isoburn *o;
struct ecma119_source_opts wopts;
enum burn_disc_status state;
int ret;
int ret, chunks;
ret= isoburn_find_emulator(&o, d, 0);
if(ret<0 || o==NULL)
@ -295,7 +295,13 @@ int isoburn_prepare_disc_aux(struct burn_drive *d, struct burn_disc **disc,
/* TODO check return values for failure. propertly clean-up on error */
o->fifo = burn_fifo_source_new(wsrc, 2048, 2000, 0);
chunks= 32;
if(opts->fifo_size >= 64*1024 && opts->fifo_size <= 1024.0 * 1024.0 * 1024.0){
chunks= opts->fifo_size/2048;
if(chunks*2048 < opts->fifo_size)
chunks++;
}
o->fifo = burn_fifo_source_new(wsrc, 2048, chunks, 0);
burn_source_free(wsrc);
if (o->fifo == NULL) {
fprintf(stderr, "Cannot attach fifo\n");

View File

@ -107,9 +107,12 @@ struct isoburn_read_opts {
};
/**
* Options for image generation.
* Options for image generation by libisofs and image transport to libburn.
*/
struct isoburn_source_opts {
/* Options for image generation */
int level; /**< ISO level to write at. */
int flags; /**< Which extensions to support. */
int relaxed_constraints; /**< see ecma119_relaxed_constraints_flag */
@ -168,6 +171,19 @@ struct isoburn_source_opts {
uid_t uid; /**< uid to use when replace_uid is set. */
char *input_charset; /**< NULL to use default charset */
char *ouput_charset; /**< NULL to use default charset */
/* Options for image transport */
/** The number of bytes to be used for the fifo which decouples libisofs
and libburn for better throughput and for reducing the risk of
interrupting signals hitting the libburn thread which operates the
MMC drive.
The size will be rounded up to the next full 2048.
Minimum is 64kiB, maximum is 1 GiB (but that is too much anyway).
*/
int fifo_size;
};
/** Load the ISO filesystem directory tree from the media in the given drive.

View File

@ -1 +1 @@
#define Xorriso_timestamP "2007.10.22.211928"
#define Xorriso_timestamP "2007.10.23.122349"