RE: compiling ffmpeg with vhook support
Hi,
can anyone please advise the way to compile ffmpeg using cygwin in order with vhook support on a windows platform?
compiling ffmpeg with vhook support on msys/mingw32 was impossible. apparently, msys/mingw32 could not provide support of dlopen()
dlopen() is supported on msys/mingw32.
using the following ./configure line on cygwin for ffmpeg svn revision 8549 ../configure --enable-memalign-hack --enable-shared --disable-static --disable network --extra-cflags=-mno-cygwin
any ideas
http://ffmpeg.mplayerhq.hu/ffmpeg-doc.html#SEC32
but first get&apply the patch for llrint() (search the ffmpeg-devel list).
Regards, V?ctor
Hi Victor
thanks for the prompt reply.
heres the latest development: $ ./configure --enable-memalign-hack --enable-shared --disable-static --disable -network --extra-cflags=-mno-cygwin --extra-libs=-mno-cygwin --enable-swscaler --enable-gpl --enable-w32threads --enable-vhook
Notice you are really cross-compiling: your development platform is Cygwin, and your target platform is MinGW.
As far as I know, you may get vhooks compiled under Win32 ONLY if your target is Cygwin. That worked OK the last time I tried (last week).
It MIGHT be possible to get vhooks when cross-compiling, but the last time I tried (a month ago or so) it didn't worked, so you will need to patch configure in some way (I haven't tried that).
$ make make -C libavutil all make[1]: Entering directory `/home/ffmpeg/trunk/libavutil' make[1]: Nothing to be done for `all'. make[1]: Leaving directory `/home/ffmpeg/trunk/libavutil' make -C libavcodec all make[1]: Entering directory `/home/ffmpeg/trunk/libavcodec' gcc -shared -Wl,--out-implib=libavcodec.dll.a -Wl,--warn-common -rdynamic
[...]
w32thread.o: In function `avcodec_thread_init': /home/ffmpeg/trunk/libavcodec/w32thread.c:104: multiple definition of `_avcodec_thread_init' utils.o:/home/ffmpeg/trunk/libavcodec/utils.c:1287: first defined here
w32threads multiple definition seem the reason of the final failure. Maybe (not sure) they conflict with the pthreads that Cygwin uses ?
Info: resolving _av_log_level by linking to __imp__av_log_level (auto-import) Info: resolving _av_crc04C11DB7 by linking to __imp__av_crc04C11DB7 (auto-import ) Info: resolving _av_crc8005 by linking to __imp__av_crc8005 (auto-import) Info: resolving _av_crc07 by linking to __imp__av_crc07 (auto-import) Info: resolving _ff_log2_tab by linking to __imp__ff_log2_tab (auto-import) Info: resolving _ff_sqrt_tab by linking to __imp__ff_sqrt_tab (auto-import) Creating library file: libavcodec.dll.a collect2: ld returned 1 exit status make[1]: *** [cygavcodec-51.dll] Error 1 make[1]: Leaving directory `/home/ffmpeg/trunk/libavcodec'
Regards, V?ctor
------------------------------
_______________________________________________ ffmpeg-user mailing list ffmpeg-user at mplayerhq.hu http://lists.mplayerhq.hu/mailman/listinfo/ffmpeg-user
End of ffmpeg-user Digest, Vol 24, Issue 88 *******************************************
hi again Victor i have removed the flag --enable-w32threads and that's where are so far: $ ./configure --enable-memalign-hack --enable-shared --disable-static --disable -network --extra-cflags=-mno-cygwin --extra-libs=-mno-cygwin --enable-swscaler --enable-gpl --enable-avisynth --enable-vhook make -C vhook all make[1]: Entering directory `/home/ffmpeg/trunk/vhook' gcc -I"/home/ffmpeg/trunk" -I"/home/ffmpeg/trunk" -I"/home/ffmpeg/trunk"/libavu il -I"/home/ffmpeg/trunk"/libavcodec -I"/home/ffmpeg/trunk"/libavformat -I"/hom /ffmpeg/trunk"/libswscale -fPIC -mno-cygwin -fomit-frame-pointer -g -Wdeclarat on-after-statement -Wall -Wno-switch -Wdisabled-optimization -Wpointer-arith -W edundant-decls -O3 -DHAVE_AV_CONFIG_H -c -o null.o null.c null.c:1: warning: -fPIC ignored for target (all code is position independent) In file included from null.c:23: /home/ffmpeg/trunk/libavformat/framehook.h:25:2: warning: #warning VHOOK is dep ecated please help porting libmpcodecs or a better filter system to ffmpeg inst ad of wasting your time writing new fiters for this crappy one In file included from /home/ffmpeg/trunk/libavformat/framehook.h:31, from null.c:23: /home/ffmpeg/trunk/libavcodec/avcodec.h:2460: warning: `ImgReSampleContext' is eprecated (declared at /home/ffmpeg/trunk/libavcodec/avcodec.h:2447) /home/ffmpeg/trunk/libavcodec/avcodec.h:2463: warning: `ImgReSampleContext' is eprecated (declared at /home/ffmpeg/trunk/libavcodec/avcodec.h:2447) null.c: In function `Process': null.c:84: warning: implicit declaration of function `exit_is_forbidden' null.c:84: warning: redundant redeclaration of 'exit_is_forbidden' null.c:84: warning: previous implicit declaration of 'exit_is_forbidden' was he e gcc -Wl,--warn-common -rdynamic -export-dynamic -Wl,-rpath-link,"/home/ffmpeg/ runk"/libavcodec -Wl,-rpath-link,"/home/ffmpeg/trunk"/libavformat -Wl,-rpath-li k,"/home/ffmpeg/trunk"/libavutil -g -o null.dll -shared -L"/home/ffmpeg/trunk"/ ibavformat -L"/home/ffmpeg/trunk"/libavcodec -L"/home/ffmpeg/trunk"/libswscale L"/home/ffmpeg/trunk"/libavutil null.o -lavformat -lavcodec -lswscale -lavutil mno-cygwin -lz -lvfw32 gcc: unrecognized option `-rdynamic' null.o: In function `Process': /home/ffmpeg/trunk/vhook/null.c:84: undefined reference to `_exit_is_forbidden' /home/ffmpeg/trunk/vhook/null.c:105: undefined reference to `_exit_is_forbidden collect2: ld returned 1 exit status make[1]: *** [null.dll] Error 1 rm null.o make[1]: Leaving directory `/home/ffmpeg/trunk/vhook' make: *** [videohook] Error 2 this seems to me that i am pretty close to the end as make has reached the compilation of the vhook libraries stage. you mentioned that i was in effect cross compiling. can you please advise the right ./configure params in order to compile ffmpeg purely under win32 witht he target being cygwin? thanks _________________________________________________________________ MSN Hotmail is evolving - check out the new Windows Live Mail. http://ideas.live.co.uk/
Hi,
Hi,
can anyone please advise the way to compile ffmpeg using cygwin in order with vhook support on a windows platform?
compiling ffmpeg with vhook support on msys/mingw32 was impossible. apparently, msys/mingw32 could not provide support of dlopen()
dlopen() is supported on msys/mingw32.
using the following ./configure line on cygwin for ffmpeg svn revision 8549 ../configure --enable-memalign-hack --enable-shared --disable-static --disable network --extra-cflags=-mno-cygwin
any ideas
http://ffmpeg.mplayerhq.hu/ffmpeg-doc.html#SEC32
but first get&apply the patch for llrint() (search the ffmpeg-devel list).
Regards, V?ctor
Hi Victor
thanks for the prompt reply.
heres the latest development: $ ./configure --enable-memalign-hack --enable-shared --disable-static --disable -network --extra-cflags=-mno-cygwin --extra-libs=-mno-cygwin --enable-swscaler --enable-gpl --enable-w32threads --enable-vhook
Notice you are really cross-compiling: your development platform is Cygwin, and your target platform is MinGW.
As far as I know, you may get vhooks compiled under Win32 ONLY if your target is Cygwin. That worked OK the last time I tried (last week).
It MIGHT be possible to get vhooks when cross-compiling, but the last time I tried (a month ago or so) it didn't worked, so you will need to patch configure in some way (I haven't tried that).
$ make make -C libavutil all make[1]: Entering directory `/home/ffmpeg/trunk/libavutil' make[1]: Nothing to be done for `all'. make[1]: Leaving directory `/home/ffmpeg/trunk/libavutil' make -C libavcodec all make[1]: Entering directory `/home/ffmpeg/trunk/libavcodec' gcc -shared -Wl,--out-implib=libavcodec.dll.a -Wl,--warn-common -rdynamic
[...]
w32thread.o: In function `avcodec_thread_init': /home/ffmpeg/trunk/libavcodec/w32thread.c:104: multiple definition of `_avcodec_thread_init' utils.o:/home/ffmpeg/trunk/libavcodec/utils.c:1287: first defined here
w32threads multiple definition seem the reason of the final failure. Maybe (not sure) they conflict with the pthreads that Cygwin uses ?
Info: resolving _av_log_level by linking to __imp__av_log_level (auto-import) Info: resolving _av_crc04C11DB7 by linking to __imp__av_crc04C11DB7 (auto-import ) Info: resolving _av_crc8005 by linking to __imp__av_crc8005 (auto-import) Info: resolving _av_crc07 by linking to __imp__av_crc07 (auto-import) Info: resolving _ff_log2_tab by linking to __imp__ff_log2_tab (auto-import) Info: resolving _ff_sqrt_tab by linking to __imp__ff_sqrt_tab (auto-import) Creating library file: libavcodec.dll.a collect2: ld returned 1 exit status make[1]: *** [cygavcodec-51.dll] Error 1 make[1]: Leaving directory `/home/ffmpeg/trunk/libavcodec'
hi again Victor
i have removed the flag --enable-w32threads and that's where are so far:
$ ./configure --enable-memalign-hack --enable-shared --disable-static --disable -network --extra-cflags=-mno-cygwin --extra-libs=-mno-cygwin --enable-swscaler --enable-gpl --enable-avisynth --enable-vhook
make -C vhook all make[1]: Entering directory `/home/ffmpeg/trunk/vhook' gcc -I"/home/ffmpeg/trunk" -I"/home/ffmpeg/trunk" -I"/home/ffmpeg/trunk"/libavu il -I"/home/ffmpeg/trunk"/libavcodec -I"/home/ffmpeg/trunk"/libavformat -I"/hom /ffmpeg/trunk"/libswscale -fPIC -mno-cygwin -fomit-frame-pointer -g -Wdeclarat on-after-statement -Wall -Wno-switch -Wdisabled-optimization -Wpointer-arith -W edundant-decls -O3 -DHAVE_AV_CONFIG_H -c -o null.o null.c
[...]
null.c: In function `Process': null.c:84: warning: implicit declaration of function `exit_is_forbidden' null.c:84: warning: redundant redeclaration of 'exit_is_forbidden' null.c:84: warning: previous implicit declaration of 'exit_is_forbidden'
Change r8536 forbid exit(), you need to apply the patch I have just submitted to ffmpeg-devel. [...]
this seems to me that i am pretty close to the end as make has reached the compilation of the vhook libraries stage.
you mentioned that i was in effect cross compiling. can you please advise the right ./configure params in order to compile ffmpeg purely under win32 witht he target being cygwin?
Well, they are at http://ffmpeg.mplayerhq.hu/ffmpeg-doc.html#SEC32 Regards, V?ctor
participants (2)
-
asterefred@hotmail.com -
wzrlpy@arsystel.com