New struct burn_progress_v2 and API call burn_drive_get_status_v2()

This commit is contained in:
2024-03-01 19:51:34 +01:00
parent 17a020e9fc
commit d48bbb4b66
10 changed files with 143 additions and 29 deletions

View File

@ -1,7 +1,7 @@
/* -*- indent-tabs-mode: t; tab-width: 8; c-basic-offset: 8; -*- */
/* Copyright (c) 2004 - 2006 Derek Foreman, Ben Jansens
Copyright (c) 2006 - 2017 Thomas Schmitt <scdbackup@gmx.net>
Copyright (c) 2006 - 2024 Thomas Schmitt <scdbackup@gmx.net>
Provided under GPL version 2 or later.
*/
@ -279,7 +279,7 @@ static void *scan_worker_func(struct w_list *w)
}
static void reset_progress(struct burn_drive *d, int sessions, int tracks,
int indices, int sectors, int flag)
int indices, off_t sectors, int flag)
{
/* reset the progress indicator */
d->progress.session = 0;
@ -412,7 +412,7 @@ void burn_disc_erase(struct burn_drive *drive, int fast)
return;
}
reset_progress(drive, 1, 1, 1, 0x10000, 0);
reset_progress(drive, 1, 1, 1, (off_t) 0x10000, 0);
/* A70103 : will be set to 0 by burn_disc_erase_sync() */
drive->cancel = 1;
@ -494,7 +494,7 @@ void burn_disc_format(struct burn_drive *drive, off_t size, int flag)
int ok = 0, ret;
char msg[40];
reset_progress(drive, 1, 1, 1, 0x10000, 0);
reset_progress(drive, 1, 1, 1, (off_t) 0x10000, 0);
if ((SCAN_GOING()) || find_worker(drive) != NULL) {
libdax_msgs_submit(libdax_messenger, drive->global_index,
@ -652,7 +652,7 @@ void burn_disc_write(struct burn_write_opts *opts, struct burn_disc *disc)
}
reset_progress(d, disc->sessions, disc->session[0]->tracks,
disc->session[0]->track[0]->indices, 0, 0);
disc->session[0]->track[0]->indices, (off_t) 0, 0);
/* For the next lines any return indicates failure */
d->cancel = 1;