Browse Source

Made use of burn_fifo_source_new() flag bit0 and of burn_os_open_track_src()

master
Thomas Schmitt 13 years ago
parent
commit
5f23abebf1
  1. 2
      xorriso/xorriso_timestamp.h
  2. 31
      xorriso/xorrisoburn.c

2
xorriso/xorriso_timestamp.h

@ -1 +1 @@
#define Xorriso_timestamP "2009.11.17.142447"
#define Xorriso_timestamP "2009.11.28.123903"

31
xorriso/xorrisoburn.c

@ -8946,7 +8946,7 @@ int Xorriso_burn_track(struct XorrisO *xorriso, off_t write_start_address,
struct burn_track *track;
struct stat stbuf;
off_t fixed_size= 0;
struct burn_source *data_src, *fifo_src;
struct burn_source *data_src= NULL, *fifo_src= NULL;
enum burn_disc_status disc_state;
char reasons[BURN_REASONS_LEN], sfe[5*SfileadrL], profile_name[80];
char head_buffer[64*1024];
@ -8979,7 +8979,10 @@ int Xorriso_burn_track(struct XorrisO *xorriso, off_t write_start_address,
if(track_source[0] == '-' && track_source[1] == 0) {
fd= 0;
} else {
fd= open(track_source, O_RDONLY);
if(xorriso->fs >= 64)
fd= burn_os_open_track_src(track_source, O_RDONLY, 0);
else
fd= open(track_source, O_RDONLY);
if(fd>=0)
if(fstat(fd,&stbuf)!=-1)
if((stbuf.st_mode&S_IFMT)==S_IFREG)
@ -8988,7 +8991,6 @@ int Xorriso_burn_track(struct XorrisO *xorriso, off_t write_start_address,
if(fixed_size==0)
unpredicted_size= 1;
data_src= NULL;
if(fd>=0)
data_src= burn_fd_source_new(fd, -1, fixed_size);
if(data_src==NULL) {
@ -8997,18 +8999,21 @@ int Xorriso_burn_track(struct XorrisO *xorriso, off_t write_start_address,
Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, errno, "FAILURE", 0);
ret= 0; goto ex;
}
if(do_isosize && xorriso->fs < 64)
if((do_isosize || xorriso->fs != 0) && xorriso->fs < 64)
xorriso->fs= 64;
fifo_src= burn_fifo_source_new(data_src, 2048 + 8 * !!(flag & 4),
xorriso->fs, 0);
if(fifo_src == NULL) {
sprintf(xorriso->info_text, "Could not create fifo object of %.f MB",
((double) xorriso->fs) / 1024.0 / 1024.0);
Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "FATAL", 0);
ret= 0; goto ex;
}
if(xorriso->fs > 0) {
fifo_src= burn_fifo_source_new(data_src, 2048 + 8 * !!(flag & 4),
xorriso->fs, 1);
if(fifo_src == NULL) {
sprintf(xorriso->info_text, "Could not create fifo object of %.f MB",
((double) xorriso->fs) / 1024.0 / 1024.0);
Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "FATAL", 0);
ret= 0; goto ex;
}
}
xorriso->pacifier_fifo= fifo_src;
if(burn_track_set_source(track, fifo_src)!=BURN_SOURCE_OK) {
if(burn_track_set_source(track, fifo_src == NULL ? data_src : fifo_src)
!= BURN_SOURCE_OK) {
sprintf(xorriso->info_text,
"Cannot attach source object to track object");
Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "FATAL", 0);

Loading…
Cancel
Save