diff --git a/cdrskin/cdrskin_timestamp.h b/cdrskin/cdrskin_timestamp.h index d3262d6..60a004a 100644 --- a/cdrskin/cdrskin_timestamp.h +++ b/cdrskin/cdrskin_timestamp.h @@ -1 +1 @@ -#define Cdrskin_timestamP "2007.02.03.205526" +#define Cdrskin_timestamP "2007.02.05.132335" diff --git a/libburn/mmc.c b/libburn/mmc.c index e8e18d9..ab2ff4b 100644 --- a/libburn/mmc.c +++ b/libburn/mmc.c @@ -78,9 +78,14 @@ extern struct libdax_msgs *libdax_messenger; is readable by afio. Third and forth veryfy too. Suddenly dvd+rw-mediainfo sees lba 0 with track 2. But #2 still verifies if one knows its address. + ts A70203 : DVD-RW need to get blanked fully. Then feature 0021h persists. + Meanwhile Incremental streaming is supported like CD TAO: + with unpredicted size, multi-track, multi-session. + ts A70205 : Beginning to implement DVD-R[W] DAO : single track and session, + size prediction mandatory. Todo: - Determine first free lba for appending data. + Determine first free lba for appending data on overwriteables. */ @@ -131,6 +136,10 @@ static unsigned char MMC_GET_PERFORMANCE[] = static unsigned char MMC_READ_FORMAT_CAPACITIES[] = { 0x23, 0, 0, 0, 0, 0, 0, 0, 0, 0}; +/* ts A70205 : To describe the layout of a DVD-R[W] DAO session */ +static unsigned char MMC_RESERVE_TRACK[] = + { 0x53, 0, 0, 0, 0, 0, 0, 0, 0, 0}; + static int mmc_function_spy_do_tell = 0; @@ -191,6 +200,31 @@ void mmc_send_cue_sheet(struct burn_drive *d, struct cue_sheet *s) } +/* ts A70205 : Announce size of a DVD-R[W] DAO session. + @param size The size in bytes to be announced to the drive. + It will get rounded up to align to 32 KiB. +*/ +int mmc_reserve_track(struct burn_drive *d, off_t size) +{ + struct command c; + int lba; + + mmc_function_spy("mmc_reserve_track"); + c.retry = 1; + c.oplen = sizeof(MMC_RESERVE_TRACK); + memcpy(c.opcode, MMC_RESERVE_TRACK, sizeof(MMC_RESERVE_TRACK)); + + /* Nice rounding trick learned from dvd+rw-tools */ + lba = ((size + (off_t) 0x7fff) >> 11) & ~0xf; + mmc_int_to_four_char(c.opcode+5, lba); + + c.page = NULL; + c.dir = NO_TRANSFER; + d->issue_command(d, &c); + return !!c.error; +} + + /* ts A70201 : Common track info fetcher for mmc_get_nwa() and mmc_fake_toc() */ @@ -2152,6 +2186,7 @@ int mmc_setup_drive(struct burn_drive *d) d->perform_opc = mmc_perform_opc; d->set_speed = mmc_set_speed; d->send_cue_sheet = mmc_send_cue_sheet; + d->reserve_track = mmc_reserve_track; d->sync_cache = mmc_sync_cache; d->get_nwa = mmc_get_nwa; d->read_multi_session_c1 = mmc_read_multi_session_c1; diff --git a/libburn/transport.h b/libburn/transport.h index 3938172..80bc4e2 100644 --- a/libburn/transport.h +++ b/libburn/transport.h @@ -162,10 +162,11 @@ struct burn_drive int current_feat21h_link_size; /* Flags from feature 002Fh feature descriptor mmc5r03c.pdf 5.3.25 : - bit1= DVD-RW supported - bit2= Test Write available - bit3= DVD-R DL supported - bit6= Buffer Under-run Free recording available (page 05h BUFE) + bit1= DVD-RW supported + bit2= Test Write available + bit3= DVD-R DL supported + bit6= Buffer Under-run Free recording available (page 05h BUFE) + Value -1 indicates that no 002Fh was current in the features list. */ int current_feat2fh_byte4; @@ -250,6 +251,10 @@ struct burn_drive void (*send_write_parameters) (struct burn_drive *, const struct burn_write_opts *); void (*send_cue_sheet) (struct burn_drive *, struct cue_sheet *); + + /* ts A70205 : Announce size of a DVD-R[W] DAO session. */ + int (*reserve_track) (struct burn_drive *d, off_t size); + void (*sync_cache) (struct burn_drive *); int (*get_erase_progress) (struct burn_drive *); int (*get_nwa) (struct burn_drive *, int trackno, int *lba, int *nwa);