[MPlayer-dev-eng] Re: Frapsvid.dll

Gianluigi Tiesi mplayer at netfarm.it
Thu May 12 07:20:54 CEST 2005


On Tue, May 10, 2005 at 10:25:36AM +0000, adland123 wrote:
> Roberto Togni <r_togni <at> tiscali.it> writes:
> 
> > Just a quick note, the decoder is not a DShow codec, but a VfW one (use
> > driver vfw). It won't work anyway, it calls an unimplemented function
> > (strstr, easy to add) and it tries to load D3D9.dll (Direct3D9 ?)
> 
>  d3d9.dll is DirectX DLL for DirectX9.
> you can also load this DLL as in the vssh dll example.
> (not used with the older codecs to my knowledge)
> 
> Then there are unimplemeted functions - advapi32.dll
> InitializeSid
> GetSidLengthRequired
> GetSidSubAuthority
> GetLengthSid
> 
> can look at wine source code dlls/advapi32/security.c and dlls/ntdll/sec.c
> for their implementation

As I see d3d9 is only called to see if the video drivers is for an ATI
video card, so I think d3d9 stuff can be easly bypassed by adding this
code in module.c (this is only valid for frapsvid.dll on mplayer site)

if (strstr(libname,"frapsvid.dll") && wm)
{
      for (i=0;i<5;i++) ((char*)0x10001d2c)[i]=0x90;
}

this code is used to kill d3d9 dep, anyway strstr can easly be
implemented, but I've never seen calling it.

On Windows (loading d3d9.dll) it says:
Error decompressing frame, err=-2

a lot of times, then:
SendDriverMessage: driver 1809830, message 400D, arg1 22E6D0, arg2 18
                Result: FFFFFFFE


on linux:
SendDriverMessage: driver 836C3B0, message 1, arg1 0, arg2 0
                Result: 1
SendDriverMessage: driver 836C3B0, message 2, arg1 0, arg2 0
                Result: 1
SendDriverMessage: driver 836C3B0, message 3, arg1 BFFFE3E0, arg2
BFFFE550
                Result: 3
Loaded DLL driver frapsvid.dll at 10000000
SendDriverMessage: driver 836C3B0, message 400A, arg1 8365618, arg2 0
                Result: 2C
ICDecompressGetFormatSize ret: 44
SendDriverMessage: driver 836C3B0, message 400A, arg1 8365618, arg2
836C548

So I think the input video should be different (should a supposition)
I've no clue about managing video, but I'm familiar with
win32 loader so for this I may need additional help :)

Never seen advapi32 calls for me.
I'm just downloading dxsdk to see what method the driver use and how
is the IDirect3D9 struct (/ class) in memory, so I may implement
the correct functions without mem-patching the dll (this should
avoid probems with different versions).
Anyway I'am sure that d3d9 only checks for ati (also here is
called strstr with "ATI" and "driverdllname").
In my test on windows the second arg for strstr was nv4_disp.dll
(I have an nvidia card), then it sets a variable to 1 (at 0x02950000),
after this it calls FreeLibrary.
Very smart way this... call a directx context to see if the video card
is an ati within a vfw dll ;)


Watining for feedbacks :)

-- 
Gianluigi Tiesi <sherpya at netfarm.it>
EDP Project Leader
Netfarm S.r.l. - http://www.netfarm.it/
Free Software: http://oss.netfarm.it/




More information about the MPlayer-dev-eng mailing list