7027
|
1 /**
|
|
2 * \file dvdcss.h
|
|
3 * \author Stéphane Borel <stef@via.ecp.fr>
|
|
4 * \author Samuel Hocevar <sam@zoy.org>
|
|
5 * \brief The \e libdvdcss public header.
|
|
6 *
|
|
7 * This header contains the public types and functions that applications
|
|
8 * using \e libdvdcss may use.
|
|
9 */
|
|
10
|
|
11 /*
|
|
12 * Copyright (C) 1998-2002 VideoLAN
|
|
13 * $Id$
|
|
14 *
|
|
15 * This program is free software; you can redistribute it and/or modify
|
|
16 * it under the terms of the GNU General Public License as published by
|
|
17 * the Free Software Foundation; either version 2 of the License, or
|
|
18 * (at your option) any later version.
|
|
19 *
|
|
20 * This program is distributed in the hope that it will be useful,
|
|
21 * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
22 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
23 * GNU General Public License for more details.
|
|
24 *
|
|
25 * You should have received a copy of the GNU General Public License
|
|
26 * along with this program; if not, write to the Free Software
|
|
27 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
|
|
28 */
|
|
29
|
|
30 #ifndef _DVDCSS_DVDCSS_H
|
|
31 #ifndef _DOXYGEN_SKIP_ME
|
|
32 #define _DVDCSS_DVDCSS_H 1
|
|
33 #endif
|
|
34
|
|
35 #ifdef __cplusplus
|
|
36 extern "C" {
|
|
37 #endif
|
|
38
|
|
39 /** Library instance handle, to be used for each library call. */
|
|
40 typedef struct dvdcss_s* dvdcss_t;
|
|
41
|
|
42
|
|
43 /** The block size of a DVD. */
|
|
44 #define DVDCSS_BLOCK_SIZE 2048
|
|
45
|
|
46 /** The default flag to be used by \e libdvdcss functions. */
|
|
47 #define DVDCSS_NOFLAGS 0
|
|
48
|
|
49 /** Flag to ask dvdcss_read() to decrypt the data it reads. */
|
|
50 #define DVDCSS_READ_DECRYPT (1 << 0)
|
|
51
|
|
52 /** Flag to tell dvdcss_seek() it is seeking in MPEG data. */
|
|
53 #define DVDCSS_SEEK_MPEG (1 << 0)
|
|
54
|
|
55 /** Flag to ask dvdcss_seek() to check the current title key. */
|
|
56 #define DVDCSS_SEEK_KEY (1 << 1)
|
|
57
|
|
58
|
|
59 /*
|
|
60 * Our version number. The variable name contains the interface version.
|
|
61 */
|
|
62 extern char * dvdcss_interface_2;
|
|
63
|
7033
|
64 /*
|
|
65 * Path to CSS key cache. Default == NULL (no cache).
|
|
66 */
|
|
67 extern char * dvdcss_cache_dir;
|
7027
|
68
|
|
69 /*
|
|
70 * Exported prototypes.
|
|
71 */
|
|
72 extern dvdcss_t dvdcss_open ( char *psz_target );
|
|
73 extern int dvdcss_close ( dvdcss_t );
|
7033
|
74 extern int dvdcss_title ( dvdcss_t,
|
|
75 int i_block );
|
7027
|
76 extern int dvdcss_seek ( dvdcss_t,
|
|
77 int i_blocks,
|
|
78 int i_flags );
|
|
79 extern int dvdcss_read ( dvdcss_t,
|
|
80 void *p_buffer,
|
|
81 int i_blocks,
|
|
82 int i_flags );
|
|
83 extern int dvdcss_readv ( dvdcss_t,
|
|
84 void *p_iovec,
|
|
85 int i_blocks,
|
|
86 int i_flags );
|
|
87 extern char * dvdcss_error ( dvdcss_t );
|
|
88
|
|
89
|
|
90 /*
|
|
91 * Deprecated stuff.
|
|
92 */
|
|
93 #ifndef _DOXYGEN_SKIP_ME
|
|
94 #define dvdcss_title(a,b) dvdcss_seek(a,b,DVDCSS_SEEK_KEY)
|
|
95 #define dvdcss_handle dvdcss_t
|
|
96 #endif
|
|
97
|
|
98
|
|
99 #ifdef __cplusplus
|
|
100 }
|
|
101 #endif
|
|
102
|
|
103 #endif /* <dvdcss/dvdcss.h> */
|