Issueing pacifier messages from within isoburn_set_msc1()
This commit is contained in:
parent
63d7cb7a7a
commit
a3360d81a2
@ -1549,7 +1549,8 @@ int isoburn_set_msc1(struct burn_drive *d, int adr_mode, char *adr_value,
|
|||||||
int flag)
|
int flag)
|
||||||
{
|
{
|
||||||
int ret, num_sessions, num_tracks, adr_num, i, j, total_tracks;
|
int ret, num_sessions, num_tracks, adr_num, i, j, total_tracks;
|
||||||
int lba, best_lba, size, re_valid= 0;
|
int lba, best_lba, size, re_valid= 0, track_count= 0;
|
||||||
|
time_t start_time= 0, last_pacifier= 0, now;
|
||||||
char volid[33], msg[160];
|
char volid[33], msg[160];
|
||||||
struct isoburn *o;
|
struct isoburn *o;
|
||||||
struct isoburn_toc_disc *disc= NULL;
|
struct isoburn_toc_disc *disc= NULL;
|
||||||
@ -1566,6 +1567,7 @@ int isoburn_set_msc1(struct burn_drive *d, int adr_mode, char *adr_value,
|
|||||||
if(o==NULL)
|
if(o==NULL)
|
||||||
return(-1);
|
return(-1);
|
||||||
|
|
||||||
|
start_time= last_pacifier= time(NULL);
|
||||||
adr_num= atoi(adr_value);
|
adr_num= atoi(adr_value);
|
||||||
if(adr_mode!=3 || (flag & 2)) {
|
if(adr_mode!=3 || (flag & 2)) {
|
||||||
disc= isoburn_toc_drive_get_disc(d);
|
disc= isoburn_toc_drive_get_disc(d);
|
||||||
@ -1639,6 +1641,15 @@ not_found:;
|
|||||||
if(tracks==NULL)
|
if(tracks==NULL)
|
||||||
continue;
|
continue;
|
||||||
for(j= 0; j<num_tracks; j++) {
|
for(j= 0; j<num_tracks; j++) {
|
||||||
|
now= time(NULL);
|
||||||
|
if(now - last_pacifier >= 5 && track_count > 0) {
|
||||||
|
last_pacifier= now;
|
||||||
|
sprintf(msg,
|
||||||
|
"Scanned %d tracks for matching volid in %.f seconds",
|
||||||
|
track_count, (double) (now - start_time));
|
||||||
|
isoburn_msgs_submit(o, 0x00060000, msg, 0, "UPDATE", 0);
|
||||||
|
}
|
||||||
|
track_count++;
|
||||||
ret= isoburn_toc_track_get_emul(tracks[0], &lba, &size, volid, 0);
|
ret= isoburn_toc_track_get_emul(tracks[0], &lba, &size, volid, 0);
|
||||||
if(ret < 0)
|
if(ret < 0)
|
||||||
continue;
|
continue;
|
||||||
@ -1671,6 +1682,13 @@ unknown_mode:;
|
|||||||
}
|
}
|
||||||
ret= 1;
|
ret= 1;
|
||||||
ex:;
|
ex:;
|
||||||
|
if(start_time != last_pacifier && track_count > 0) {
|
||||||
|
now= time(NULL);
|
||||||
|
sprintf(msg,
|
||||||
|
"Scanned %d tracks for matching volid in %.f seconds",
|
||||||
|
track_count, (double) (now - start_time));
|
||||||
|
isoburn_msgs_submit(o, 0x00060000, msg, 0, "UPDATE", 0);
|
||||||
|
}
|
||||||
if(disc!=NULL)
|
if(disc!=NULL)
|
||||||
isoburn_toc_disc_free(disc);
|
isoburn_toc_disc_free(disc);
|
||||||
if((flag & 4) && re_valid)
|
if((flag & 4) && re_valid)
|
||||||
|
@ -1 +1 @@
|
|||||||
#define Xorriso_timestamP "2009.04.25.162210"
|
#define Xorriso_timestamP "2009.04.25.162858"
|
||||||
|
Loading…
Reference in New Issue
Block a user