[MPlayer-dev-eng] Performance of libdvdread/libdvdcss

Reimar Döffinger Reimar.Doeffinger at gmx.de
Fri Aug 31 22:42:09 CEST 2012


On Fri, Aug 31, 2012 at 09:30:02PM +0100, Vicente Sendra wrote:
> Thre drive performs ok with other DVD playing software (windvd of powerdvd, media player classic...), i've observed this behavior before (dvd activity led shows a notable difference), even before doing all this modifications, it is just more noticeable with double frame rate. I was testing in my laptop, but i observed the very same behavior with my desktop.

That doesn't really say anything, since that software uses both
different authentication, read functions, cache, ... so anything
might be the reason why it works for them.

> mplayer.exe -ao dsound:device=0 -vf-add yadif=1 -dvd-device K:\VIDEO_TS -dvdangle 1 -msglevel all=9
> 
> And it finally it plays the file, but decoding takes a long time:

Unfortunately that still doesn't really say much, because it still
does not authenticate the drive.
It still leads the two options open:
1) Something is different when using read vs. ReadFile
2) Authenticating the drive makes it go into "break MPlayer" mode

Does the same behaviour happen on other computers/with drives from other
manufacturers, ...?

> If, as you say, both win32k and libc do the same thing, can libc read the disc the same way it does win32k? , i mean, authenticating the disc, getting the disc key and so on.

If the issue is 2), then exactly that will make it go slow and break.

> I'm going to have a look at the code, any advice?

There is a special function to get a file descriptor from a handle.
By using that one you should be able to replace the ReadFile calls by
read() calls, and with a bit more effort even keep the whole
open/authenticate code as is while using the standard libc read
functions.
Actually, even if that doesn't help that might be a welcome patch,
getting rid of a good bit of code.
Also you might want to check that it's not something that can be fixed
by updating libdvdcss to the latest upstream version
(http://www.videolan.org/developers/libdvdcss.html).


More information about the MPlayer-dev-eng mailing list