libdvdcss question



Greetings all;
I am hopefully helping out on a couple of projects and one or two of the
projects here and ran into an interesting (to me) issue that maybe
someone here has crossed:
* These projects are cross-platform and
* They and I have written our bits in Python BUT
* Though mine is written in Python there are some bits that I shell out
to C-compiled against libdvdread to get done. While none of these bits
play anything one thing they do do is create an MD5 hash of the data on
the disc. Now I now how to do the reading/hashing bits but the thing I
do NOT know is this. On Linux (my default platform) CSS encryption is
dealt with in a completely different way than it is on Windows.
Basically libdvdread leverages libdvdcss to decrypt the data and it is
largely transparent to the reader/user of said data. On Windows it is a
different ball-game where each reader has to supply its own keys. What
is the best strategy for hitting that cross-platform functionality? I
mean I can think of a number of ways but do not want to re-invent the
wheel, so to speak, if someone has already done it. 

You never really know how nice you have it in Linux-land until you try
to bring this stuff across platforms. Worse, I have an inkling on how to
do this on Windows (meh) but Mac? Not a clue...I mean OS/X is supposedly
the mix between commercial (Apple) and FOSS given the underlying OS. I
do have a Mac-pro friend I can hit up over the Mac side of things but
Windows? I am shrugging my shoulders. 

To add to the confusion, my one Windows install (a VM) runs a commercial
product called AnyDVD which actually works just like the way libdvdread
+ libdvdcss work together...in other words, the decryption layer sits
between the reader/writer lib and the hardware so the decryption is
transparent to the reader. This project (both mine and the target
projects (Transmageddon and Arista) are written in Python so there is an
expectation of things to be cross-platform but beyond the program logic
and some generic system bits, I don't know that there is a
cross-platform way of dealing with this. The only thing I can really
think of that has a chance of success is to write an abstraction layer
in C/C++ that can be called (as a lib, not shell) by Python, then on
Linux I can link against libdvdread (and if they have installed it
(which I don't know any user that hasn't) libdvdcss by extension, then
craft a work-alike for Windows once I see how to do it there. I have
written system tools to run on all three (including WinCE which I still
hate myself for) so I am no stranger to the usual batch of
cross-platform issues, have a nice cross-platform make system to take
care of that bit but that leaves figuring out on Windows and Mac what
comes naturally on Linux. 

Any ideas folks? I mean, the path I described will work but it may wind
up being the more labor-intensive one not to mention a potential
maintenance nightmare. Thus if someone has done this before and can
throw a few crumbs this way, let me know, I would appreciate it. Also,
given the nature of the projects, maybe they have already fiddled with
this stuff and gotten a head-start.

Best
Jeff



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