Avidemux Forum

Avidemux => Main version 2.6 => Topic started by: presler on August 15, 2012, 10:16:27 AM

Title: Who did make and test videoFilter plugin for 2.6 version?
Post by: presler on August 15, 2012, 10:16:27 AM
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.
Title: Re: Who did make and test videoFilter plugin for 2.6 version?
Post by: mean on August 19, 2012, 03:33:46 PM
On linux, i know that you can use netbeans or eclipse
What exactly is the error message you have ?
Title: Re: Who did make and test videoFilter plugin for 2.6 version?
Post by: mean on August 20, 2012, 05:43:05 AM
I've resynced the sample plugins, they were outdated
It should work fine now
Title: Re: Who did make and test videoFilter plugin for 2.6 version?
Post by: presler on August 20, 2012, 10:33:30 AM
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?
Title: Re: Who did make and test videoFilter plugin for 2.6 version?
Post by: presler on August 20, 2012, 10:36:28 AM
mean, do you have any instant messager in order to ask you something more fast?
Title: Re: Who did make and test videoFilter plugin for 2.6 version?
Post by: presler on August 20, 2012, 12:26:37 PM
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?
Title: Re: Who did make and test videoFilter plugin for 2.6 version?
Post by: mean on August 20, 2012, 03:12:49 PM
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
Title: Re: Who did make and test videoFilter plugin for 2.6 version?
Post by: presler on August 20, 2012, 06:03:00 PM
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.
Title: Re: Who did make and test videoFilter plugin for 2.6 version?
Post by: mean on August 20, 2012, 06:09:43 PM
the avidemux 8140_devel xxx is meant for mingw
I dont think it will work with VS
when starting cmake, specify a codeblocks project
Title: Re: Who did make and test videoFilter plugin for 2.6 version?
Post by: presler on August 21, 2012, 05:56:36 AM
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.
Title: Re: Who did make and test videoFilter plugin for 2.6 version?
Post by: mean on August 22, 2012, 05:46:44 AM
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)
Title: Re: Who did make and test videoFilter plugin for 2.6 version?
Post by: presler on August 22, 2012, 07:39:06 AM
"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"?
Title: Re: Who did make and test videoFilter plugin for 2.6 version?
Post by: mean on August 22, 2012, 08:18:26 AM
It is present in those toolchains

http://switch.dl.sourceforge.net/project/mingw-w64/Toolchains%20targetting%20Win64/
Title: Re: Who did make and test videoFilter plugin for 2.6 version?
Post by: presler on August 22, 2012, 09:16:29 AM
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;".
Title: Re: Who did make and test videoFilter plugin for 2.6 version?
Post by: mean on August 23, 2012, 05:57:39 AM
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

Title: Re: Who did make and test videoFilter plugin for 2.6 version?
Post by: presler on August 25, 2012, 04:50:56 PM
In r8154 videoFilter sample again doesn't work (added
#include "ADM_coreVideoFilter.h
in ADM_vidLogo.cpp). It is built but avidemux is broken when trying to add compiled dll. Updated gcc up to 4.7.0 and cmake up to 2.8.9.
Title: Re: Who did make and test videoFilter plugin for 2.6 version?
Post by: mean on August 25, 2012, 05:44:56 PM
Should be okay now
Title: Re: Who did make and test videoFilter plugin for 2.6 version?
Post by: presler on August 26, 2012, 04:43:13 AM
http://imageshack.us/photo/my-images/405/image000ts.png/ (http://imageshack.us/photo/my-images/405/image000ts.png/) on r8163 sources doesn't work.
Title: Re: Who did make and test videoFilter plugin for 2.6 version?
Post by: mean on August 26, 2012, 06:46:01 AM
Weird, it works on linux
Title: Re: Who did make and test videoFilter plugin for 2.6 version?
Post by: presler on August 26, 2012, 08:55:08 AM
May be it somehow will help: earlier output dll (which works correctly) was ~65 KB, but now only ~13 KB.
Title: Re: Who did make and test videoFilter plugin for 2.6 version?
Post by: presler on August 27, 2012, 06:51:37 AM
Went from gcc 4.7.0 to 4.4.0 (in Qt folder) - all is works.
Title: Re: Who did make and test videoFilter plugin for 2.6 version?
Post by: presler on August 27, 2012, 07:36:58 AM
What is aim of "DO_COMMON TRUE" variable?
Title: Re: Who did make and test videoFilter plugin for 2.6 version?
Post by: mean on August 27, 2012, 08:11:08 AM
It means "do build plugins that are not attached to a specific ui", which is our case