Mercurial > mplayer.hg
annotate libmpdvdkit2/libdvdcss.h @ 16318:e27998eeb54a
Fix nsv detection with new demuxer structure
With old method there was an hack to skip detection for streamed nsv,
because demuxer did the chek only on first 4 bytes and live nsv streams
starts at random place in the file. The detection code was changed to
search for nsv signature in the first 64k of the file.
The check was changed to "unsafe" and thus moved later because now is
more expensive.
author | rtognimp |
---|---|
date | Tue, 30 Aug 2005 19:06:55 +0000 |
parents | f0f0f176d298 |
children | 954cdf2171f6 |
rev | line source |
---|---|
7027 | 1 /***************************************************************************** |
9333
f0f0f176d298
sync with libdvdcss 1.2.5 (including u8->uint8_t and whitespace cosmetics...)
arpi
parents:
8637
diff
changeset
|
2 * libdvdcss.h: private DVD reading library data |
7027 | 3 ***************************************************************************** |
4 * Copyright (C) 1998-2001 VideoLAN | |
5 * $Id$ | |
6 * | |
7 * Authors: Stéphane Borel <stef@via.ecp.fr> | |
8 * Samuel Hocevar <sam@zoy.org> | |
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. | |
9333
f0f0f176d298
sync with libdvdcss 1.2.5 (including u8->uint8_t and whitespace cosmetics...)
arpi
parents:
8637
diff
changeset
|
14 * |
7027 | 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 * | |
20 * You should have received a copy of the GNU General Public License | |
21 * along with this program; if not, write to the Free Software | |
22 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA. | |
23 *****************************************************************************/ | |
24 | |
8637
0211de3039eb
update libdvdcss in libmpdvdkit to latest version (1.2.4)
arpi
parents:
7032
diff
changeset
|
25 struct iovec; |
0211de3039eb
update libdvdcss in libmpdvdkit to latest version (1.2.4)
arpi
parents:
7032
diff
changeset
|
26 |
7027 | 27 /***************************************************************************** |
28 * The libdvdcss structure | |
29 *****************************************************************************/ | |
30 struct dvdcss_s | |
31 { | |
32 /* File descriptor */ | |
33 char * psz_device; | |
34 int i_fd; | |
8637
0211de3039eb
update libdvdcss in libmpdvdkit to latest version (1.2.4)
arpi
parents:
7032
diff
changeset
|
35 int i_read_fd; |
9333
f0f0f176d298
sync with libdvdcss 1.2.5 (including u8->uint8_t and whitespace cosmetics...)
arpi
parents:
8637
diff
changeset
|
36 int i_pos; |
7027 | 37 |
8637
0211de3039eb
update libdvdcss in libmpdvdkit to latest version (1.2.4)
arpi
parents:
7032
diff
changeset
|
38 /* File handling */ |
0211de3039eb
update libdvdcss in libmpdvdkit to latest version (1.2.4)
arpi
parents:
7032
diff
changeset
|
39 int ( * pf_seek ) ( dvdcss_t, int ); |
0211de3039eb
update libdvdcss in libmpdvdkit to latest version (1.2.4)
arpi
parents:
7032
diff
changeset
|
40 int ( * pf_read ) ( dvdcss_t, void *, int ); |
0211de3039eb
update libdvdcss in libmpdvdkit to latest version (1.2.4)
arpi
parents:
7032
diff
changeset
|
41 int ( * pf_readv ) ( dvdcss_t, struct iovec *, int ); |
0211de3039eb
update libdvdcss in libmpdvdkit to latest version (1.2.4)
arpi
parents:
7032
diff
changeset
|
42 |
7027 | 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; | |
9333
f0f0f176d298
sync with libdvdcss 1.2.5 (including u8->uint8_t and whitespace cosmetics...)
arpi
parents:
8637
diff
changeset
|
49 |
f0f0f176d298
sync with libdvdcss 1.2.5 (including u8->uint8_t and whitespace cosmetics...)
arpi
parents:
8637
diff
changeset
|
50 /* Key cache directory and pointer to the filename */ |
f0f0f176d298
sync with libdvdcss 1.2.5 (including u8->uint8_t and whitespace cosmetics...)
arpi
parents:
8637
diff
changeset
|
51 char psz_cachefile[PATH_MAX]; |
f0f0f176d298
sync with libdvdcss 1.2.5 (including u8->uint8_t and whitespace cosmetics...)
arpi
parents:
8637
diff
changeset
|
52 char * psz_block; |
7027 | 53 |
54 /* Error management */ | |
55 char * psz_error; | |
56 int b_errors; | |
57 int b_debug; | |
58 | |
59 #ifdef WIN32 | |
8637
0211de3039eb
update libdvdcss in libmpdvdkit to latest version (1.2.4)
arpi
parents:
7032
diff
changeset
|
60 int b_file; |
7027 | 61 char * p_readv_buffer; |
62 int i_readv_buf_size; | |
63 #endif | |
64 | |
65 #ifndef WIN32 | |
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 void _dvdcss_error ( dvdcss_t, char * ); | |
81 void _dvdcss_debug ( dvdcss_t, char * ); | |
82 |