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