mirror of https://github.com/mpv-player/mpv
Switch from our own to the upstream DVD key caching strategy and directory.
Should work just as well while reducing our diff towards upstream and enhancing compatibility with external libdvdcss implementations. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@16849 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
parent
072bf7aa06
commit
436fa6d0bd
|
@ -90,7 +90,10 @@
|
||||||
* values. This will speed up descrambling of DVDs which are in the
|
* values. This will speed up descrambling of DVDs which are in the
|
||||||
* cache. The DVDCSS_CACHE directory is created if it does not exist,
|
* cache. The DVDCSS_CACHE directory is created if it does not exist,
|
||||||
* and a subdirectory is created named after the DVD's title or
|
* and a subdirectory is created named after the DVD's title or
|
||||||
* manufacturing date.
|
* manufacturing date. If DVDCSS_CACHE is not set or is empty, \e libdvdcss
|
||||||
|
* will use the default value which is "${HOME}/.dvdcss/" under Unix and
|
||||||
|
* "C:\Documents and Settings\$USER\Application Data\dvdcss\" under Win32.
|
||||||
|
* The special value "off" disables caching.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -132,12 +135,6 @@
|
||||||
#include "ioctl.h"
|
#include "ioctl.h"
|
||||||
#include "device.h"
|
#include "device.h"
|
||||||
|
|
||||||
#ifndef HAVE_MPLAYER
|
|
||||||
#include "get_path.c"
|
|
||||||
#else
|
|
||||||
extern char * get_path( char * filename );
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief Symbol for version checks.
|
* \brief Symbol for version checks.
|
||||||
*
|
*
|
||||||
|
@ -239,8 +236,6 @@ extern dvdcss_t dvdcss_open ( char *psz_target )
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#if 0 /* MPlayer caches keys in its own configuration directory */
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* If DVDCSS_CACHE was not set, try to guess a default value
|
* If DVDCSS_CACHE was not set, try to guess a default value
|
||||||
*/
|
*/
|
||||||
|
@ -317,8 +312,6 @@ extern dvdcss_t dvdcss_open ( char *psz_target )
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif /* 0 */
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Find cache dir from the DVDCSS_CACHE environment variable
|
* Find cache dir from the DVDCSS_CACHE environment variable
|
||||||
*/
|
*/
|
||||||
|
@ -336,7 +329,6 @@ extern dvdcss_t dvdcss_open ( char *psz_target )
|
||||||
psz_cache = NULL;
|
psz_cache = NULL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else psz_cache = get_path( "DVDKeys" );
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Open device
|
* Open device
|
||||||
|
@ -515,10 +507,9 @@ extern dvdcss_t dvdcss_open ( char *psz_target )
|
||||||
dvdcss->psz_cachefile[0] = '\0';
|
dvdcss->psz_cachefile[0] = '\0';
|
||||||
goto nocache;
|
goto nocache;
|
||||||
}
|
}
|
||||||
i += sprintf( dvdcss->psz_cachefile + i, "/");
|
|
||||||
|
|
||||||
// i += sprintf( dvdcss->psz_cachefile + i, "/%s", psz_data );
|
i += sprintf( dvdcss->psz_cachefile + i, "/%s-%s%s", psz_title,
|
||||||
i += sprintf( dvdcss->psz_cachefile + i, "/%s#%s", psz_title, psz_serial );
|
psz_serial, psz_key );
|
||||||
#if !defined( WIN32 ) || defined( SYS_CYGWIN )
|
#if !defined( WIN32 ) || defined( SYS_CYGWIN )
|
||||||
i_ret = mkdir( dvdcss->psz_cachefile, 0755 );
|
i_ret = mkdir( dvdcss->psz_cachefile, 0755 );
|
||||||
#else
|
#else
|
||||||
|
|
|
@ -61,18 +61,6 @@
|
||||||
#include "css.h"
|
#include "css.h"
|
||||||
--- libdvdcss.c 2004-08-13 15:40:18.000000000 +0200
|
--- libdvdcss.c 2004-08-13 15:40:18.000000000 +0200
|
||||||
+++ libdvdcss.c 2005-10-01 19:11:27.000000000 +0200
|
+++ libdvdcss.c 2005-10-01 19:11:27.000000000 +0200
|
||||||
@@ -87,10 +87,7 @@
|
|
||||||
* values. This will speed up descrambling of DVDs which are in the
|
|
||||||
* cache. The DVDCSS_CACHE directory is created if it does not exist,
|
|
||||||
* and a subdirectory is created named after the DVD's title or
|
|
||||||
- * manufacturing date. If DVDCSS_CACHE is not set or is empty, \e libdvdcss
|
|
||||||
- * will use the default value which is "${HOME}/.dvdcss/" under Unix and
|
|
||||||
- * "C:\Documents and Settings\$USER\Application Data\dvdcss\" under Win32.
|
|
||||||
- * The special value "off" disables caching.
|
|
||||||
+ * manufacturing date.
|
|
||||||
*/
|
|
||||||
|
|
||||||
/*
|
|
||||||
@@ -124,7 +127,7 @@
|
@@ -124,7 +127,7 @@
|
||||||
# include <direct.h>
|
# include <direct.h>
|
||||||
#endif
|
#endif
|
||||||
|
@ -82,55 +70,3 @@
|
||||||
|
|
||||||
#include "common.h"
|
#include "common.h"
|
||||||
#include "css.h"
|
#include "css.h"
|
||||||
@@ -132,6 +113,12 @@
|
|
||||||
#include "ioctl.h"
|
|
||||||
#include "device.h"
|
|
||||||
|
|
||||||
+#ifndef HAVE_MPLAYER
|
|
||||||
+ #include "get_path.c"
|
|
||||||
+#else
|
|
||||||
+ extern char * get_path( char * filename );
|
|
||||||
+#endif
|
|
||||||
+
|
|
||||||
/**
|
|
||||||
* \brief Symbol for version checks.
|
|
||||||
*
|
|
||||||
@@ -233,6 +220,8 @@
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
+#if 0 /* MPlayer caches keys in its own configuration directory */
|
|
||||||
+
|
|
||||||
/*
|
|
||||||
* If DVDCSS_CACHE was not set, try to guess a default value
|
|
||||||
*/
|
|
||||||
@@ -309,6 +298,8 @@
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
|
|
||||||
+#endif /* 0 */
|
|
||||||
+
|
|
||||||
/*
|
|
||||||
* Find cache dir from the DVDCSS_CACHE environment variable
|
|
||||||
*/
|
|
||||||
@@ -326,6 +317,7 @@
|
|
||||||
psz_cache = NULL;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
+ else psz_cache = get_path( "DVDKeys" );
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Open device
|
|
||||||
@@ -504,9 +496,10 @@
|
|
||||||
dvdcss->psz_cachefile[0] = '\0';
|
|
||||||
goto nocache;
|
|
||||||
}
|
|
||||||
+ i += sprintf( dvdcss->psz_cachefile + i, "/");
|
|
||||||
|
|
||||||
- i += sprintf( dvdcss->psz_cachefile + i, "/%s-%s%s", psz_title,
|
|
||||||
- psz_serial, psz_key );
|
|
||||||
+// i += sprintf( dvdcss->psz_cachefile + i, "/%s", psz_data );
|
|
||||||
+ i += sprintf( dvdcss->psz_cachefile + i, "/%s#%s", psz_title, psz_serial );
|
|
||||||
#if !defined( WIN32 ) || defined( SYS_CYGWIN )
|
|
||||||
i_ret = mkdir( dvdcss->psz_cachefile, 0755 );
|
|
||||||
#else
|
|
||||||
|
|
Loading…
Reference in New Issue