Mercurial > mplayer.hg
annotate libdvdcss/dvdcss/dvdcss.h @ 28982:a73861318395
Initialize pointer arrays which may be freed before being initialized.
author | benoit |
---|---|
date | Fri, 20 Mar 2009 16:29:47 +0000 |
parents | 60bd1a7f3fc6 |
children | 9e9595c779cf |
rev | line source |
---|---|
20613 | 1 /** |
2 * \file dvdcss.h | |
27442 | 3 * \author Stéphane Borel <stef@via.ecp.fr> |
27462 | 4 * \author Sam Hocevar <sam@zoy.org> |
20613 | 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 /* | |
27462 | 12 * Copyright (C) 1998-2008 VideoLAN |
20613 | 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 | |
24535
b015cbd37591
Leading underscores in identifiers are reserved in C.
diego
parents:
20613
diff
changeset
|
30 #ifndef DVDCSS_DVDCSS_H |
20613 | 31 #ifndef _DOXYGEN_SKIP_ME |
24535
b015cbd37591
Leading underscores in identifiers are reserved in C.
diego
parents:
20613
diff
changeset
|
32 #define DVDCSS_DVDCSS_H 1 |
20613 | 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 #if defined(LIBDVDCSS_EXPORTS) | |
60 #define LIBDVDCSS_EXPORT __declspec(dllexport) extern | |
61 #elif defined(LIBDVDCSS_IMPORTS) | |
62 #define LIBDVDCSS_EXPORT __declspec(dllimport) extern | |
63 #else | |
64 #define LIBDVDCSS_EXPORT extern | |
65 #endif | |
66 | |
67 /* | |
68 * Our version number. The variable name contains the interface version. | |
69 */ | |
70 LIBDVDCSS_EXPORT char * dvdcss_interface_2; | |
71 | |
72 | |
73 /* | |
74 * Exported prototypes. | |
75 */ | |
76 LIBDVDCSS_EXPORT dvdcss_t dvdcss_open ( char *psz_target ); | |
77 LIBDVDCSS_EXPORT int dvdcss_close ( dvdcss_t ); | |
78 LIBDVDCSS_EXPORT int dvdcss_seek ( dvdcss_t, | |
79 int i_blocks, | |
80 int i_flags ); | |
81 LIBDVDCSS_EXPORT int dvdcss_read ( dvdcss_t, | |
82 void *p_buffer, | |
83 int i_blocks, | |
84 int i_flags ); | |
85 LIBDVDCSS_EXPORT int dvdcss_readv ( dvdcss_t, | |
86 void *p_iovec, | |
87 int i_blocks, | |
88 int i_flags ); | |
89 LIBDVDCSS_EXPORT char * dvdcss_error ( dvdcss_t ); | |
90 | |
27442 | 91 LIBDVDCSS_EXPORT int dvdcss_is_scrambled ( dvdcss_t ); |
92 | |
20613 | 93 |
94 /* | |
95 * Deprecated stuff. | |
96 */ | |
97 #ifndef _DOXYGEN_SKIP_ME | |
98 #define dvdcss_title(a,b) dvdcss_seek(a,b,DVDCSS_SEEK_KEY) | |
99 #define dvdcss_handle dvdcss_t | |
100 #endif | |
101 | |
102 | |
103 #ifdef __cplusplus | |
104 } | |
105 #endif | |
106 | |
25617 | 107 #endif /* DVDCSS_DVDCSS_H */ |