]> git.sesse.net Git - vlc/blob - extras/libdvdcss/videolan/dvdcss.h
65637576d4838f3d530a3fe49d9c65514236f8bd
[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.9 2001/11/13 01:25:05 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  * Defines and flags
32  *****************************************************************************/
33 #define DVDCSS_BLOCK_SIZE      2048
34
35 #define DVDCSS_NOFLAGS         0
36 #define DVDCSS_READ_DECRYPT    (1 << 0)
37 #define DVDCSS_SEEK_MPEG       (1 << 0)
38
39 /*****************************************************************************
40  * Exported prototypes
41  *****************************************************************************/
42 extern dvdcss_handle dvdcss_open  ( char *psz_target );
43 extern int           dvdcss_close ( dvdcss_handle );
44 extern int           dvdcss_title ( dvdcss_handle,
45                                     int i_block );
46 extern int           dvdcss_seek  ( dvdcss_handle,
47                                     int i_blocks,
48                                     int i_flags );
49 extern int           dvdcss_read  ( dvdcss_handle,
50                                     void *p_buffer,
51                                     int i_blocks,
52                                     int i_flags );
53 extern int           dvdcss_readv ( dvdcss_handle,
54                                     void *p_iovec,
55                                     int i_blocks,
56                                     int i_flags );
57 extern char *        dvdcss_error ( dvdcss_handle );
58