From a3360d81a2f8b9445273a3b534c0b8c67d9fd015 Mon Sep 17 00:00:00 2001 From: Thomas Schmitt Date: Sat, 25 Apr 2009 16:28:48 +0000 Subject: [PATCH] Issueing pacifier messages from within isoburn_set_msc1() --- libisoburn/trunk/libisoburn/burn_wrap.c | 20 +++++++++++++++++++- libisoburn/trunk/xorriso/xorriso_timestamp.h | 2 +- 2 files changed, 20 insertions(+), 2 deletions(-) diff --git a/libisoburn/trunk/libisoburn/burn_wrap.c b/libisoburn/trunk/libisoburn/burn_wrap.c index e1c9f89c..17a94d4c 100644 --- a/libisoburn/trunk/libisoburn/burn_wrap.c +++ b/libisoburn/trunk/libisoburn/burn_wrap.c @@ -1549,7 +1549,8 @@ int isoburn_set_msc1(struct burn_drive *d, int adr_mode, char *adr_value, int flag) { 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]; struct isoburn *o; 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) return(-1); + start_time= last_pacifier= time(NULL); adr_num= atoi(adr_value); if(adr_mode!=3 || (flag & 2)) { disc= isoburn_toc_drive_get_disc(d); @@ -1639,6 +1641,15 @@ not_found:; if(tracks==NULL) continue; for(j= 0; j= 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); if(ret < 0) continue; @@ -1671,6 +1682,13 @@ unknown_mode:; } ret= 1; 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) isoburn_toc_disc_free(disc); if((flag & 4) && re_valid) diff --git a/libisoburn/trunk/xorriso/xorriso_timestamp.h b/libisoburn/trunk/xorriso/xorriso_timestamp.h index 5b98d5ee..8ea81e62 100644 --- a/libisoburn/trunk/xorriso/xorriso_timestamp.h +++ b/libisoburn/trunk/xorriso/xorriso_timestamp.h @@ -1 +1 @@ -#define Xorriso_timestamP "2009.04.25.162210" +#define Xorriso_timestamP "2009.04.25.162858"