Enforced tail padding with stream_recording, enlarged transport buffer

This commit is contained in:
Thomas Schmitt 2008-04-15 09:42:32 +00:00
parent a07631c57b
commit db5568c03b
3 changed files with 50 additions and 5 deletions

View File

@ -1 +1 @@
#define Cdrskin_timestamP "2008.04.12.164606" #define Cdrskin_timestamP "2008.04.15.094133"

View File

@ -43,9 +43,12 @@ SIGKILL, SIGCHLD, SIGSTOP, SIGURG, SIGWINCH
/* The maximum size for a (SCSI) i/o transaction */ /* The maximum size for a (SCSI) i/o transaction */
/* Important : MUST be at least 32768 ! */ /* Important : MUST be at least 32768 ! */
/* ts A70523 : >32k seems not good with kernel 2.4 USB drivers and audio /* ts A70523 : >32k seems not good with kernel 2.4 USB drivers and audio
#define BURN_OS_TRANSPORT_BUFFER_SIZE 65536 #define BURN_OS_TRANSPORT_BUFFER_SIZE 32768
*/ */
#define BURN_OS_TRANSPORT_BUFFER_SIZE 32768 /* ts A80414 : curbed in write.c CD media to Libburn_cd_obS = 32 kiB
re-enlarged transport to 64 kiB for BD-RE experiments
*/
#define BURN_OS_TRANSPORT_BUFFER_SIZE 65536
/* To hold the index number of the most recently delivered address from /* To hold the index number of the most recently delivered address from

View File

@ -49,6 +49,24 @@
extern struct libdax_msgs *libdax_messenger; extern struct libdax_msgs *libdax_messenger;
/* The maximum output size to be used with CD media. This is also curbed
by BURN_OS_TRANSPORT_BUFFER_SIZE. The smaller number gets into effect.
*/
#define Libburn_cd_obS (32 * 1024)
/* The size to be used with DVD media.
*/
#define Libburn_dvd_obS (32 * 1024)
/* The size to be used with BD-RE media in normal, not streamed mode.
*/
#define Libburn_bd_re_obS (32 * 1024)
/* The size to be used with BD-RE media in streamed mode.
*/
#define Libburn_bd_re_streamed_obS (64 * 1024)
static int type_to_ctrl(int mode) static int type_to_ctrl(int mode)
{ {
int ctrl = 0; int ctrl = 0;
@ -1511,7 +1529,7 @@ int burn_disc_setup_dvd_plus_r(struct burn_write_opts *o,
} }
/* ts A61218 - A70129 */ /* ts A61218 - A70415 */
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)
{ {
@ -1523,6 +1541,9 @@ int burn_dvd_write_sync(struct burn_write_opts *o,
d->needs_close_session = 0; d->needs_close_session = 0;
/* buffer flush trigger for sector.c:get_sector() */
o->obs = Libburn_dvd_obS;
if (d->current_profile == 0x1a || d->current_profile == 0x12 || if (d->current_profile == 0x1a || d->current_profile == 0x12 ||
d->current_profile == 0x43) { d->current_profile == 0x43) {
/* DVD+RW , DVD-RAM , BD-RE */ /* DVD+RW , DVD-RAM , BD-RE */
@ -1539,6 +1560,13 @@ int burn_dvd_write_sync(struct burn_write_opts *o,
goto early_failure; goto early_failure;
} }
o->obs_pad = 0; /* no filling-up of track's last 32k buffer */ o->obs_pad = 0; /* no filling-up of track's last 32k buffer */
if (d->current_profile == 0x43) /* BD-RE */
o->obs = Libburn_bd_re_obS;
if (d->do_stream_recording) {
o->obs_pad = 1;
if (d->current_profile == 0x43) /* BD-RE */
o->obs = Libburn_bd_re_streamed_obS;
}
} else if (d->current_profile == 0x13) { } else if (d->current_profile == 0x13) {
/* DVD-RW Restricted Overwrite */ /* DVD-RW Restricted Overwrite */
@ -1611,7 +1639,11 @@ int burn_dvd_write_sync(struct burn_write_opts *o,
/* ??? padding needed ??? cowardly doing it for now */ /* ??? padding needed ??? cowardly doing it for now */
o->obs_pad = 1; /* fill-up track's last 32k buffer */ o->obs_pad = 1; /* fill-up track's last 32k buffer */
} }
o->obs = 32*1024; /* buffer flush trigger for sector.c:get_sector() */
sprintf(msg, "dvd/bd Profile= %2.2Xh , obs= %d , obs_pad= %d",
d->current_profile, o->obs, o->obs_pad);
libdax_msgs_submit(libdax_messenger, d->global_index, 0x00000002,
LIBDAX_MSGS_SEV_DEBUG, LIBDAX_MSGS_PRIO_ZERO, msg, 0, 0);
for (i = 0; i < disc->sessions; i++) { for (i = 0; i < disc->sessions; i++) {
/* update progress */ /* update progress */
@ -2001,6 +2033,16 @@ void burn_disc_write_sync(struct burn_write_opts *o, struct burn_disc *disc)
goto ex; goto ex;
} }
/* ts A70521 : Linux 2.4 USB audio fails with 64 kiB */
/* ts A80414 : might need 64 kiB for BD-RE streaming */
/* buffer flush trigger for sector.c:get_sector() */
o->obs = Libburn_cd_obS;
sprintf(msg, "cd Profile= %2.2Xh , obs= %d , obs_pad= %d",
d->current_profile, o->obs, o->obs_pad);
libdax_msgs_submit(libdax_messenger, d->global_index, 0x00000002,
LIBDAX_MSGS_SEV_DEBUG, LIBDAX_MSGS_PRIO_ZERO, msg, 0, 0);
/* ts A70218 */ /* ts A70218 */
if (o->write_type == BURN_WRITE_SAO) { if (o->write_type == BURN_WRITE_SAO) {
for (i = 0 ; i < disc->session[0]->tracks; i++) { for (i = 0 ; i < disc->session[0]->tracks; i++) {