]> git.sesse.net Git - vlc/blob - extras/libdvdread/dvd_setup.h
*Merged hh patch in libdvdcss from main tree.
[vlc] / extras / libdvdread / dvd_setup.h
1 /**
2  * dvd_setup.h: setup functions header.
3  */
4
5 /* Copyright (C) 2001 VideoLAN
6  * $Id: dvd_setup.h,v 1.1 2002/01/23 03:15:31 stef Exp $
7  *
8  * Authors: Samuel Hocevar <sam@zoy.org>
9  *
10  * This program is free software; you can redistribute it and/or modify
11  * it under the terms of the GNU General Public License as published by
12  * the Free Software Foundation; either version 2 of the License, or
13  * (at your option) any later version.
14  * 
15  * This program is distributed in the hope that it will be useful,
16  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18  * GNU General Public License for more details.
19  *
20  * You should have received a copy of the GNU General Public License
21  * along with this program; if not, write to the Free Software
22  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111, USA.
23  */
24
25 /**
26  * The libdvdcss structure.
27  */
28 struct dvdcss_s
29 {
30     /* File descriptor */
31     int i_fd;
32 };
33
34 #ifdef GOD_DAMN_DMCA
35 /**
36  * Defines and flags.
37  */
38 #  define DVDCSS_NOFLAGS         0
39 #  define DVDCSS_READ_DECRYPT    (1 << 0)
40 #  define DVDCSS_SEEK_MPEG       (1 << 0)
41 #  define DVDCSS_SEEK_KEY        (1 << 1)
42
43 #else
44 #  include <videolan/dvdcss.h>
45 #endif
46
47 typedef struct dvdcss_s* dvd_handle;
48
49 /**
50  * Pointers which will be filled either with dummy functions or
51  * with the dlopen()ed ones.
52  */
53 dvd_handle (*pf_dvd_open)  ( char * );
54 int        (*pf_dvd_close) ( dvd_handle );
55 int        (*pf_dvd_title) ( dvd_handle, int );
56 int        (*pf_dvd_seek)  ( dvd_handle, int, int );
57 int        (*pf_dvd_read)  ( dvd_handle, void *, int, int );
58 int        (*pf_dvd_readv) ( dvd_handle, void *, int, int );
59 char *     (*pf_dvd_error) ( dvd_handle );
60
61 /**
62  * Setup function accessed by dvd_reader.c
63  */
64 void DVDSetupRead( void );