Questions about the DVD input plugin (for a win32 port)

Jon Lech Johansen jon-vl at nanocrew.net
Tue May 22 17:10:58 CEST 2001


On Tue, May 22, 2001 at 12:55:24PM +0200, Stéphane Borel (stef at via.ecp.fr) wrote:
> On Tue, May 22, 2001 at 12:02:25PM +0200, Jon Lech Johansen wrote:
> > We can use open/read/lseek, but in order to support encrypted DVDs
> > under win2k we need DeviceIoControl (which requires a handle from 
> > CreateFile).
> 
> the main point is CSS authentication. As it is very OS dependant, we
> have a separate file, dvd_ioctl.c, that handles the specificities of
> each one and wraps the specific functions to vlc ones. This is where we
> should integrate DeviceIoControl/CreateFile.
 
We cannot use CreateFile inside the ioctl_* functions because we don't
have access to p_input->p_source there. An easy way to resolve this is
to make *thread_dvd_data_t the first parameter of the ioctl_* funcs.
Then we could just add p_source to the struct.

Anyway, I don't like the idea of opening and closing the device inside
every ioctl_* function. I think it is better to put this in DVDInit/End.

Under Win9x there is no other option than to use WINASPI for raw cdrom
access. So #ifdefs for win32 are hard to avoid, unless you want to
create a wrapper for raw cdrom access and put it in dvd_raw.c :)

-- 
Jon Johansen
nanocrew.net




More information about the vlc-devel mailing list