[libdvdcss-devel] Using the dvdcss structure in C

Fabrice DELENTE fdelente at mail.cpod.fr
Sun Jun 20 18:41:19 CEST 2010


Hello.

I'm trying to design a way to uniquely identify a DVD; I looked at the
libdvdcss.c file and managed to retrieve the disc name and its timestamp
that are at offset 40 and 813 on the first sector of the DVD.

libdvdcss.c seems to imply that the key is mandatory to uniquely identify a
disc, how can I recover the key?

I have tried

dvdcss_t dvdcss;

dvdcss = dvdcss_open( "/dev/sr0" );
dvdcss_seek( dvdcss, 0, 0 );
dvdcss_read( dvdcss, buffer, 1, 0 );

then

printf("%.2x", dvdcss->css.p_disc_key[0] );

but gcc doesn't compile...

Any hint?

Thanks!

-- 
F. Delente


More information about the libdvdcss-devel mailing list