From 2b74f6fa633d788d36baba62bbbcf735f0227d46 Mon Sep 17 00:00:00 2001 From: Thomas Schmitt Date: Sun, 4 Aug 2013 10:03:21 +0000 Subject: [PATCH] Changed default write chunk size for BD to 64 KiB --- cdrskin/cdrskin.1 | 3 +-- cdrskin/cdrskin_timestamp.h | 2 +- configure.ac | 6 +++--- libburn/write.c | 22 ++++++++++++++-------- 4 files changed, 19 insertions(+), 14 deletions(-) diff --git a/cdrskin/cdrskin.1 b/cdrskin/cdrskin.1 index 7aa47e9..62c87fc 100644 --- a/cdrskin/cdrskin.1 +++ b/cdrskin/cdrskin.1 @@ -2,7 +2,7 @@ .\" First parameter, NAME, should be all caps .\" Second parameter, SECTION, should be 1-8, maybe w/ subsection .\" other parameters are allowed: see man(7), man(1) -.TH CDRSKIN 1 "Version 1.3.1, Jul 08, 2013" +.TH CDRSKIN 1 "Version 1.3.1, Aug 04, 2013" .\" Please adjust this date whenever revising the manpage. .\" .\" Some roff macros, for reference: @@ -1070,7 +1070,6 @@ media dependend transaction size. With DVD-RAM, BD-RE, DVD+RW this is 2k, with overwriteable DVD-RW it is 32k. .TP .BI dvd_obs= default|32k|64k -Linux specific: Set the number of bytes to be transmitted with each write operation to DVD or BD media. With most write types, tracks get padded up to the next multiple of this write size (see option --obs_pad). diff --git a/cdrskin/cdrskin_timestamp.h b/cdrskin/cdrskin_timestamp.h index 8e23fba..d1613a3 100644 --- a/cdrskin/cdrskin_timestamp.h +++ b/cdrskin/cdrskin_timestamp.h @@ -1 +1 @@ -#define Cdrskin_timestamP "2013.07.29.091415" +#define Cdrskin_timestamP "2013.08.04.100247" diff --git a/configure.ac b/configure.ac index 8d31c0a..20d0f7a 100644 --- a/configure.ac +++ b/configure.ac @@ -221,14 +221,14 @@ CFLAGS="$LIBBURN_O_DIRECT_DEF $CFLAGS" dnl ts A91116 AC_ARG_ENABLE(dvd-obs-64k, -[ --enable-dvd-obs-64k 64 KB default size for DVD/BD writing, default=no], +[ --enable-dvd-obs-64k 64 KB default size for DVD writing, default=no], , enable_dvd_obs_64k=no) if test x$enable_dvd_obs_64k = xyes; then LIBBURN_DVD_OBS_64K="-DLibburn_dvd_obs_default_64K" - echo "enabled write size default 64 KB on DVD and BD" + echo "enabled write size default 64 KB on DVD" else LIBBURN_DVD_OBS_64K= - echo "disabled write size default 64 KB on DVD and BD" + echo "disabled write size default 64 KB on DVD" fi CFLAGS="$LIBBURN_DVD_OBS_64K $CFLAGS" diff --git a/libburn/write.c b/libburn/write.c index d566184..d0b27f4 100644 --- a/libburn/write.c +++ b/libburn/write.c @@ -76,11 +76,15 @@ extern struct libdax_msgs *libdax_messenger; /* The size to be used with BD-RE media in normal, not streamed mode. */ -#define Libburn_bd_re_obS (32 * 1024) +#define Libburn_bd_re_obS (64 * 1024) -/* The size to be used with BD-RE media in streamed mode. +/* The size to be used with BD-R media in normal, not streamed mode. */ -#define Libburn_bd_re_streamed_obS (64 * 1024) +#define Libburn_bd_r_obS (64 * 1024) + +/* The size to be used with BD-RE and BD-R media in streamed mode. +*/ +#define Libburn_bd_streamed_obS (64 * 1024) static int type_to_ctrl(int mode) @@ -2307,7 +2311,7 @@ int burn_dvd_write_sync(struct burn_write_opts *o, if (o->obs_pad < 2) o->obs_pad = 1; if (d->current_profile == 0x43) /* BD-RE */ - o->obs = Libburn_bd_re_streamed_obS; + o->obs = Libburn_bd_streamed_obS; } } else if (d->current_profile == 0x13) { @@ -2385,10 +2389,12 @@ int burn_dvd_write_sync(struct burn_write_opts *o, } /* ??? padding needed ??? cowardly doing it for now */ if (o->obs_pad < 2) - o->obs_pad = 1; /* fill-up track's last 32k buffer */ + o->obs_pad = 1; /* fill-up track's last obs buffer */ + if (d->current_profile == 0x41) /* BD-R */ + o->obs = Libburn_bd_r_obS; if (d->do_stream_recording) { if (d->current_profile == 0x41) /* BD-R */ - o->obs = Libburn_bd_re_streamed_obS; + o->obs = Libburn_bd_streamed_obS; } } @@ -2418,10 +2424,10 @@ int burn_dvd_write_sync(struct burn_write_opts *o, if (d->do_stream_recording && (d->current_profile == 0x43 || d->current_profile == 0x41) && - o->obs < Libburn_bd_re_streamed_obS) { + o->obs < Libburn_bd_streamed_obS) { /* LG GGW-H20 writes junk with stream recording and obs=32k */ sprintf(msg, - "Stream recording disabled because of small OS buffer"); + "Stream recording disabled because of small output buffer"); libdax_msgs_submit(libdax_messenger, d->global_index, 0x00020176, LIBDAX_MSGS_SEV_NOTE, LIBDAX_MSGS_PRIO_HIGH, msg, 0, 0);