[Ffmpeg-devel] [PATCH] Cygwin vhook, always static avformat
Fri Aug 11 00:11:29 CEST 2006
>> On Mon, Aug 07, 2006 at 04:37:10PM +0200, V?ctor Paesa wrote:
>>> > But it has the downsize of creating huge vhooks. This is not
>>> > acceptable. I'm confident that this is just a matter of finding the
>>> > right linker incantation ...
>>> Using (a) there would be huge vhooks only for static builds.
>>> The linker docs mentions undefined sysmbols as one limitation of Win32
>>> loader, I have not been able to find the proper linker spell ...
>>> I tried other ways to circumvent this.
>>> e) Extract symbol list from .EXE to create a .def, that will be used to
>>> create an import library
>>> (see section "Building and Using DLLs" in Cygwin's User Guide)
>>> Let's run it:
>>> $ ../ffmpeg -i ~/SmallConcert.avi -vhook './null.dll' output.avi
>>> FFmpeg version SVN-rUNKNOWN, Copyright (c) 2000-2004 Fabrice Bellard
>>> configuration: --enable-static --disable-shared
>>> libavutil version: 49.0.0
>>> libavcodec version: 51.11.0
>>> libavformat version: 50.5.0
>>> built on Aug 7 2006 12:55:21, gcc: 3.4.4 (cygming special)
>>> (gdc 0.12, using dmd 0.125)
>>> Input #0, avi, from '/home/wzrlpy/SmallConcert.avi':
>>> Duration: 00:00:20.2, start: 0.000000, bitrate: 30349 kb/s
>>> Stream #0.0: Video: dvvideo, yuv420p, 720x576, 25.00 fps(r)
>>> Stream #0.1: Audio: pcm_s16le, 48000 Hz, stereo, 1536 kb/s
>>> Permission denied
>>> Failed to add video hook function: ./null.dll
>>> No idea why I got that "Permission denied", ffmpeg_g.exe shows
>>> $ ls -l ffmpeg_g*
>>> -rw-r--r-- 1 wzrlpy Users 536888 Aug 7 15:38 ffmpeg_g.a
>>> -rw-r--r-- 1 wzrlpy Users 11888 Aug 7 15:38 ffmpeg_g.def
>>> -rwxr-xr-x 1 wzrlpy Users 10016527 Aug 7 15:28 ffmpeg_g.exe
>>> So way (e) does not work.
>> Hmmm, I'm sure you just haven't found the reason for the problem here.
>> I believe you should try to investigate further.
> Further reading on Win32 DLLs make me believe this "Permission denied"
> message could be related to this flag in Win32 function LoadLibraryEx:
> 0x00000010 If this value is used, the system does not perform
> automatic trust comparisons on the DLL or its dependents when they are
> Windows 2000/NT and Windows Me/98/95: This value is not supported."
> Probably, the code generated by linker is not setting that flag, or is
> using function LoadLibrary, that doesn't have that flag.
> My previous tests were on WinXP with SP2, and trust comparations are
> probably on.
> I don't know how to disable them, I'll try to resurrect a Win98 computer I
> own, install Cygwin runtime, ffmpeg, and see the message there.
> (just to check hypothesis)
No way, running under Win98 SE it reports the same "Permission denied"
More information about the ffmpeg-devel