[Libburn] Progress details

Tiago Cogumbreiro cogumbreiro@linus.uac.pt
Wed, 03 Dec 2003 23:49:56 -0100


On Qua, 2003-12-03 at 23:32, Derek Foreman wrote:
> On Wed, 3 Dec 2003, Tiago Cogumbreiro wrote:
> 
> > Hi again,
> > I've been playing around with your burniso.c example and i was wondering
> > how to work with progress, i was trying to use it like this:
> >
> > 	struct libburn_progress prog;
> > 	int ret = libburn_drive_get_busy(drive, &prog);
> > 	if(ret) {
> > 		printf("Session: %d/%d ", prog.session, prog.sessions);
> > 		printf("Track: %d/%d " , prog.track, prog.tracks);
> > 		printf("Index: %d/%d " , prog.index, prog.indices);
> > 		printf("Abs Sectors: %d/%d ", prog.abs_sector, prog.abs_sectors);
> > 		printf("Rel Sectors: %d/%d ", prog.rel_sector, prog.rel_sectors);
> > 	}
> >
> > This is the output i get:
> > S: -1073743820/1078199456 T: 1078312456/1073836040 I: 0/-1073743864 AS:
> > 1078312456/134532312 RS: 0/-1073743848
> > S: -1073743820/1078199456 T: 1078312456/1073836040 I: 0/-1073743864 AS:
> > 1078312456/134532312 RS: 0/-1073743848
> > S: -1073743820/1078199456 T: 1078312456/1073836040 I: 0/-1073743864 AS:
> > 1078312456/134532312 RS: 0/-1073743848
> > (...)
> >
> > My question is the following, is the progress implemented or am i using
> > it wrong? If it is which operations supported and which don't?
> >
> > Thank you.
> 
> 
> Here's the current code for libburn_drive_get_busy
> int libburn_drive_get_busy(struct drive *d, struct libburn_progress *p)
> {
>         if (p) {
>                 /* this is where we do stuff! */
>         }
>         return d->busy != LIBBURN_BUSY_NO;
> }
> 
> heh.
> 
> On the positive side, you're using it exactly as I'd intended, so when I
> finally write that code it'll suddenly work right. :)
Lol :)
Btw, what do the progress field values mean?
What's the difference between relative and absolute sectors? And what is
the difference between the singular and plural fields?

I can try to implement this if you want, i already did a progress bar in
java for blanking a CD so i know how to get the progress in a CD
blanking operation, the writing operation is simpler so there shouldn't
be any problem with that either.

Tiago