Discussion:
problem with on-disc key cache
Arpi
2003-01-08 16:22:33 UTC
Permalink
Hi,

We've found a problem in my key cache patch and just checked CVS,
you're version probably has the same problem.


/* If the cache is enabled, extract a unique disc ID */
if( psz_cache )
{

..
/* The data we are looking for is at sector 16 (32768 bytes):
* - offset 40: disc title (32 uppercase chars)
* - offset 813: manufacturing date + serial no (16 digits) */

i_ret = dvdcss->pf_seek( dvdcss, 16 );
if( i_ret != 16 )
{
goto nocache;
}
..

this pf_seek() will NOT fail on mounted (ie. no raw access to the device)
case, but will seek relative to teh start of VOB files or something.
At least the bytes in this block aren't unique at all :(
We should either detect no raw access and disable on-disc cache, or
calculate unique disc id from something else (from the .IFO file maybe).


A'rpi / Astral & ESP-team

--
Developer of MPlayer, the Movie Player for Linux - http://www.MPlayerHQ.hu
--
This is the libdvdcss-devel mailing-list, see http://www.videolan.org/libdvdcss/
To unsubscribe, please read http://www.videolan.org/lists.html
If you are in trouble, please contact <***@videolan.org>
H}kan Hjort
2003-01-08 19:13:28 UTC
Permalink
Post by Arpi
Hi,
We've found a problem in my key cache patch and just checked CVS,
you're version probably has the same problem.
/* If the cache is enabled, extract a unique disc ID */
if( psz_cache )
{
..
* - offset 40: disc title (32 uppercase chars)
* - offset 813: manufacturing date + serial no (16 digits) */
i_ret = dvdcss->pf_seek( dvdcss, 16 );
if( i_ret != 16 )
{
goto nocache;
}
..
this pf_seek() will NOT fail on mounted (ie. no raw access to the device)
case, but will seek relative to teh start of VOB files or something.
At least the bytes in this block aren't unique at all :(
We should either detect no raw access and disable on-disc cache, or
calculate unique disc id from something else (from the .IFO file maybe).
This was why I didn't think this way was very good to begin with...
How do you access the .IFO files when you've just given it a name of
a VOB file to open?
I.e
dvdcss = dvdcss_open ( "/path/to/my/movie/vts_03_2.vob" );

As an additional feature it would be nice it the 'raw access to the device'
and mounted access give the same ID.

I think we need to have external access to the 'ID' (to pass it in) and
also be able to associate an 'offset' to each open so the right keys
can be found. This would already be quite a bit of extra information
so perhaps we should just add the possibility to pass in a key?
Though it's nicer if all programs using libdvdcss would use the same
key cache.

Anyone have any opinions regarding this?

My suggestion for IDs so far is to md5 sum all the .IFO files
and make a second level that maps the UDF disc id to this id
(so you don't have to calculate the MD5 sum everytime, _if_ that
is shown to be too slow).
Not so sure how to best add this to / interact with libdvdcss.
--
HÃ¥kan Hjort
Developer of Ogle, The DVD Player for Unix - "Google: DVD Player"
--
This is the libdvdcss-devel mailing-list, see http://www.videolan.org/libdvdcss/
To unsubscribe, please read http://www.videolan.org/lists.html
If you are in trouble, please contact <***@videolan.org>
Loading...