[Libburn] Lead-In and Lead-Out progress

Tiago Cogumbreiro cogumbreiro@linus.uac.pt
Tue, 09 Dec 2003 20:40:08 -0100


--=-ZkjZzFy3ryj8xU79Z6Mp
Content-Type: text/plain
Content-Transfer-Encoding: 7bit

Here goes the Lead-In and Lead-Out progress.

Tiago Cogumbreiro

--=-ZkjZzFy3ryj8xU79Z6Mp
Content-Disposition: attachment; filename=leadin_progress.diff
Content-Type: text/x-patch; name=leadin_progress.diff; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit

? libburn/.write.c.swp
Index: libburn/write.c
===================================================================
RCS file: /cvs/burn/burn/libburn/write.c,v
retrieving revision 1.29
diff -p -u -r1.29 write.c
--- libburn/write.c	9 Dec 2003 00:05:47 -0000	1.29
+++ libburn/write.c	9 Dec 2003 21:38:45 -0000
@@ -176,6 +176,7 @@ void burn_write_leadin(struct drive *d, 
                           int first)
 {
 	int count;
+	
 	d->busy = BURN_DRIVE_WRITING_LEADIN;
 
 	printf(first?"    first leadin\n":"    leadin\n");
@@ -186,10 +187,15 @@ void burn_write_leadin(struct drive *d, 
 		count = 0 - d->alba - 150;
 	else
 		count = 4500;
-
+	
+	d->progress.start_sector = d->alba;
+	d->progress.sectors = count;
+	d->progress.current_sector = 0;
+	
 	while (count != 0) {
 		sector_toc(d, s->track[0]->mode);
 		count--;
+		d->progress.current_sector++;
 	}
 	d->busy = BURN_DRIVE_WRITING;
 }
@@ -207,9 +213,14 @@ void burn_write_leadout(struct drive *d,
 		count = 6750;
 	else
 		count = 2250;
+	d->progress.start_sector = d->alba;
+	d->progress.sectors = count;
+	d->progress.current_sector = 0;
+	
 	while (count != 0) {
 		sector_lout(d, control, mode);
 		count--;
+		d->progress.current_sector++;
 	}
 	d->busy = BURN_DRIVE_WRITING;
 }

--=-ZkjZzFy3ryj8xU79Z6Mp--