Mercurial > mplayer.hg
annotate libdvdcss/libdvdcss.h @ 36730:8bc4d669c5d7
Enable option font_encoding without freetype.
subtitle_font_encoding is now also used when freetype is disabled.
This is corresponding to r36825, although the GUI doesn't support
changing the option through the preferences in this case (but it's
in gui.conf at least).
author | ib |
---|---|
date | Thu, 13 Feb 2014 10:41:33 +0000 |
parents | 691431d2289e |
children |
rev | line source |
---|---|
20613 | 1 /***************************************************************************** |
2 * libdvdcss.h: private DVD reading library data | |
3 ***************************************************************************** | |
4 * Copyright (C) 1998-2001 VideoLAN | |
5 * | |
27442 | 6 * Authors: Stéphane Borel <stef@via.ecp.fr> |
27462 | 7 * Sam Hocevar <sam@zoy.org> |
20613 | 8 * |
9 * This program is free software; you can redistribute it and/or modify | |
10 * it under the terms of the GNU General Public License as published by | |
11 * the Free Software Foundation; either version 2 of the License, or | |
12 * (at your option) any later version. | |
13 * | |
14 * This program is distributed in the hope that it will be useful, | |
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
17 * GNU General Public License for more details. | |
18 * | |
31098
9e9595c779cf
libdvdcss: cosmetics: Fix FSF address and program name in license headers.
diego
parents:
27462
diff
changeset
|
19 * 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
|
20 * 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
|
21 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. |
20613 | 22 *****************************************************************************/ |
23 | |
32265
cda66f57f7a5
Sync some minor changes from upstream libdvdcss, up to r237.
diego
parents:
31099
diff
changeset
|
24 #ifndef DVDCSS_LIBDVDCSS_H |
cda66f57f7a5
Sync some minor changes from upstream libdvdcss, up to r237.
diego
parents:
31099
diff
changeset
|
25 #define DVDCSS_LIBDVDCSS_H |
cda66f57f7a5
Sync some minor changes from upstream libdvdcss, up to r237.
diego
parents:
31099
diff
changeset
|
26 |
cda66f57f7a5
Sync some minor changes from upstream libdvdcss, up to r237.
diego
parents:
31099
diff
changeset
|
27 #include "dvdcss/dvdcss.h" |
cda66f57f7a5
Sync some minor changes from upstream libdvdcss, up to r237.
diego
parents:
31099
diff
changeset
|
28 #include "css.h" |
35952 | 29 #include "device.h" |
20613 | 30 |
31 /***************************************************************************** | |
32 * The libdvdcss structure | |
33 *****************************************************************************/ | |
34 struct dvdcss_s | |
35 { | |
36 /* File descriptor */ | |
37 char * psz_device; | |
38 int i_fd; | |
39 int i_read_fd; | |
40 int i_pos; | |
41 | |
42 /* File handling */ | |
43 int ( * pf_seek ) ( dvdcss_t, int ); | |
44 int ( * pf_read ) ( dvdcss_t, void *, int ); | |
45 int ( * pf_readv ) ( dvdcss_t, struct iovec *, int ); | |
46 | |
47 /* Decryption stuff */ | |
48 int i_method; | |
49 css_t css; | |
50 int b_ioctls; | |
51 int b_scrambled; | |
52 dvd_title_t *p_titles; | |
53 | |
54 /* Key cache directory and pointer to the filename */ | |
55 char psz_cachefile[PATH_MAX]; | |
56 char * psz_block; | |
57 | |
58 /* Error management */ | |
59 char * psz_error; | |
60 int b_errors; | |
61 int b_debug; | |
62 | |
63 #ifdef WIN32 | |
64 int b_file; | |
65 char * p_readv_buffer; | |
66 int i_readv_buf_size; | |
67 #endif | |
68 | |
35952 | 69 #ifdef DVDCSS_RAW_OPEN |
20613 | 70 int i_raw_fd; |
71 #endif | |
72 }; | |
73 | |
74 /***************************************************************************** | |
75 * libdvdcss method: used like init flags | |
76 *****************************************************************************/ | |
77 #define DVDCSS_METHOD_KEY 0 | |
78 #define DVDCSS_METHOD_DISC 1 | |
79 #define DVDCSS_METHOD_TITLE 2 | |
80 | |
81 /***************************************************************************** | |
82 * Functions used across the library | |
83 *****************************************************************************/ | |
84 #define print_error(dvdcss,msg) _print_error(dvdcss,msg) | |
85 #if defined( _MSC_VER ) | |
86 #include <stdarg.h> | |
87 __forceinline void print_debug(dvdcss_t dvdcss, const char *msg,...) | |
88 { | |
34208
f7a3e6ad8eef
libdvdcss: sync some whitespace changes from upstream
diego
parents:
32265
diff
changeset
|
89 va_list args; |
20613 | 90 |
91 fprintf( stderr, "libdvdcss debug: " ); | |
34208
f7a3e6ad8eef
libdvdcss: sync some whitespace changes from upstream
diego
parents:
32265
diff
changeset
|
92 va_start( args, msg ); |
20613 | 93 vfprintf( stderr, msg, args ); |
34208
f7a3e6ad8eef
libdvdcss: sync some whitespace changes from upstream
diego
parents:
32265
diff
changeset
|
94 va_end( args ); |
20613 | 95 fprintf( stderr, "\n" ); |
96 } | |
97 #else | |
98 #define print_debug(dvdcss,msg,args...) \ | |
99 if( dvdcss->b_debug ) \ | |
100 { \ | |
101 fprintf( stderr, "libdvdcss debug: " ); \ | |
102 fprintf( stderr, msg, ##args ); \ | |
103 fprintf( stderr, "\n" ); \ | |
104 } | |
105 #endif | |
106 | |
107 void _print_error ( dvdcss_t, char * ); | |
108 | |
32265
cda66f57f7a5
Sync some minor changes from upstream libdvdcss, up to r237.
diego
parents:
31099
diff
changeset
|
109 #endif /* DVDCSS_LIBDVDCSS_H */ |