|
|
|
@ -23,6 +23,7 @@
|
|
|
|
|
#include <stdlib.h> |
|
|
|
|
#include <sys/stat.h> |
|
|
|
|
#include <fcntl.h> |
|
|
|
|
#include <time.h> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#ifndef Xorriso_standalonE |
|
|
|
@ -985,7 +986,8 @@ int isoburn_emulate_toc(struct burn_drive *d, int flag)
|
|
|
|
|
int scan_start= 0; |
|
|
|
|
struct isoburn *o; |
|
|
|
|
struct isoburn_toc_entry *item; |
|
|
|
|
char msg[160]; |
|
|
|
|
char msg[160], *sev; |
|
|
|
|
time_t start_time, last_pacifier, now; |
|
|
|
|
|
|
|
|
|
/* is the media emulated multi-session ? */ |
|
|
|
|
ret= isoburn_find_emulator(&o, d, 0); |
|
|
|
@ -996,6 +998,7 @@ int isoburn_emulate_toc(struct burn_drive *d, int flag)
|
|
|
|
|
if(o->emulation_mode<=0 && !(flag&1)) |
|
|
|
|
return(0); |
|
|
|
|
|
|
|
|
|
start_time= last_pacifier= time(NULL); |
|
|
|
|
lba= 0; |
|
|
|
|
if(!(flag&2)) { |
|
|
|
|
ret= isoburn_read_iso_head(d, lba, &image_size, NULL, 0); |
|
|
|
@ -1043,14 +1046,32 @@ int isoburn_emulate_toc(struct burn_drive *d, int flag)
|
|
|
|
|
item->start_lba= lba; |
|
|
|
|
item->track_blocks= track_blocks; |
|
|
|
|
|
|
|
|
|
now= time(NULL); |
|
|
|
|
#ifdef Not_yeT |
|
|
|
|
|
|
|
|
|
/* >>> need asynchronous delivery of messages */; |
|
|
|
|
|
|
|
|
|
if(now - last_pacifier > 5) { |
|
|
|
|
last_pacifier= now; |
|
|
|
|
sprintf(msg, "Scanning found %d ISO session headers in %.f seconds", |
|
|
|
|
session_count, (double) (now - start_time)); |
|
|
|
|
burn_msgs_submit(0x00060000, msg, 0, "UPDATE", NULL); |
|
|
|
|
} |
|
|
|
|
#endif |
|
|
|
|
|
|
|
|
|
lba+= track_blocks; |
|
|
|
|
if(lba % Libisoburn_nwa_alignemenT) |
|
|
|
|
lba+= Libisoburn_nwa_alignemenT - (lba % Libisoburn_nwa_alignemenT); |
|
|
|
|
scan_start= lba; |
|
|
|
|
} |
|
|
|
|
sprintf(msg, |
|
|
|
|
"Chain of ISO session headers yielded %d sessions", session_count); |
|
|
|
|
burn_msgs_submit(0x00060000, msg, 0, "DEBUG", NULL); |
|
|
|
|
if(last_pacifier != start_time) |
|
|
|
|
sev= "UPDATE"; |
|
|
|
|
else |
|
|
|
|
sev= "DEBUG"; |
|
|
|
|
now= time(NULL); |
|
|
|
|
sprintf(msg, "Scanning found %d ISO session headers in %.f seconds", |
|
|
|
|
session_count, (double) (now - start_time)); |
|
|
|
|
burn_msgs_submit(0x00060000, msg, 0, sev, NULL); |
|
|
|
|
return(1); |
|
|
|
|
failure:; |
|
|
|
|
isoburn_toc_entry_destroy(&(o->toc), 1); |
|
|
|
|