This module, dvd_udf, can be used to access DVD Video discs or 
image files in the same format.

The Makefile is more a dummy Makefile, it just compiles the 
two object files. The use of this module is to include it in
a project of your own, e.g. a DVD Video Navigator.


First, you have to open the block device of the disc, or the
image file with UDFOpenDisc(). It returns a positive file
number on success, or -1 on error

Then, you can use UDFFindFile() to search files in the UDF 
directory tree on that disc. Pass the complete, absolute 
filename as parameter.
UDFFindFile() incorporates the process described in part 
6.9.2 "How to read a UDF disc" of chapter 6.9 "Requirements 
for DVD-ROM" of the OSTA Universal Disk Format Specification, 
Revision 1.02 (www.osta.org) (actually, it spells "Univeral" 
on the first page of their PDF. Obviously since 1995. Check 
it out yourself.)

Another function, UDFReadLB() is provided to access the data 
on the disc. Pass the number of the first block and the amount 
of blocks to read, and a pointer to enough allocated memory
to hold the read data.


simplified example:

#include "dvd_udf.h"

int filenumber;
unsigned long int lbnum;
unsigned char data[DVD_VIDEO_LB_LEN];

if ((filenumber=UDFOpenDisc("/dev/dvd"))>=0) {
  if ((lbnum=UDFFindFile("/VIDEO_TS/VIDEO_TS.IFO"))) {
    if (UDFReadLB(lbnum,1,data)) {
      /* parse first block of VIDEO_TS.IFO in data[] */
    }
  }
}
