diff --git a/cdrskin/cdrskin_timestamp.h b/cdrskin/cdrskin_timestamp.h index 984a9f9..5f261e7 100644 --- a/cdrskin/cdrskin_timestamp.h +++ b/cdrskin/cdrskin_timestamp.h @@ -1 +1 @@ -#define Cdrskin_timestamP "2024.03.01.185046" +#define Cdrskin_timestamP "2024.03.02.131145" diff --git a/libburn/drive.c b/libburn/drive.c index 1ff182b..b01ff0f 100644 --- a/libburn/drive.c +++ b/libburn/drive.c @@ -2693,10 +2693,10 @@ int burn_disc_read_atip(struct burn_drive *d) } /* ts A61110 : new API function */ -int burn_disc_track_lba_nwa(struct burn_drive *d, struct burn_write_opts *o, - int trackno, int *lba, int *nwa) +int burn_disc_track_lba_nwa_v2(struct burn_drive *d, struct burn_write_opts *o, + int trackno, off_t *lba, off_t *nwa) { - int ret; + int ret, int_lba, int_nwa; if (burn_drive_is_released(d)) { libdax_msgs_submit(libdax_messenger, @@ -2724,11 +2724,38 @@ int burn_disc_track_lba_nwa(struct burn_drive *d, struct burn_write_opts *o, return 0; if (o != NULL) d->send_write_parameters(d, NULL, -1, o); - ret = d->get_nwa(d, trackno, lba, nwa); + ret = d->get_nwa(d, trackno, &int_lba, &int_nwa); + if (ret <= 0) + return ret; + *lba = int_lba; + *nwa = int_nwa; return ret; } +/* ts A61110 / C40302 : API */ +int burn_disc_track_lba_nwa(struct burn_drive *d, struct burn_write_opts *o, + int trackno, int *lba, int *nwa) +{ + int ret; + off_t off_lba, off_nwa; + + ret = burn_disc_track_lba_nwa_v2(d, o, trackno, &off_lba, &off_nwa); + if (ret <= 0) + return ret; + if (off_lba > 0x7fffffff) + *lba = 0x7fffffff; + else + *lba = off_lba; + if (off_nwa > 0x7fffffff) { + *nwa = 0x7fffffff; + return 0; + } else { + *nwa = off_nwa; + } + return 1; +} + /* ts A70131 : new API function */ int burn_disc_get_msc1(struct burn_drive *d, int *start) { diff --git a/libburn/libburn.h b/libburn/libburn.h index 151d3fc..046ae7c 100644 --- a/libburn/libburn.h +++ b/libburn/libburn.h @@ -763,7 +763,7 @@ struct burn_progress_v2 { off_t buffered_bytes; /** The minimum number of bytes stored in buffer during write. (Caution: Before surely one buffer size of bytes was processed, - this value is 0xffffffffffffffff.) + this value is 0x7fffffffffffffff.) */ off_t buffer_min_fill; }; @@ -1542,6 +1542,13 @@ int burn_disc_get_phys_format_info(struct burn_drive *d, int *disk_category, int burn_disc_track_lba_nwa(struct burn_drive *d, struct burn_write_opts *o, int trackno, int *lba, int *nwa); +/* ts C40302 */ +/** Like burn_disc_track_lba_nwa(), but with off_t results. + @since 1.5.8 +*/ +int burn_disc_track_lba_nwa_v2(struct burn_drive *d, struct burn_write_opts *o, + int trackno, off_t *lba, off_t *nwa); + /* ts B10525 */ /** Tells whether a previous attempt to determine the Next Writeable Address of the upcoming track reveiled that the READ TRACK INFORMATION Damage Bit diff --git a/libburn/libburn.ver b/libburn/libburn.ver index 458842d..046eaf1 100644 --- a/libburn/libburn.ver +++ b/libburn/libburn.ver @@ -216,5 +216,6 @@ local: *; LIBBURN4_1.5.8 { burn_drive_get_status_v2; +burn_disc_track_lba_nwa_v2; } LIBBURN4; diff --git a/libburn/transport.h b/libburn/transport.h index eea4cb4..ab24e43 100644 --- a/libburn/transport.h +++ b/libburn/transport.h @@ -384,8 +384,8 @@ struct burn_drive */ int mr_capacity_trusted; - /* ts B10314 : Next Writeable Address for drive_role == 5 */ - int role_5_nwa; + /* ts B10314 / C40302 : Next Writeable Address for drive_role == 5 */ + off_t role_5_nwa; /* ts B60730 */ int do_no_immed;