Made -rom_toc_scan work on closed DVD-R in a DVD-ROM drive
This commit is contained in:
parent
c06380e287
commit
72ac776e5e
@ -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);
|
||||
|
@ -369,8 +369,10 @@ struct isoburn_imgen_opts {
|
||||
|
||||
/* Maximum gap to be bridged during a outer TOC scan. Gaps appear between the
|
||||
end of a session and the start of the next session.
|
||||
The longest gap found so far was about 38100 after the first session of a
|
||||
DVD-R.
|
||||
*/
|
||||
#define Libisoburn_toc_scan_max_gaP 8192
|
||||
#define Libisoburn_toc_scan_max_gaP 65536
|
||||
|
||||
|
||||
/* Creating a chain of image headers which form a TOC:
|
||||
|
@ -1 +1 @@
|
||||
#define Xorriso_timestamP "2008.06.17.170622"
|
||||
#define Xorriso_timestamP "2008.06.18.132057"
|
||||
|
Loading…
Reference in New Issue
Block a user