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

Re: dvd+rw-mediainfo does not return enough data on DVD-R



Hi,

> Running `dvd+rw-mediainfo /dev/dvdrw
> <RANDOM_STRINGS>`, per the source code and miscellaneous posts
> scattered across the web, returns a lot of debugging data.  When
> dvd+rw-mediainfo returns the "media code", the equivalent to the ATIP
> information for a DVD, it only returns 44 (4+40) bytes for a DVD-R[W].

I assume you mean this:

READ DVD STRUCTURE[#0eh]:       00 6c 00 00 01 40 c1 fd 9e d8 52 00 02 87 0d 13 87 88 90 00 03 52 49 54 45 4b 46 00 04 31 00 00 00 00 00 00 05 88 80 00 00 00 02 00
 Media ID:              RITEKF1     

It _shows_ 44 bytes.
But the first two of them say that there are further 6*16+12
= 108 bytes available. My understanding of the source is that
this amount of 110 bytes is also requested for the reply.


> Does anyone have an idea at what the "official" length of the media code is?

In MMC-5, the specs of command ADh READ DISC STRUCTURE
tell in "6.23.3.2.14 Format Code 0Eh" about 4 header bytes
and 64 bytes of "DVD-R Pre-recorded Information Structure".
The first two of the header bytes are not included in the
count. So it rather should be 66 = 42h.
No idea why it is 108 = 6Ch with my  "RITEKF1" DVD-R.     

If i change
            for (j=0,i=dvd_dash?sizeof(dvd._e):sizeof(dvd._11);j<i;j++)
to
            for (j=0; j<len; j++)
then i get

READ DVD STRUCTURE[#0eh]:       00 6c 00 00 01 40 c1 fd 9e d8 52 00 02 87 0d 13 87 88 90 00 03 52 49 54 45 4b 46 00 04 31 00 00 00 00 00 00 05 88 80 00 00 00 02 00 06 09 0f 15 87 88 90 00 07 a8 82 00 20 00 00 00 08 06 16 10 14 0f 0b 00 09 94 07 0d 0b 88 88 00 0a 80 00 00 00 00 10 00 0b 09 1e 17 a7 89 85 00 0c b7 89 02 00 20 02 00 0d 00 00 d0 00 00 00 00 0e 0c


The format of the 64 bytes after the first 4 seems
to be defined in ECMA-279, 28.3.2.1 "RMD Field 0",
table 20 "Copy of Pre-pit Information".

One has to subtract 22 of the "BP" numbers and then
gets the 4+index numbers as in these source lines out of
dvd+rw-mediainfo.cpp :
     if (!dvd_plus && dvd_0E && dvd._e[4+16]==3 && dvd._e[4+24]==4)
     printf (" Media ID:              %6.6s%-6.6s\n",dvd._e+4+17,dvd._e+4+25)
I.e. they look for field id 3 and 4 and print the
"manufacturer ids" from these fields. 


Have a nice day :)

Thomas


Reply to: