Implemented track number patch by bonfire-app@wanadoo.fr, tickets 58 and 9

This commit is contained in:
Thomas Schmitt 2006-09-01 10:52:01 +00:00
parent 749be2350b
commit 44031bc2af
2 changed files with 10 additions and 11 deletions

View File

@ -163,9 +163,7 @@ or
#define Cdrskin_libburn_does_ejecT 1 #define Cdrskin_libburn_does_ejecT 1
#define Cdrskin_libburn_has_drive_get_adR 1 #define Cdrskin_libburn_has_drive_get_adR 1
/* >>> upcoming
#define Cdrskin_progress_track_does_worK 1 #define Cdrskin_progress_track_does_worK 1
*/
#ifdef Cdrskin_new_api_tesT #ifdef Cdrskin_new_api_tesT
@ -2951,6 +2949,7 @@ int Cdrskin_burn_pacifier(struct CdrskiN *skin,
int ret,fifo_percent,fill,space,advance_interval=0,new_mb,old_mb,time_to_tell; int ret,fifo_percent,fill,space,advance_interval=0,new_mb,old_mb,time_to_tell;
int fs,bs,old_track_idx; int fs,bs,old_track_idx;
char fifo_text[80],mb_text[40]; char fifo_text[80],mb_text[40];
char *debug_mark= ""; /* use this to prepend a marker text for experiments */
/* for debugging */ /* for debugging */
static double last_fifo_in= 0.0,last_fifo_out= 0.0,curr_fifo_in,curr_fifo_out; static double last_fifo_in= 0.0,last_fifo_out= 0.0,curr_fifo_in,curr_fifo_out;
@ -3001,9 +3000,9 @@ int Cdrskin_burn_pacifier(struct CdrskiN *skin,
written_bytes= written_total_bytes-*last_count; written_bytes= written_total_bytes-*last_count;
old_track_idx= skin->supposed_track_idx;
#ifdef Cdrskin_progress_track_brokeN #ifdef Cdrskin_progress_track_brokeN
/* with libburn.0.2 there is always reported 0 as p->track */ /* with libburn.0.2 there is always reported 0 as p->track */
old_track_idx= skin->supposed_track_idx;
if(written_bytes<0) { /* track hop ? */ if(written_bytes<0) { /* track hop ? */
if(skin->supposed_track_idx+1<skin->track_counter) if(skin->supposed_track_idx+1<skin->track_counter)
skin->supposed_track_idx++; skin->supposed_track_idx++;
@ -3012,9 +3011,6 @@ int Cdrskin_burn_pacifier(struct CdrskiN *skin,
if(p->track>0) if(p->track>0)
skin->supposed_track_idx= p->track; skin->supposed_track_idx= p->track;
#else /* Cdrskin_progress_track_brokeN */ #else /* Cdrskin_progress_track_brokeN */
/* >>> upcomming
old_track_idx=
*/
skin->supposed_track_idx= p->track; skin->supposed_track_idx= p->track;
#endif /* ! Cdrskin_progress_track_brokeN */ #endif /* ! Cdrskin_progress_track_brokeN */
@ -3022,8 +3018,8 @@ int Cdrskin_burn_pacifier(struct CdrskiN *skin,
Cdrtrack_get_size(skin->tracklist[old_track_idx],&fixed_size,&padding,0); Cdrtrack_get_size(skin->tracklist[old_track_idx],&fixed_size,&padding,0);
if(skin->verbosity>=Cdrskin_verbose_progresS) if(skin->verbosity>=Cdrskin_verbose_progresS)
printf("\n"); printf("\n");
printf("Track %-2.2d: Total bytes read/written: %.f/%.f (%.f sectors).\n", printf("%sTrack %-2.2d: Total bytes read/written: %.f/%.f (%.f sectors).\n",
old_track_idx+1,fixed_size,fixed_size,fixed_size/2048.0); debug_mark,old_track_idx+1,fixed_size,fixed_size,fixed_size/2048.0);
} }
if(written_total_bytes<1024*1024) { if(written_total_bytes<1024*1024) {
@ -3136,8 +3132,8 @@ thank_you_for_patience:;
(int) ((fixed_size+padding)/1024.0/1024.0)); (int) ((fixed_size+padding)/1024.0/1024.0));
} else } else
sprintf(mb_text,"%4d",(int) (written_total_bytes/1024.0/1024.0)); sprintf(mb_text,"%4d",(int) (written_total_bytes/1024.0/1024.0));
printf("\rTrack %-2.2d: %s MB written %s[buf 50%%] %4.1fx.", printf("\r%sTrack %-2.2d: %s MB written %s[buf 50%%] %4.1fx.",
skin->supposed_track_idx+1,mb_text,fifo_text, debug_mark,skin->supposed_track_idx+1,mb_text,fifo_text,
measured_speed/Cdrskin_cd_speed_factoR); measured_speed/Cdrskin_cd_speed_factoR);
fflush(stdout); fflush(stdout);
} }

View File

@ -392,7 +392,10 @@ int burn_write_track(struct burn_write_opts *o, struct burn_session *s,
d->progress.sectors = sectors; d->progress.sectors = sectors;
d->progress.sector = 0; d->progress.sector = 0;
burn_print(12, "track is %d sectors long\n", sectors); /* ts A60831: added tnum-line, extended print message on proposal
by bonfire-app@wanadoo.fr in http://libburn.pykix.org/ticket/58 */
d->progress.track = tnum;
burn_print(12, "track %d is %d sectors long\n", tnum, sectors);
if (tnum == s->tracks) if (tnum == s->tracks)
tmp = sectors > 150 ? 150 : sectors; tmp = sectors > 150 ? 150 : sectors;