[k3b] [Bug 367639] k3b fails to continue multisession (blue ray)

Thomas Schmitt via KDE Bugzilla bugzilla_noreply at kde.org
Mon Sep 26 19:17:34 UTC 2016


https://bugs.kde.org/show_bug.cgi?id=367639

--- Comment #47 from Thomas Schmitt <scdbackup at gmx.net> ---
Hi,

> http://commits.kde.org/k3b/cbe652000292dc5a6c9e36de0d1000ca0d84f75d
> libk3b/projects/datacd/k3bdatamultisessionparameterjob.cpp

Actually one should still throw error if (nextSessionStart == 0)
at the end of setupMultiSessionParameters(). Especially since DVD-RAM
and BD-R RRM are missing in K3B's list of overwritable media.


> libk3bdevice/k3bdevice.cpp

This mirrors sufficiently the growisofs gesture at
  https://sources.debian.net/src/dvd%2Brw-tools/7.1-11/growisofs_mmc.cpp/#L949


But there are more differences to BD-R POW in growisofs plusminus_r_C_parm()
versus K3B getNextWritableAdress().

--------------------------------------------------------------------

The determination of the next_track number differs:

  https://sources.debian.net/src/dvd%2Brw-tools/7.1-11/growisofs_mmc.cpp/#L926

    if (mmc_profile==0x41 && bdr_plus_pow)
        next_track = disc_info[6]|disc_info[11]<<8;
    else
        next_track = disc_info[5]|disc_info[10]<<8;

So for BD-R POW, growisofs reads field "Last Track Number in Last Session"
rather than "First Track Number in Last Session". (Not sure why it does this.)

  K3B has only first_track:

               int nextTrack = inf->first_track_l|inf->first_track_m<<8;

The definition of disc_info_t in libk3bdevice/k3bmmc.h has corresponding
fields .last_track_l and .last_track_m. I propose:

               int nextTrack;
               if( m == MEDIA_BD_R_SRM_POW )
                   nextTrack = inf->last_track_l|inf->last_track_m<<8;
               else
                   nextTrack = inf->first_track_l|inf->first_track_m<<8;

--------------------------------------------------------------------

Contrary to my statement on saturday, there is a deviation with
lastSessionStart:

  https://sources.debian.net/src/dvd%2Brw-tools/7.1-11/growisofs_mmc.cpp/#L962

      if (mmc_profile==0x41 && bdr_plus_pow)
        prev_session=0;
      else
        ... determination via READ PMA/TOC/ATIP ...

K3B has:

                    // Read start address of the first track in the last
session
                    if( readTocPmaAtip( trackData, 0x1, false, 0x0  ) ) {
                        lastSessionStart = from4Byte( &trackData[8] );
                        success = true;
                    }

which should become

                    // Read start address of the first track in the last
session
                    if( m == MEDIA_BD_R_SRM_POW ) {
                        lastSessionStart = 0;
                        success = true;
                    } else {
                        if( readTocPmaAtip( trackData, 0x1, false, 0x0  ) ) {
                            lastSessionStart = from4Byte( &trackData[8] );
                            success = true;
                        }
                    }

--------------------------------------------------------------------

Hopefully these are all deviations in getNextWritableAdress().

But growisofs has bdr_plus_pow mentioned in get_2k_capacity().
One would have to search for the corresponding code in K3B.


We will need a courageous tester soon. (Expensive BD-R media will
be at risk.)


Have a nice day :)

Thomas

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the k3b mailing list