Banned mixed mode SAO (because broken in libburn and unclear in MMC)

This commit is contained in:
2007-01-22 11:42:17 +00:00
parent 7ed3bb2992
commit eaec685927
6 changed files with 70 additions and 25 deletions

View File

@ -323,6 +323,7 @@ static void *write_disc_worker_func(struct w_list *w)
void burn_disc_write(struct burn_write_opts *opts, struct burn_disc *disc)
{
struct write_opts o;
int i, j, mode, mixed_mode = 0;
/* ts A61006 */
/* a ssert(!SCAN_GOING()); */
@ -347,6 +348,23 @@ void burn_disc_write(struct burn_write_opts *opts, struct burn_disc *disc)
if (! burn_disc_write_is_ok(opts, disc)) /* issues own msgs */
return;
/* ts A70122 : libburn SAO code mishandles mode changes */
for (i = 0; i < disc->sessions; i++) {
if (disc->session[i]->tracks <= 0)
continue;
mode = disc->session[i]->track[0]->mode;
for (j = 1; j < disc->session[i]->tracks; j++)
if (mode != disc->session[i]->track[j]->mode)
mixed_mode = 1;
}
if (mixed_mode && opts->write_type == BURN_WRITE_SAO) {
libdax_msgs_submit(libdax_messenger,
opts->drive->global_index, 0x00020133,
LIBDAX_MSGS_SEV_SORRY, LIBDAX_MSGS_PRIO_HIGH,
"Cannot mix data and audio in SAO mode", 0, 0);
return;
}
o.drive = opts->drive;
o.opts = opts;
o.disc = disc;

View File

@ -110,14 +110,18 @@ enum burn_write_types
currently unsupported
*/
BURN_WRITE_PACKET,
/** Track At Once recording.
2s gaps between tracks, no fonky lead-ins
*/
BURN_WRITE_TAO,
/** Session At Once.
block type MUST be BURN_BLOCK_SAO
Block type MUST be BURN_BLOCK_SAO
ts A70122 : Currently not capable of mixing data and audio tracks.
*/
BURN_WRITE_SAO,
/** Raw disc at once recording.
all subcodes must be provided by lib or user
only raw block types are supported
@ -925,6 +929,9 @@ void burn_disc_read(struct burn_drive *drive, const struct burn_read_opts *o);
/** Write a disc in the drive. The drive must be grabbed successfully before
calling this function. Always ensure that the drive reports a status of
BURN_DISC_BLANK before calling this function.
Note: write_type BURN_WRITE_SAO is currently not capable of writing a mix
of data and audio tracks. You must use BURN_WRITE_TAO for such sessions.
To be set by burn_write_opts_set_write_type().
@param o The options for the writing operation.
@param disc The struct burn_disc * that described the disc to be created
*/
@ -980,7 +987,7 @@ int burn_msf_to_lba(int m, int s, int f);
*/
void burn_lba_to_msf(int lba, int *m, int *s, int *f);
/** Create a new disc (for DAO recording)*/
/** Create a new disc */
struct burn_disc *burn_disc_create(void);
/** Delete disc and decrease the reference count on all its sessions
@ -988,9 +995,7 @@ struct burn_disc *burn_disc_create(void);
*/
void burn_disc_free(struct burn_disc *d);
/** Create a new session (For SAO at once recording, or to be added to a
disc for DAO)
*/
/** Create a new session */
struct burn_session *burn_session_create(void);
/** Free a session (and decrease reference count on all tracks inside)
@ -1145,7 +1150,9 @@ void burn_structure_print_disc(struct burn_disc *d);
void burn_structure_print_session(struct burn_session *s);
void burn_structure_print_track(struct burn_track *t);
/** Sets the write type for the write_opts struct
/** Sets the write type for the write_opts struct.
Note: write_type BURN_WRITE_SAO is currently not capable of writing a mix
of data and audio tracks. You must use BURN_WRITE_TAO for such sessions.
@param opts The write opts to change
@param write_type The write type to use
@param block_type The block type to use

View File

@ -1,7 +1,8 @@
/* libdax_msgs
Message handling facility of libdax.
Copyright (C) 2006 Thomas Schmitt <scdbackup@gmx.net>, provided under GPL
Copyright (C) 2006-2007 Thomas Schmitt <scdbackup@gmx.net>,
provided under GPL
*/
@ -349,7 +350,8 @@ Range "scdbackup" : 0x00020000 to 0x0002ffff
0x00020129 (SORRY,HIGH) = Will not format media type
0x00020130 (SORRY,HIGH) = Drive and media state unsuitable for blanking
0x00020131 (SORRY,HIGH) = No suitable formatting type offered by drive
0x00020132 (SORRY,HIGH) = Selected format is not suitable for libburn
0x00020133 (SORRY,HIGH) = Cannot mix data and audio in SAO mode
libdax_audioxtr:
0x00020200 (SORRY,HIGH) = Cannot open audio source file

View File

@ -428,8 +428,8 @@ struct cue_sheet *burn_create_toc_entries(struct burn_write_opts *o,
show any although 6.33.3.19 would prescribe some.
Nobody seems to have ever tested this situation, up to now.
I shall ban resp. avoid it in cdrskin and libburner. A warning will be
placed in libburn.h . Some ban is needed in burn_disc_write().
It is banned for now in burn_disc_write().
Warning have been placed in libburn.h .
*/
tar[i]->pregap2 = 1;