]> git.sesse.net Git - vlc/blob - extras/libdvdcss/videolan/dvdcss.h
acdc53ebd199e17b1a381e0a95bf3983973bdf88
[vlc] / extras / libdvdcss / videolan / dvdcss.h
1 /*****************************************************************************
2  * libdvdcss.h: DVD reading library, exported functions.
3  *****************************************************************************
4  * Copyright (C) 1998-2001 VideoLAN
5  * $Id: dvdcss.h,v 1.4 2001/07/11 02:01:03 sam Exp $
6  *
7  * Authors: Stéphane Borel <stef@via.ecp.fr>
8  *          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 typedef struct dvdcss_s* dvdcss_handle;
29
30 /*****************************************************************************
31  * Flags
32  *****************************************************************************/
33 #define DVDCSS_NOFLAGS         0
34
35 #define DVDCSS_INIT_QUIET      (1 << 0)
36 #define DVDCSS_INIT_DEBUG      (1 << 1)
37
38 #define DVDCSS_READ_DECRYPT    (1 << 0)
39
40 #define DVDCSS_BLOCK_SIZE      2048
41
42 /*****************************************************************************
43  * Exported prototypes
44  *****************************************************************************/
45 extern dvdcss_handle dvdcss_open  ( char *psz_target,
46                                     int i_flags );
47 extern int           dvdcss_close ( dvdcss_handle );
48 extern int           dvdcss_crack ( dvdcss_handle,
49                                     int i_block );
50 extern int           dvdcss_seek  ( dvdcss_handle,
51                                     int i_blocks );
52 extern int           dvdcss_read  ( dvdcss_handle,
53                                     void *p_buffer,
54                                     int i_blocks,
55                                     int i_flags );
56 extern int           dvdcss_readv ( dvdcss_handle,
57                                     void *p_iovec,
58                                     int i_blocks,
59                                     int i_flags );
60 extern char *        dvdcss_error ( dvdcss_handle );
61