Made use of burn_fifo_source_new() flag bit0 and of burn_os_open_track_src()
This commit is contained in:
parent
a42ece0bce
commit
2dc705f248
@ -1 +1 @@
|
|||||||
#define Xorriso_timestamP "2009.11.17.142447"
|
#define Xorriso_timestamP "2009.11.28.123903"
|
||||||
|
@ -8946,7 +8946,7 @@ int Xorriso_burn_track(struct XorrisO *xorriso, off_t write_start_address,
|
|||||||
struct burn_track *track;
|
struct burn_track *track;
|
||||||
struct stat stbuf;
|
struct stat stbuf;
|
||||||
off_t fixed_size= 0;
|
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;
|
enum burn_disc_status disc_state;
|
||||||
char reasons[BURN_REASONS_LEN], sfe[5*SfileadrL], profile_name[80];
|
char reasons[BURN_REASONS_LEN], sfe[5*SfileadrL], profile_name[80];
|
||||||
char head_buffer[64*1024];
|
char head_buffer[64*1024];
|
||||||
@ -8979,6 +8979,9 @@ int Xorriso_burn_track(struct XorrisO *xorriso, off_t write_start_address,
|
|||||||
if(track_source[0] == '-' && track_source[1] == 0) {
|
if(track_source[0] == '-' && track_source[1] == 0) {
|
||||||
fd= 0;
|
fd= 0;
|
||||||
} else {
|
} else {
|
||||||
|
if(xorriso->fs >= 64)
|
||||||
|
fd= burn_os_open_track_src(track_source, O_RDONLY, 0);
|
||||||
|
else
|
||||||
fd= open(track_source, O_RDONLY);
|
fd= open(track_source, O_RDONLY);
|
||||||
if(fd>=0)
|
if(fd>=0)
|
||||||
if(fstat(fd,&stbuf)!=-1)
|
if(fstat(fd,&stbuf)!=-1)
|
||||||
@ -8988,7 +8991,6 @@ int Xorriso_burn_track(struct XorrisO *xorriso, off_t write_start_address,
|
|||||||
if(fixed_size==0)
|
if(fixed_size==0)
|
||||||
unpredicted_size= 1;
|
unpredicted_size= 1;
|
||||||
|
|
||||||
data_src= NULL;
|
|
||||||
if(fd>=0)
|
if(fd>=0)
|
||||||
data_src= burn_fd_source_new(fd, -1, fixed_size);
|
data_src= burn_fd_source_new(fd, -1, fixed_size);
|
||||||
if(data_src==NULL) {
|
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);
|
Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, errno, "FAILURE", 0);
|
||||||
ret= 0; goto ex;
|
ret= 0; goto ex;
|
||||||
}
|
}
|
||||||
if(do_isosize && xorriso->fs < 64)
|
if((do_isosize || xorriso->fs != 0) && xorriso->fs < 64)
|
||||||
xorriso->fs= 64;
|
xorriso->fs= 64;
|
||||||
|
if(xorriso->fs > 0) {
|
||||||
fifo_src= burn_fifo_source_new(data_src, 2048 + 8 * !!(flag & 4),
|
fifo_src= burn_fifo_source_new(data_src, 2048 + 8 * !!(flag & 4),
|
||||||
xorriso->fs, 0);
|
xorriso->fs, 1);
|
||||||
if(fifo_src == NULL) {
|
if(fifo_src == NULL) {
|
||||||
sprintf(xorriso->info_text, "Could not create fifo object of %.f MB",
|
sprintf(xorriso->info_text, "Could not create fifo object of %.f MB",
|
||||||
((double) xorriso->fs) / 1024.0 / 1024.0);
|
((double) xorriso->fs) / 1024.0 / 1024.0);
|
||||||
Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "FATAL", 0);
|
Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "FATAL", 0);
|
||||||
ret= 0; goto ex;
|
ret= 0; goto ex;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
xorriso->pacifier_fifo= fifo_src;
|
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,
|
sprintf(xorriso->info_text,
|
||||||
"Cannot attach source object to track object");
|
"Cannot attach source object to track object");
|
||||||
Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "FATAL", 0);
|
Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "FATAL", 0);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user