Mercurial > mplayer.hg
annotate libmpdvdkit2/libdvdcss_changes.diff @ 16825:657f55c92d4c
Support for video files created by Samsung Miniket VP-M100 diskless camcorder
initial patch by Georgi Chorbadzhiyski <gf@unixsol.org>
author | iive |
---|---|
date | Sat, 22 Oct 2005 13:53:18 +0000 |
parents | 2ab52c9b72b9 |
children | 72c1c7054ad5 |
rev | line source |
---|---|
16714
2ab52c9b72b9
Replace unconditional #defines by build system trickery.
diego
parents:
16630
diff
changeset
|
1 --- css.c 2005-07-11 14:24:09.000000000 +0200 |
2ab52c9b72b9
Replace unconditional #defines by build system trickery.
diego
parents:
16630
diff
changeset
|
2 +++ css.c 2005-10-01 20:14:37.000000000 +0200 |
2ab52c9b72b9
Replace unconditional #defines by build system trickery.
diego
parents:
16630
diff
changeset
|
3 @@ -53,7 +56,7 @@ |
2ab52c9b72b9
Replace unconditional #defines by build system trickery.
diego
parents:
16630
diff
changeset
|
4 # include <limits.h> |
14861 | 5 #endif |
6 | |
7 -#include "dvdcss/dvdcss.h" | |
8 +#include "dvdcss.h" | |
9 | |
10 #include "common.h" | |
11 #include "css.h" | |
16630 | 12 --- device.c 2005-07-11 13:33:34.000000000 +0200 |
13 +++ device.c 2005-10-01 19:08:07.000000000 +0200 | |
14 @@ -55,7 +44,7 @@ | |
14861 | 15 # include <sys/uio.h> /* struct iovec */ |
16 #endif | |
17 | |
18 -#include "dvdcss/dvdcss.h" | |
19 +#include "dvdcss.h" | |
20 | |
21 #include "common.h" | |
22 #include "css.h" | |
16630 | 23 @@ -143,8 +132,11 @@ |
24 print_debug( dvdcss, "opening target `%s'", psz_device ); | |
14861 | 25 |
26 #if defined( WIN32 ) | |
27 - /* If device is not "X:", we are actually opening a file. */ | |
28 - dvdcss->b_file = !psz_device[0] || psz_device[1] != ':' || psz_device[2]; | |
29 + dvdcss->b_file = 1; | |
30 + /* If device is "X:" or "X:\", we are not actually opening a file. */ | |
31 + if (psz_device[0] && psz_device[1] == ':' && | |
32 + (!psz_device[2] || (psz_device[2] == '\\' && !psz_device[3]))) | |
33 + dvdcss->b_file = 0; | |
34 | |
35 /* Initialize readv temporary buffer */ | |
36 dvdcss->p_readv_buffer = NULL; | |
16630 | 37 --- error.c 2004-02-24 16:46:49.000000000 +0100 |
16714
2ab52c9b72b9
Replace unconditional #defines by build system trickery.
diego
parents:
16630
diff
changeset
|
38 +++ error.c 2005-10-01 20:15:46.000000000 +0200 |
2ab52c9b72b9
Replace unconditional #defines by build system trickery.
diego
parents:
16630
diff
changeset
|
39 @@ -34,7 +37,7 @@ |
16630 | 40 # include <limits.h> |
16714
2ab52c9b72b9
Replace unconditional #defines by build system trickery.
diego
parents:
16630
diff
changeset
|
41 #endif |
16630 | 42 |
14861 | 43 -#include "dvdcss/dvdcss.h" |
44 +#include "dvdcss.h" | |
45 | |
46 #include "common.h" | |
47 #include "css.h" | |
16630 | 48 --- libdvdcss.c 2004-08-13 15:40:18.000000000 +0200 |
49 +++ libdvdcss.c 2005-10-01 19:11:27.000000000 +0200 | |
50 @@ -87,10 +87,7 @@ | |
14861 | 51 * values. This will speed up descrambling of DVDs which are in the |
52 * cache. The DVDCSS_CACHE directory is created if it does not exist, | |
53 * and a subdirectory is created named after the DVD's title or | |
54 - * manufacturing date. If DVDCSS_CACHE is not set or is empty, \e libdvdcss | |
55 - * will use the default value which is "${HOME}/.dvdcss/" under Unix and | |
56 - * "C:\Documents and Settings\$USER\Application Data\dvdcss\" under Win32. | |
57 - * The special value "off" disables caching. | |
58 + * manufacturing date. | |
59 */ | |
60 | |
61 /* | |
16714
2ab52c9b72b9
Replace unconditional #defines by build system trickery.
diego
parents:
16630
diff
changeset
|
62 @@ -124,7 +127,7 @@ |
2ab52c9b72b9
Replace unconditional #defines by build system trickery.
diego
parents:
16630
diff
changeset
|
63 # include <direct.h> |
2ab52c9b72b9
Replace unconditional #defines by build system trickery.
diego
parents:
16630
diff
changeset
|
64 #endif |
16630 | 65 |
14861 | 66 -#include "dvdcss/dvdcss.h" |
67 +#include "dvdcss.h" | |
68 | |
69 #include "common.h" | |
70 #include "css.h" | |
16630 | 71 @@ -132,6 +113,12 @@ |
14861 | 72 #include "ioctl.h" |
73 #include "device.h" | |
74 | |
75 +#ifndef HAVE_MPLAYER | |
76 + #include "get_path.c" | |
77 +#else | |
78 + extern char * get_path( char * filename ); | |
79 +#endif | |
80 + | |
81 /** | |
82 * \brief Symbol for version checks. | |
83 * | |
16630 | 84 @@ -233,6 +220,8 @@ |
85 } | |
14861 | 86 } |
87 | |
16630 | 88 +#if 0 /* MPlayer caches keys in its own configuration directory */ |
89 + | |
14861 | 90 /* |
16630 | 91 * If DVDCSS_CACHE was not set, try to guess a default value |
92 */ | |
93 @@ -309,6 +298,8 @@ | |
94 #endif | |
95 } | |
96 | |
97 +#endif /* 0 */ | |
98 + | |
99 /* | |
14861 | 100 * Find cache dir from the DVDCSS_CACHE environment variable |
101 */ | |
16630 | 102 @@ -326,6 +317,7 @@ |
14861 | 103 psz_cache = NULL; |
104 } | |
105 } | |
106 + else psz_cache = get_path( "DVDKeys" ); | |
107 | |
108 /* | |
109 * Open device | |
16630 | 110 @@ -504,9 +496,10 @@ |
14861 | 111 dvdcss->psz_cachefile[0] = '\0'; |
112 goto nocache; | |
113 } | |
114 + i += sprintf( dvdcss->psz_cachefile + i, "/"); | |
115 | |
16630 | 116 - i += sprintf( dvdcss->psz_cachefile + i, "/%s-%s%s", psz_title, |
117 - psz_serial, psz_key ); | |
14861 | 118 +// i += sprintf( dvdcss->psz_cachefile + i, "/%s", psz_data ); |
16630 | 119 + i += sprintf( dvdcss->psz_cachefile + i, "/%s#%s", psz_title, psz_serial ); |
14861 | 120 #if !defined( WIN32 ) || defined( SYS_CYGWIN ) |
121 i_ret = mkdir( dvdcss->psz_cachefile, 0755 ); | |
122 #else |