[Libburn] Progress details

Derek Foreman manmower@signalmarketing.com
Wed, 3 Dec 2003 18:32:44 -0600 (CST)


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. :)