[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: How To Read Volume ID from DVD



Hi,

i uploaded 
  http://scdbackup.webframe.org/xorriso-0.4.3.tar.gz
which performs the new option -pvd_info.

xorriso -version should report "Version timestamp"
2009.10.05.190215 or newer.

Try
  xorriso -indev ...device... -pvd_info 2>/dev/null

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

> how is the sector offset for the
> next session derived. As an example, a multisession disc I have has
> this layout:
>  TOC layout   : Idx ,  sbsector ,       Size , Volume Id
>  ISO session  :   1 ,         0 ,     10568s , CDROM
>  ISO session  :   2 ,     12624 ,    304274s , CDROM
> The 10568 is the volume space size field from the PVD, logically. What
> I don't see is how does it derive 12624 as the start of the next
> session, what accounts for the other 2056 sectors?

Let me guess: this is a DVD+R media.
The gap is 4 MB plus alignment to the next full
16 block address.

Again, we have two families of media types:

Sequential media have a table-of-content on the
level of media and drive. See MMC-5 
  http://www.t10.org/ftp/t10/drafts/mmc5/mmc5r03c.pdf
commands 51h READ DISC INFORMATION and 52h READ
TRACK INFORMATION or 43h READ TOC/PMA/ATIP.
The mount command learns from this info where
the last session begins. It does not have to
interpret the payload data content for that.
The drive decides where the next track may begin:
TRACK INFORMATION field "Next Writeable Address".
In case of DVD+R this is about 4 MB after the
last track end. DVD-R and CD have even larger
gaps.

Overwriteable media have no real
table-of-content. The drive reports stubbornly a
single session with a single track.
So in this case the mount command must get its
"superblock" at address 0. After each new session
the first 16+ blocks of the media have to be
updated by a copy of the first 16+ blocks of the
new session.
For printing an emulated table-of-content it is
necessary to interpret the PVDs of the sessions.
The first one can be found at LBA 32+16 and tells
the size of its session. The next one can be
found shortly after the session end. In case of
xorriso this is the next address divisible by 32.
growisofs aligns rather to 16 and spoils the
chain of sessions by placing the first one at
LBA 0 which gets overwritten with each new
session.
The Next Writeable Address for a new session gets
determined by the burn program. My decision to
use 32 block alignment is mainly motivated by
the 32 block granularity of Blu-ray media.


> Is it the case
> that this information is out of band from the sector data and accessed
> using special device commands?

The gap with DVD+R contains no payload and afaik
no other useful information. Its technical
reason is obscure to me. Maybe one can find an
explanation in ECMA-349.
To my experience the gaps of DVD+R are readable
as zero bytes. (CD gaps are not readable by the
normal SCSI READ command.)


About all my knowledge with MMC drives and media
is collected in file
  xorriso-*/doc/cookbook.txt
which you can find in the xorriso tarball.
It refers to SCSI specs SPC, SBC and MMC.


Have a nice day :)

Thomas


Reply to: