Browse Source

Bug fix: Stream recording was applied regardless whether the drive offers it

tags/release-1.5.2
Thomas Schmitt 1 year ago
parent
commit
39f2712bb7
5 changed files with 40 additions and 13 deletions
  1. +1
    -1
      cdrskin/cdrskin_timestamp.h
  2. +32
    -3
      libburn/drive.c
  3. +1
    -0
      libburn/libdax_msgs.h
  4. +0
    -4
      libburn/mmc.c
  5. +6
    -5
      libburn/write.c

+ 1
- 1
cdrskin/cdrskin_timestamp.h View File

@@ -1 +1 @@
#define Cdrskin_timestamP "2018.12.12.125445"
#define Cdrskin_timestamP "2019.04.13.173355"

+ 32
- 3
libburn/drive.c View File

@@ -1169,15 +1169,44 @@ enum burn_drive_status burn_drive_get_status(struct burn_drive *d,
return d->busy;
}


int burn_drive_set_stream_recording(struct burn_drive *d, int recmode,
int start, int flag)
{
#ifndef Libburn_force_stream_recordinG
struct burn_feature_descr *descr;
#endif

if (recmode == 1) {

#ifdef Libburn_force_stream_recordinG

if (recmode == 1)
d->do_stream_recording = 1;
else if (recmode == -1)

#else /* Libburn_force_stream_recordinG */

d->do_stream_recording = 0;
if (burn_drive_has_feature(d, 0x107, &descr, 0)) {
if ((descr->data[0] & 1) && (descr->flags & 1))
d->do_stream_recording = 1;
}
if (!d->do_stream_recording) {
libdax_msgs_submit(libdax_messenger, d->global_index,
0x000201ac,
LIBDAX_MSGS_SEV_NOTE, LIBDAX_MSGS_PRIO_HIGH,
"Drive currently does not offer Stream Recording",
0, 0);
}

#endif /* ! Libburn_force_stream_recordinG */

} else if (recmode == -1) {
d->do_stream_recording = 0;
d->stream_recording_start = start;
}
if (d->do_stream_recording)
d->stream_recording_start = start;
else
d->stream_recording_start = 0;
return(1);
}



+ 1
- 0
libburn/libdax_msgs.h View File

@@ -614,6 +614,7 @@ Range "scdbackup" : 0x00020000 to 0x0002ffff
0x000201a9 (FAILURE,HIGH) = Implausible length from GET CONFIGURATION
0x000201aa (FAILURE,HIGH) = No CD-TEXT packs in file
0x000201ab (WARN,HIGH) = Leaving burn_source_fifo object undisposed
0x000201ac (NOTE,HIGH) = Drive currently does not offer Stream Recording


libdax_audioxtr:


+ 0
- 4
libburn/mmc.c View File

@@ -995,10 +995,6 @@ fprintf(stderr, "libburn_DEBUG: buffer sectors= %d bytes= %d\n",

/* ts A80412 */
if(d->do_stream_recording > 0 && start >= d->stream_recording_start) {

/* >>> ??? is WRITE12 available ? */
/* >>> ??? inquire feature 107h Stream Writing bit ? */

scsi_init_command(c, MMC_WRITE_12, sizeof(MMC_WRITE_12));
mmc_int_to_four_char(c->opcode + 2, start);
mmc_int_to_four_char(c->opcode + 6, len);


+ 6
- 5
libburn/write.c View File

@@ -2925,7 +2925,7 @@ void burn_disc_write_sync(struct burn_write_opts *o, struct burn_disc *disc)
struct buffer *buffer_mem = o->drive->buffer;
struct burn_session *s;
struct burn_track *lt, *t;
int first = 1, i, ret, lba, nwa = 0, multi_mem;
int first = 1, i, ret, lba, nwa = 0, multi_mem, stream_recording_start;
off_t default_size;
char msg[80];

@@ -2937,12 +2937,13 @@ void burn_disc_write_sync(struct burn_write_opts *o, struct burn_disc *disc)
/* ts A61224 */
burn_disc_init_write_status(o, disc); /* must be done very early */

/* ts A80412 , A90227 */
d->do_stream_recording = !!o->do_stream_recording;
/* ts A80412 , A90227 , B90411 */
if (o->do_stream_recording >= 16)
d->stream_recording_start = o->do_stream_recording;
stream_recording_start = o->do_stream_recording;
else
d->stream_recording_start = 0;
stream_recording_start = 0;
burn_drive_set_stream_recording(d, !!o->do_stream_recording,
stream_recording_start, 0);

/* ts A91122 : Get buffer suitable for sources made by
burn_os_open_track_src() */


Loading…
Cancel
Save