Refuse to burn audio tracks to DVD
This commit is contained in:
parent
5e7ac69a89
commit
4bb8cf73b8
@ -1 +1 @@
|
|||||||
#define Cdrskin_timestamP "2006.12.20.111932"
|
#define Cdrskin_timestamP "2006.12.20.142301"
|
||||||
|
@ -340,6 +340,7 @@ Range "scdbackup" : 0x00020000 to 0x0002ffff
|
|||||||
0x00020120 (NOTE,HIGH) = FORMAT UNIT ignored
|
0x00020120 (NOTE,HIGH) = FORMAT UNIT ignored
|
||||||
0x00020121 (FATAL,HIGH) = Write preparation setup failed
|
0x00020121 (FATAL,HIGH) = Write preparation setup failed
|
||||||
0x00020122 (FATAL,HIGH) = SCSI error on format_unit
|
0x00020122 (FATAL,HIGH) = SCSI error on format_unit
|
||||||
|
0x00020123 (SORRY,HIGH) = DVD Media are unsuitable for desired track type
|
||||||
|
|
||||||
libdax_audioxtr:
|
libdax_audioxtr:
|
||||||
0x00020200 (SORRY,HIGH) = Cannot open audio source file
|
0x00020200 (SORRY,HIGH) = Cannot open audio source file
|
||||||
|
@ -941,10 +941,25 @@ int burn_disc_setup_dvd_plus_rw(struct burn_write_opts *o,
|
|||||||
int burn_dvd_write_sync(struct burn_write_opts *o,
|
int burn_dvd_write_sync(struct burn_write_opts *o,
|
||||||
struct burn_disc *disc)
|
struct burn_disc *disc)
|
||||||
{
|
{
|
||||||
int i, ret;
|
int i, ret, sx, tx, mode, exotic_track = 0;
|
||||||
struct burn_drive *d = o->drive;
|
struct burn_drive *d = o->drive;
|
||||||
char msg[160];
|
char msg[160];
|
||||||
|
|
||||||
|
for (sx = 0; sx < disc->sessions; sx++)
|
||||||
|
for (tx = 0 ; tx < disc->session[sx]->tracks; tx++) {
|
||||||
|
mode = disc->session[sx]->track[tx]->mode;
|
||||||
|
if (disc->session[sx]->track[tx]->mode != BURN_MODE1)
|
||||||
|
exotic_track = 1;
|
||||||
|
}
|
||||||
|
if (exotic_track) {
|
||||||
|
sprintf(msg,"DVD Media are unsuitable for desired track type");
|
||||||
|
libdax_msgs_submit(libdax_messenger, d->global_index,
|
||||||
|
0x00020123,
|
||||||
|
LIBDAX_MSGS_SEV_SORRY, LIBDAX_MSGS_PRIO_HIGH,
|
||||||
|
msg, 0,0);
|
||||||
|
goto early_failure;
|
||||||
|
}
|
||||||
|
|
||||||
if (strcmp(d->current_profile_text,"DVD+RW")==0) {
|
if (strcmp(d->current_profile_text,"DVD+RW")==0) {
|
||||||
|
|
||||||
if (disc->sessions!=1 || disc->session[0]->tracks>1) {
|
if (disc->sessions!=1 || disc->session[0]->tracks>1) {
|
||||||
@ -954,7 +969,7 @@ int burn_dvd_write_sync(struct burn_write_opts *o,
|
|||||||
0x0002011f,
|
0x0002011f,
|
||||||
LIBDAX_MSGS_SEV_SORRY, LIBDAX_MSGS_PRIO_HIGH,
|
LIBDAX_MSGS_SEV_SORRY, LIBDAX_MSGS_PRIO_HIGH,
|
||||||
msg, 0,0);
|
msg, 0,0);
|
||||||
return 0;
|
goto early_failure;
|
||||||
}
|
}
|
||||||
|
|
||||||
ret = burn_disc_setup_dvd_plus_rw(o, disc);
|
ret = burn_disc_setup_dvd_plus_rw(o, disc);
|
||||||
@ -965,7 +980,7 @@ int burn_dvd_write_sync(struct burn_write_opts *o,
|
|||||||
0x00020121,
|
0x00020121,
|
||||||
LIBDAX_MSGS_SEV_FATAL, LIBDAX_MSGS_PRIO_HIGH,
|
LIBDAX_MSGS_SEV_FATAL, LIBDAX_MSGS_PRIO_HIGH,
|
||||||
msg, 0,0);
|
msg, 0,0);
|
||||||
return 0;
|
goto early_failure;
|
||||||
}
|
}
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
@ -975,7 +990,7 @@ int burn_dvd_write_sync(struct burn_write_opts *o,
|
|||||||
0x0002011e,
|
0x0002011e,
|
||||||
LIBDAX_MSGS_SEV_SORRY, LIBDAX_MSGS_PRIO_HIGH,
|
LIBDAX_MSGS_SEV_SORRY, LIBDAX_MSGS_PRIO_HIGH,
|
||||||
msg, 0,0);
|
msg, 0,0);
|
||||||
return 0;
|
goto early_failure;
|
||||||
}
|
}
|
||||||
|
|
||||||
o->obs = 32*1024; /* buffer flush trigger for sector.c:get_sector() */
|
o->obs = 32*1024; /* buffer flush trigger for sector.c:get_sector() */
|
||||||
@ -1003,6 +1018,12 @@ ex:;
|
|||||||
burn_drive_inquire_media(d);
|
burn_drive_inquire_media(d);
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
|
early_failure:;
|
||||||
|
pthread_mutex_lock(&d->access_lock);
|
||||||
|
d->cancel = 1;
|
||||||
|
pthread_mutex_unlock(&d->access_lock);
|
||||||
|
usleep(500001); /* to avoid a warning from remove_worker() */
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user