dvdcss.h
Go to the documentation of this file.
1
11/*
12 * Copyright (C) 1998-2008 VideoLAN
13 *
14 * This program is free software; you can redistribute it and/or modify
15 * it under the terms of the GNU General Public License as published by
16 * the Free Software Foundation; either version 2 of the License, or
17 * (at your option) any later version.
18 *
19 * This program is distributed in the hope that it will be useful,
20 * but WITHOUT ANY WARRANTY; without even the implied warranty of
21 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22 * GNU General Public License for more details.
23 *
24 * You should have received a copy of the GNU General Public License along
25 * with libdvdcss; if not, write to the Free Software Foundation, Inc.,
26 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
27 */
28
29#ifndef DVDCSS_DVDCSS_H
30#ifndef _DOXYGEN_SKIP_ME
31#define DVDCSS_DVDCSS_H 1
32#endif
33
34#ifdef __cplusplus
35extern "C" {
36#endif
37
39typedef struct dvdcss_s* dvdcss_t;
40
41
43#define DVDCSS_BLOCK_SIZE 2048
44
46#define DVDCSS_NOFLAGS 0
47
49#define DVDCSS_READ_DECRYPT (1 << 0)
50
52#define DVDCSS_SEEK_MPEG (1 << 0)
53
55#define DVDCSS_SEEK_KEY (1 << 1)
56
57
58#if defined(LIBDVDCSS_EXPORTS)
59#define LIBDVDCSS_EXPORT __declspec(dllexport) extern
60#elif defined(LIBDVDCSS_IMPORTS)
61#define LIBDVDCSS_EXPORT __declspec(dllimport) extern
62#elif defined(SUPPORT_ATTRIBUTE_VISIBILITY_DEFAULT)
63#define LIBDVDCSS_EXPORT __attribute__((visibility("default"))) extern
64#else
65#define LIBDVDCSS_EXPORT extern
66#endif
67
68
69/*
70 * Exported prototypes.
71 */
72LIBDVDCSS_EXPORT dvdcss_t dvdcss_open ( char *psz_target );
73LIBDVDCSS_EXPORT int dvdcss_close ( dvdcss_t );
74LIBDVDCSS_EXPORT int dvdcss_seek ( dvdcss_t,
75 int i_blocks,
76 int i_flags );
77LIBDVDCSS_EXPORT int dvdcss_read ( dvdcss_t,
78 void *p_buffer,
79 int i_blocks,
80 int i_flags );
81LIBDVDCSS_EXPORT int dvdcss_readv ( dvdcss_t,
82 void *p_iovec,
83 int i_blocks,
84 int i_flags );
85LIBDVDCSS_EXPORT char * dvdcss_error ( dvdcss_t );
86
87LIBDVDCSS_EXPORT int dvdcss_is_scrambled ( dvdcss_t );
88
89#ifdef __cplusplus
90}
91#endif
92
93#endif /* DVDCSS_DVDCSS_H */
LIBDVDCSS_EXPORT int dvdcss_readv(dvdcss_t, void *p_iovec, int i_blocks, int i_flags)
Read from the disc into multiple buffers and decrypt data if requested.
Definition libdvdcss.c:683
LIBDVDCSS_EXPORT dvdcss_t dvdcss_open(char *psz_target)
Open a DVD device or directory and return a dvdcss instance.
Definition libdvdcss.c:153
LIBDVDCSS_EXPORT char * dvdcss_error(dvdcss_t)
Return a string containing the latest error that occurred in the given libdvdcss instance.
Definition libdvdcss.c:542
LIBDVDCSS_EXPORT int dvdcss_read(dvdcss_t, void *p_buffer, int i_blocks, int i_flags)
Read from the disc and decrypt data if requested.
Definition libdvdcss.c:610
LIBDVDCSS_EXPORT int dvdcss_close(dvdcss_t)
Close the DVD and clean up the library.
Definition libdvdcss.c:741
LIBDVDCSS_EXPORT int dvdcss_is_scrambled(dvdcss_t)
Return 1 if the DVD is scrambled, 0 otherwise.
Definition libdvdcss.c:776
LIBDVDCSS_EXPORT int dvdcss_seek(dvdcss_t, int i_blocks, int i_flags)
Seek in the disc and change the current key if requested.
Definition libdvdcss.c:570
struct dvdcss_s * dvdcss_t
Definition dvdcss.h:39