Who did make and test videoFilter plugin for 2.6 version?

Started by presler, August 15, 2012, 10:16:27 AM

Previous topic - Next topic

presler

Hi. Who did make and test for correct compilation videoFilter plugin for 2.6 version (this src is made as an example)? I used Code::Blocks as is written in http://www.avidemux.org/admWiki/doku.php?id=build:devel_2.6 and it gives a lot of different errors. Is it possible to use other IDEs? In attachment I zipped Code::Blocks project.

mean

On linux, i know that you can use netbeans or eclipse
What exactly is the error message you have ?

mean

I've resynced the sample plugins, they were outdated
It should work fine now

presler

Thanks for "[myOwnPlugin] Update demuxer sample", "[myOwnPlugin] Brind video filter up to date" and especially "[msvc] a few tweaks so core can be built by msvc", but I have new error when make videoFilter example in CMake (target IDE is VS 11):
CMake Error at CMakeLists.txt:56 (TARGET_LINK_LIBRARIES):
  Cannot specify link libraries for target "ADM_vf_logo" which is not built
  by this project.
Line 56 is:
TARGET_LINK_LIBRARIES(ADM_vf_logo ADM_coreImageLoader6 )
As far as I understood CMake couldn't find "ADM_coreImageLoader6.lib", didn't it?

presler

mean, do you have any instant messager in order to ask you something more fast?

presler

And another two questions:
1. Is it actually possible to make correct project (plugin, videoFilter sample, for example) with CMake for VS and then to build it in VS?
2. What is initial OS for Avidemux and what OS were added later?

mean

1- Normally no. Gruntster added recently some support for visual studio, but it will be incompatible with the mingw one
2- Initially linux, then macOsX and windows

The error you have is probably because when setting it up, the path to the installed part was wrong (i.e. where the ADM_core***.dll are)
You need to download and unzip  the -dev package if you dont build everything (i.e. avidemux) yourself

presler

Nevertheless, I tried to make it for VS 11 again, I had to add "DO_COMMON" entry to CMake and had to use "avidemux_r8140_devel_win32.7z" package as you said, so it generate VS 11 project. Then I use new files from "avidemux2-6\foreignBuilds\msvc\include" and change part of "ADM_coreConfig.h":
// 'gettimeofday' function is present
#ifndef _WIN32
#define HAVE_GETTIMEOFDAY
#endif
Then rename additional dependencies *.lib files to *.dll.a as in dev folder (what is the "m.lib" file in dependencies?), but it show me:

2>ADM_vidLogo.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: bool __thiscall ADMImage::copyToAlpha(class ADMImage *,unsigned int,unsigned int,unsigned int)" (__imp_?copyToAlpha@ADMImage@@QAE_NPAV1@III@Z) referenced in function "public: virtual bool __thiscall addLogopFilter::getNextFrame(unsigned int *,class ADMImage *)" (?getNextFrame@addLogopFilter@@UAE_NPAIPAVADMImage@@@Z)
2>ADM_vidLogo.obj : error LNK2019: unresolved external symbol "public: __thiscall ADM_coreVideoFilter::ADM_coreVideoFilter(class ADM_coreVideoFilter *,class CONFcouple *)" (??0ADM_coreVideoFilter@@QAE@PAV0@PAVCONFcouple@@@Z) referenced in function "public: __thiscall addLogopFilter::addLogopFilter(class ADM_coreVideoFilter *,class CONFcouple *)" (??0addLogopFilter@@QAE@PAVADM_coreVideoFilter@@PAVCONFcouple@@@Z)
2>ADM_vidLogo.obj : error LNK2019: unresolved external symbol "public: virtual __thiscall ADM_coreVideoFilter::~ADM_coreVideoFilter(void)" (??1ADM_coreVideoFilter@@UAE@XZ) referenced in function "public: virtual __thiscall addLogopFilter::~addLogopFilter(void)" (??1addLogopFilter@@UAE@XZ)
2>ADM_vidLogo.obj : error LNK2001: unresolved external symbol "public: virtual bool __thiscall ADM_coreVideoFilter::goToTime(unsigned __int64)" (?goToTime@ADM_coreVideoFilter@@UAE_N_K@Z)
2>ADM_vidLogo.obj : error LNK2001: unresolved external symbol "public: virtual bool __thiscall ADM_coreVideoFilter::getNextFrameAs(enum ADM_HW_IMAGE,unsigned int *,class ADMImage *)" (?getNextFrameAs@ADM_coreVideoFilter@@UAE_NW4ADM_HW_IMAGE@@PAIPAVADMImage@@@Z)
2>ADM_vidLogo.obj : error LNK2001: unresolved external symbol "public: virtual struct FilterInfo * __thiscall ADM_coreVideoFilter::getInfo(void)" (?getInfo@ADM_coreVideoFilter@@UAEPAUFilterInfo@@XZ)
2>ADM_vidLogo.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) bool __cdecl ADM_paramLoad(class CONFcouple *,struct ADM_paramList const *,void *)" (__imp_?ADM_paramLoad@@YA_NPAVCONFcouple@@PBUADM_paramList@@PAX@Z) referenced in function "public: __thiscall addLogopFilter::addLogopFilter(class ADM_coreVideoFilter *,class CONFcouple *)" (??0addLogopFilter@@QAE@PAVADM_coreVideoFilter@@PAVCONFcouple@@@Z)
2>ADM_vidLogo.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) bool __cdecl ADM_paramSave(class CONFcouple * *,struct ADM_paramList const *,void *)" (__imp_?ADM_paramSave@@YA_NPAPAVCONFcouple@@PBUADM_paramList@@PAX@Z) referenced in function "public: virtual bool __thiscall addLogopFilter::getCoupledConf(class CONFcouple * *)" (?getCoupledConf@addLogopFilter@@UAE_NPAPAVCONFcouple@@@Z)
2>ADM_vidLogo.obj : error LNK2019: unresolved external symbol "class ADMImage * __cdecl createImageFromFile(char const *)" (?createImageFromFile@@YAPAVADMImage@@PBD@Z) referenced in function "protected: bool __thiscall addLogopFilter::reloadImage(void)" (?reloadImage@addLogopFilter@@IAE_NXZ)
2>ADM_vidLogo.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall diaElemUInteger::diaElemUInteger(unsigned int *,char const *,unsigned int,unsigned int,char const *)" (__imp_??0diaElemUInteger@@QAE@PAIPBDII1@Z) referenced in function "public: virtual bool __thiscall addLogopFilter::configure(void)" (?configure@addLogopFilter@@UAE_NXZ)
2>ADM_vidLogo.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: virtual __thiscall diaElemUInteger::~diaElemUInteger(void)" (__imp_??1diaElemUInteger@@UAE@XZ) referenced in function "public: virtual bool __thiscall addLogopFilter::configure(void)" (?configure@addLogopFilter@@UAE_NXZ)
2>ADM_vidLogo.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall diaElemFile::diaElemFile(unsigned int,char * *,char const *,char const *,char const *)" (__imp_??0diaElemFile@@QAE@IPAPADPBD11@Z) referenced in function "public: virtual bool __thiscall addLogopFilter::configure(void)" (?configure@addLogopFilter@@UAE_NXZ)
2>ADM_vidLogo.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: virtual __thiscall diaElemFile::~diaElemFile(void)" (__imp_??1diaElemFile@@UAE@XZ) referenced in function "public: virtual bool __thiscall addLogopFilter::configure(void)" (?configure@addLogopFilter@@UAE_NXZ)
2>ADM_vidLogo.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) unsigned char __cdecl diaFactoryRun(char const *,unsigned int,class diaElem * *)" (__imp_?diaFactoryRun@@YAEPBDIPAPAVdiaElem@@@Z) referenced in function "public: virtual bool __thiscall addLogopFilter::configure(void)" (?configure@addLogopFilter@@UAE_NXZ)
2>ADM_vidLogo.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) void __cdecl GUI_Error_HIG(char const *,char const *,...)" (__imp_?GUI_Error_HIG@@YAXPBD0ZZ) referenced in function "public: virtual bool __thiscall addLogopFilter::configure(void)" (?configure@addLogopFilter@@UAE_NXZ)

I'll try to use mingw (with code::blocks) next time.

mean

the avidemux 8140_devel xxx is meant for mingw
I dont think it will work with VS
when starting cmake, specify a codeblocks project

presler

I tried to make videoFilter sample plugin but it output show some errors during compilation (but the number is less before 20 august commit) (use r8140, 20.08.2012):
1. avidemux2-6/avidemux_core/ADM_core/include/ADM_assert.h:23:21: error: intrin.h: No such file or directory
intrin.h exists only in VS include folder.
2. avidemux2-6/avidemux_core/ADM_coreUtils/include/ADM_coreUtils.h:16:20: error: avifmt.h: No such file or directory
avifmt.h exist in "avidemux2-6\avidemux_core\ADM_coreDemuxer\include\unix" and in win sdk folder - what is shoud be used?
3. avidemux_core/ADM_coreUtils/include/ADM_coreUtils.h:30: error: variable or field 'Endian_AviMainHeader' declared void
4. avidemux_core/ADM_coreUtils/include/ADM_coreUtils.h:30: error: 'MainAVIHeader' was not declared in this scope
5. avidemux_core/ADM_coreUtils/include/ADM_coreUtils.h:30: error: 'm' was not declared in this scope
6. avidemux2-6/avidemux_core/ADM_coreUtils/include/ADM_coreUtils.h:32: error: variable or field 'Endian_AviStreamHeader' declared void
7. avidemux2-6/avidemux_core/ADM_coreUtils/include/ADM_coreUtils.h:32: error: 'AVIStreamHeader' was not declared in this scope
8. avidemux_core/ADM_coreUtils/include/ADM_coreUtils.h:32: error: 's' was not declared in this scope

1. commented intrin.h
2. pasted path to "avidemux2-6\avidemux_core\ADM_coreDemuxer\include\unix"
building is successful, plugin works correctly.

mean

The first errors might be because the mingw-gcc toolchain you are using is old
Usually we use the ones from mingw64 (32 ot 64 bits)

presler

"intrin.h" exists only in VS but when avidemux2-6/avidemux_core/ADM_core/include/ADM_assert.h is compilling, _WIN32 not guarantee that you use VS:
#ifdef _WIN32
   #include <intrin.h>
   #include <wchar.h>
#endif
mingw-gcc toolchain has "x86intrin.h", is it analogue to "intrin.h"?


presler

Where is "bridge" between plugin (for encoder) and encoder?
The last part of chain that I have found is in "ADM_coreVideoEncoderInternal.h" - "extern "C" ADM_videoEncoderDesc *getInfo (void)" or "static ADM_coreVideoEncoder * create (ADM_coreVideoFilter * head,bool globalHeader)". As I understand I should rewrite "virtual bool getNextFrame(...) = 0;".

mean

you have to derive the ADM_coreVideoEncoder class
have a look at the nullEncoder plugin to have the structure of the plugin

You ask nextFrame from the previous element  and output the result in  ADM_bistream *out