Mercurial > mplayer.hg
annotate libdvdcss/libdvdcss.h @ 32074:9031c664ed05
Move v4l2_fd extern declaration to vo_v4l2.h, where it belongs.
author | diego |
---|---|
date | Sat, 11 Sep 2010 14:37:12 +0000 |
parents | f43e87f69590 |
children | cda66f57f7a5 |
rev | line source |
---|---|
20613 | 1 /***************************************************************************** |
2 * libdvdcss.h: private DVD reading library data | |
3 ***************************************************************************** | |
4 * Copyright (C) 1998-2001 VideoLAN | |
5 * $Id$ | |
6 * | |
27442 | 7 * Authors: Stéphane Borel <stef@via.ecp.fr> |
27462 | 8 * Sam Hocevar <sam@zoy.org> |
20613 | 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 * | |
31098
9e9595c779cf
libdvdcss: cosmetics: Fix FSF address and program name in license headers.
diego
parents:
27462
diff
changeset
|
20 * You should have received a copy of the GNU General Public License along |
9e9595c779cf
libdvdcss: cosmetics: Fix FSF address and program name in license headers.
diego
parents:
27462
diff
changeset
|
21 * with libdvdcss; if not, write to the Free Software Foundation, Inc., |
9e9595c779cf
libdvdcss: cosmetics: Fix FSF address and program name in license headers.
diego
parents:
27462
diff
changeset
|
22 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. |
20613 | 23 *****************************************************************************/ |
24 | |
25 struct iovec; | |
26 | |
27 /***************************************************************************** | |
28 * The libdvdcss structure | |
29 *****************************************************************************/ | |
30 struct dvdcss_s | |
31 { | |
32 /* File descriptor */ | |
33 char * psz_device; | |
34 int i_fd; | |
35 int i_read_fd; | |
36 int i_pos; | |
37 | |
38 /* File handling */ | |
39 int ( * pf_seek ) ( dvdcss_t, int ); | |
40 int ( * pf_read ) ( dvdcss_t, void *, int ); | |
41 int ( * pf_readv ) ( dvdcss_t, struct iovec *, int ); | |
42 | |
43 /* Decryption stuff */ | |
44 int i_method; | |
45 css_t css; | |
46 int b_ioctls; | |
47 int b_scrambled; | |
48 dvd_title_t *p_titles; | |
49 | |
50 /* Key cache directory and pointer to the filename */ | |
51 char psz_cachefile[PATH_MAX]; | |
52 char * psz_block; | |
53 | |
54 /* Error management */ | |
55 char * psz_error; | |
56 int b_errors; | |
57 int b_debug; | |
58 | |
59 #ifdef WIN32 | |
60 int b_file; | |
61 char * p_readv_buffer; | |
62 int i_readv_buf_size; | |
63 #endif | |
64 | |
31099
f43e87f69590
libdvdcss: OS/2 support; this merges upstream revisions 220 and 229.
diego
parents:
31098
diff
changeset
|
65 #if !defined(WIN32) && !defined(SYS_OS2) |
20613 | 66 int i_raw_fd; |
67 #endif | |
68 }; | |
69 | |
70 /***************************************************************************** | |
71 * libdvdcss method: used like init flags | |
72 *****************************************************************************/ | |
73 #define DVDCSS_METHOD_KEY 0 | |
74 #define DVDCSS_METHOD_DISC 1 | |
75 #define DVDCSS_METHOD_TITLE 2 | |
76 | |
77 /***************************************************************************** | |
78 * Functions used across the library | |
79 *****************************************************************************/ | |
80 #define print_error(dvdcss,msg) _print_error(dvdcss,msg) | |
81 #if defined( _MSC_VER ) | |
82 #include <stdarg.h> | |
83 __forceinline void print_debug(dvdcss_t dvdcss, const char *msg,...) | |
84 { | |
85 va_list args; | |
86 | |
87 fprintf( stderr, "libdvdcss debug: " ); | |
88 va_start( args, msg ); | |
89 vfprintf( stderr, msg, args ); | |
90 va_end( args ); | |
91 fprintf( stderr, "\n" ); | |
92 } | |
93 #else | |
94 #define print_debug(dvdcss,msg,args...) \ | |
95 if( dvdcss->b_debug ) \ | |
96 { \ | |
97 fprintf( stderr, "libdvdcss debug: " ); \ | |
98 fprintf( stderr, msg, ##args ); \ | |
99 fprintf( stderr, "\n" ); \ | |
100 } | |
101 #endif | |
102 | |
103 void _print_error ( dvdcss_t, char * ); | |
104 |