[DVDnav-discuss] UDF2.50

Jorgen Lundman lundman at lundman.net
Fri Sep 19 09:14:44 CEST 2008


> and the patch is...?
> 

http://www.lundman.net/cvs/viewvc.cgi/lundman/llink/libdvdnav-4.1.2/


 > 5. Unfortunately, libdvdread developers cheated when reading AD's from
 > FileInfo data. It will parse them all, and return the last one found.
 > Again, because DVDs are <= 1GB, there is only one AD chained and hence,
 > no problem. For UDF2.50, and larger files, I needed extra patching to
 > fetch the correct chain. Not entirely sure how best to fix this yet.

I decided to do this properly.

Previously, libdvdread developers return "lb_start" block number from 
UDFFindFile(), and the users of the API assumes all the file-blocks are 
contiguous.

I have changed it so dvd_ufd.c's UDFFindFile return a "UDF_FILE" opaque 
type for dvd_read.c to use instead, and a new UDFFileBlockPos() that 
translates a file's offset, to actual block number, taking into account 
of the AD chains (which have gaps it, as it turns out).

This completes my task for now, in that my player will happily list the 
contents of BS-ISO images, and play the m2ts files within.


Useless logs follows for amusement.

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

# ./disc_ls testfile-bd5.iso /BDMV
Found '/BDMV' at 326 (size 588)

/BDMV: . (type 3) size 152
/BDMV: AUXDATA (type 3) size 40
/BDMV: BACKUP (type 3) size 332
/BDMV: BDJO (type 3) size 40
/BDMV: CLIPINF (type 3) size 100
/BDMV: index.bdmv (type 5) size 526
/BDMV: JAR (type 3) size 40
/BDMV: META (type 3) size 40
/BDMV: MovieObject.bdmv (type 5) size 278
/BDMV: PLAYLIST (type 3) size 100
/BDMV: STREAM (type 3) size 100


# ./disc_get testfile-bd5.iso /BDMV/STREAM/00001.m2ts
libdvdread: Encrypted DVD support unavailable.
UDFPartiton found Number 0, Contents      , start-end 288-2291200
UDFLogVolume: We found 2 partitions.
libdvdread: read block 289 TagID 266
libdvdread: reading AD chain 0
libdvdread: redirect block filetype 250 found at block 289, for location +32
libdvdread: read block 321 TagID 256
libdvdread: reading block 323 TagID 266
libdvdread: reading AD chain 0
libdvdvread: File block 0 -> 320 (chain 3 + offset 0 : 1572861)
Found '/' at 320 (size 152)
libdvdvread: File block 0 -> 320 (chain 3 + offset 0 : 1572861)
libdvdvread: File block 0 -> 320 (chain 3 + offset 0 : 1572861)
libdvdread: reading block 325 TagID 266
libdvdread: reading AD chain 0
libdvdread: reading block 337 TagID 266
libdvdread: reading AD chain 0
libdvdread: reading block 355 TagID 266
libdvdread: reading AD chain 0
libdvdread: reading AD chain 1
libdvdread: reading AD chain 2
libdvdread: reading AD chain 3
libdvdread: reading AD chain 4
Openfile said 0x100500
Size 4691957760
libdvdvread: File block 0 -> 438 (chain 0 + offset 0 : 524287)
...
libdvdvread: File block 520000 -> 520438 (chain 0 + offset 520000 : 524287)
libdvdvread: File block 530000 -> 530438 (chain 1 + offset 5713 : 524287)
...


-- 
Jorgen Lundman       | <lundman at lundman.net>
Unix Administrator   | +81 (0)3 -5456-2687 ext 1017 (work)
Shibuya-ku, Tokyo    | +81 (0)90-5578-8500          (cell)
Japan                | +81 (0)3 -3375-1767          (home)



More information about the DVDnav-discuss mailing list