Ah, OK, that bit of information is useful. Put:

#define P_FORCE_STATIC_PLUGIN 1

at the top of the file.

Robert Jongbloed
OPAL/OpenH323/PTLib Architect and Co-founder.
Commercial support at http://www.voxlucida.com.au

On 16/07/2014 5:43 PM, Alexander Sbitnev wrote:
Our problem is with "PCREATE_VIDOUTPUT_PLUGIN(NULLOutput)" macros.
If it used once, now problem. If it used twice problem appears.

Example of code:
PCREATE_VIDOUTPUT_PLUGIN(Screen);
PVideoOutputDevice_Screen::PVideoOutputDevice_Screen() {
 
}
 
PVideoOutputDevice_Screen::~PVideoOutputDevice_Screen() {
 
}
 
PStringArray PVideoOutputDevice_Screen::GetDeviceNames() const {
 return GetOutputDeviceNames();
}
 
PStringArray PVideoOutputDevice_Screen::GetOutputDeviceNames() {
 return "Screen";
}
 
PCREATE_VIDOUTPUT_PLUGIN(Preview);
PVideoOutputDevice_Preview::PVideoOutputDevice_Preview() {
 
}
 
PVideoOutputDevice_Preview::~PVideoOutputDevice_Preview() {
 
}
 
PStringArray PVideoOutputDevice_Preview::GetDeviceNames() const {
 return GetOutputDeviceNames();
}
 
PStringArray PVideoOutputDevice_Preview::GetOutputDeviceNames() {
 return "Preview";
}

During processing redefinition errors arise from macros generated code:
videodevice.cpp: In function ‘void PWLibPlugin_TriggerRegister(PPluginManager*)’:
videodevice.cpp:103: error: redefinition of ‘void PWLibPlugin_TriggerRegister(PPluginManager*)’
videodevice.cpp:86: error: ‘void PWLibPlugin_TriggerRegister(PPluginManager*)’ previously defined here
videodevice.cpp: In function ‘unsigned int PWLibPlugin_GetAPIVersion()’:
videodevice.cpp:103: error: redefinition of ‘unsigned int PWLibPlugin_GetAPIVersion()’
videodevice.cpp:86: error: ‘unsigned int PWLibPlugin_GetAPIVersion()’ previously defined here

No such problems in case if only one OutputDevice created.


On 07/16/2014 11:19 AM, Robert Jongbloed wrote:
No time right now to go into details, it should not have changed that much, and there are a number of examples in the system. The simplest would be PVideoOutputDevice_NULLOutput in vfakeio.cxx. Really not that hard.

The only real trick is if your stuff is in a static library, then you need something like:

PPLUGIN_STATIC_LOAD(NULLOutput, PVideoOutputDevice);

somewhere in a header or in the application or the linker doesn't know the plug in is needed and it doesn't load at run time.

Robert Jongbloed
OPAL/OpenH323/PTLib Architect and Co-founder.
Commercial support at http://www.voxlucida.com.au


On 16/07/2014 12:13 AM, Alexander Sbitnev wrote:
   Is there a way to create two of new videodevices/plugins with new 
Lacaille?




------------------------------------------------------------------------------
Want fast and easy access to all the code in your enterprise? Index and
search up to 200,000 lines of code with a free copy of Black Duck
Code Sight - the same software that powers the world's largest code
search on Ohloh, the Black Duck Open Hub! Try it now.
http://p.sf.net/sfu/bds


_______________________________________________
Opalvoip-devel mailing list
Opalvoip-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/opalvoip-devel



------------------------------------------------------------------------------
Want fast and easy access to all the code in your enterprise? Index and
search up to 200,000 lines of code with a free copy of Black Duck
Code Sight - the same software that powers the world's largest code
search on Ohloh, the Black Duck Open Hub! Try it now.
http://p.sf.net/sfu/bds


_______________________________________________
Opalvoip-devel mailing list
Opalvoip-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/opalvoip-devel