[Opalvoip-svn] SF.net SVN: opalvoip:[32250] ptlib/branches/v2_14
Brought to you by:
csoutheren,
rjongbloed
From: <rjo...@us...> - 2014-06-28 04:55:11
|
Revision: 32250 http://sourceforge.net/p/opalvoip/code/32250 Author: rjongbloed Date: 2014-06-28 04:55:01 +0000 (Sat, 28 Jun 2014) Log Message: ----------- Changes to fix use of factory classes with GNU compiler, preventing multiple registrations of worker classes when loading .so files that also includes the ptlib or opal .so files. Modified Paths: -------------- opal/branches/v3_14/include/h323/h323caps.h opal/branches/v3_14/include/opal/mediafmt.h opal/branches/v3_14/include/opal/pres_ent.h opal/branches/v3_14/src/codec/g7221mf.cxx opal/branches/v3_14/src/codec/g7222mf.cxx opal/branches/v3_14/src/codec/g722mf.cxx opal/branches/v3_14/src/codec/g7231mf.cxx opal/branches/v3_14/src/codec/g726mf.cxx opal/branches/v3_14/src/codec/g728mf.cxx opal/branches/v3_14/src/codec/g729mf.cxx opal/branches/v3_14/src/codec/gsm0610mf.cxx opal/branches/v3_14/src/codec/gsmamrmf.cxx opal/branches/v3_14/src/codec/h261mf.cxx opal/branches/v3_14/src/codec/h263mf.cxx opal/branches/v3_14/src/codec/h264mf.cxx opal/branches/v3_14/src/codec/iLBCmf.cxx opal/branches/v3_14/src/codec/mpeg4mf.cxx opal/branches/v3_14/src/codec/opalpluginmgr.cxx opal/branches/v3_14/src/codec/opalwavfile.cxx opal/branches/v3_14/src/ep/opalmixer.cxx opal/branches/v3_14/src/im/msrp.cxx opal/branches/v3_14/src/im/sipim.cxx opal/branches/v3_14/src/opal/mediasession.cxx opal/branches/v3_14/src/opal/transports.cxx opal/branches/v3_14/src/rtp/rtp_session.cxx opal/branches/v3_14/src/rtp/srtp_session.cxx opal/branches/v3_14/src/sip/handlers.cxx opal/branches/v3_14/src/sip/sippres.cxx opal/branches/v3_14/src/t38/t38proto.cxx ptlib/branches/v2_14/include/ptclib/pwavfile.h ptlib/branches/v2_14/include/ptclib/url.h ptlib/branches/v2_14/include/ptlib/pfactory.h ptlib/branches/v2_14/src/ptclib/httpclnt.cxx ptlib/branches/v2_14/src/ptclib/pvidfile.cxx ptlib/branches/v2_14/src/ptclib/pwavfile.cxx ptlib/branches/v2_14/src/ptclib/url.cxx ptlib/branches/v2_14/src/ptclib/vxml.cxx Modified: opal/branches/v3_14/include/h323/h323caps.h =================================================================== --- opal/branches/v3_14/include/h323/h323caps.h 2014-06-28 00:23:19 UTC (rev 32249) +++ opal/branches/v3_14/include/h323/h323caps.h 2014-06-28 04:55:01 UTC (rev 32250) @@ -2826,7 +2826,7 @@ */ typedef PFactory<H323Capability, std::string> H323CapabilityFactory; -#define H323_REGISTER_CAPABILITY(cls, capName) static H323CapabilityFactory::Worker<cls> cls##Factory(capName, true); \ +#define H323_REGISTER_CAPABILITY(cls, capName) PFACTORY_CREATE(H323CapabilityFactory, cls, capName, true) #endif // OPAL_H323 Modified: opal/branches/v3_14/include/opal/mediafmt.h =================================================================== --- opal/branches/v3_14/include/opal/mediafmt.h 2014-06-28 00:23:19 UTC (rev 32249) +++ opal/branches/v3_14/include/opal/mediafmt.h 2014-06-28 04:55:01 UTC (rev 32250) @@ -1368,6 +1368,9 @@ OpalMediaFormatInternal * info = NULL ) : OpalMediaFormat(info) { } OpalAudioFormat( + const char * fullName + ) : OpalMediaFormat(fullName) { } + OpalAudioFormat( const char * fullName, ///< Full name of media format RTP_DataFrame::PayloadTypes rtpPayloadType, ///< RTP payload type code const char * encodingName,///< RTP encoding name Modified: opal/branches/v3_14/include/opal/pres_ent.h =================================================================== --- opal/branches/v3_14/include/opal/pres_ent.h 2014-06-28 00:23:19 UTC (rev 32249) +++ opal/branches/v3_14/include/opal/pres_ent.h 2014-06-28 04:55:01 UTC (rev 32250) @@ -674,8 +674,7 @@ { \ public: virtual void Process(OpalPresentity & presentity) { dynamic_cast<entity &>(presentity).func(*this); } \ }; \ - static PFactory<OpalPresentityCommand>::Worker<entity##_##command> \ - s_##entity##_##command(PDefaultPFactoryKey(entity::Class())+typeid(command).name()) + PFACTORY_CREATE(PFactory<OpalPresentityCommand>, entity##_##command, PDefaultPFactoryKey(entity::Class())+typeid(command).name()) /** Command for subscribing to the status of another presentity. Modified: opal/branches/v3_14/src/codec/g7221mf.cxx =================================================================== --- opal/branches/v3_14/src/codec/g7221mf.cxx 2014-06-28 00:23:19 UTC (rev 32249) +++ opal/branches/v3_14/src/codec/g7221mf.cxx 2014-06-28 04:55:01 UTC (rev 32250) @@ -98,6 +98,7 @@ OID(type) \ const OpalAudioFormat & GetOpal##type() \ { \ + static OpalAudioFormat const plugin(type##_FormatName); if (plugin.IsValid()) return plugin; \ static OpalAudioFormat const format(new OpalG7221Format(type##_FormatName, type##_BIT_RATE, type##_SAMPLE_RATE)); \ CAPABILITY(type) \ return format; \ Modified: opal/branches/v3_14/src/codec/g7222mf.cxx =================================================================== --- opal/branches/v3_14/src/codec/g7222mf.cxx 2014-06-28 00:23:19 UTC (rev 32249) +++ opal/branches/v3_14/src/codec/g7222mf.cxx 2014-06-28 04:55:01 UTC (rev 32250) @@ -113,6 +113,10 @@ const OpalAudioFormat & GetOpalG7222() { + static OpalAudioFormat const plugin(G7222FormatName); + if (plugin.IsValid()) + return plugin; + static OpalAudioFormat const format(new OpalG7222Format); #if OPAL_H323 Modified: opal/branches/v3_14/src/codec/g722mf.cxx =================================================================== --- opal/branches/v3_14/src/codec/g722mf.cxx 2014-06-28 00:23:19 UTC (rev 32249) +++ opal/branches/v3_14/src/codec/g722mf.cxx 2014-06-28 04:55:01 UTC (rev 32250) @@ -65,13 +65,17 @@ const OpalAudioFormat & GetOpalG722() { - static const OpalAudioFormat G722_Format(OPAL_G722, RTP_DataFrame::G722, "G722", 8, 8, 50, 10, 256, 8000); + static OpalAudioFormat const plugin(OPAL_G722); + if (plugin.IsValid()) + return plugin; + static const OpalAudioFormat format(OPAL_G722, RTP_DataFrame::G722, "G722", 8, 8, 50, 10, 256, 8000); + #if OPAL_H323 - static H323CapabilityFactory::Worker<H323_G722Capability> G722_Factory(OPAL_G722, true); + static H323CapabilityFactory::Worker<H323_G722Capability> capability(OPAL_G722, true); #endif // OPAL_H323 - return G722_Format; + return format; } Modified: opal/branches/v3_14/src/codec/g7231mf.cxx =================================================================== --- opal/branches/v3_14/src/codec/g7231mf.cxx 2014-06-28 00:23:19 UTC (rev 32249) +++ opal/branches/v3_14/src/codec/g7231mf.cxx 2014-06-28 04:55:01 UTC (rev 32250) @@ -140,7 +140,7 @@ typedef H323_G7231Capability H323_G7231A_6k3_Capability; typedef H323_G7231Capability H323_G7231A_5k3_Capability; -#define CAPABILITY(type) static H323CapabilityFactory::Worker<H323_##type##_Capability> type##_Factory(OPAL_##type, true) +#define CAPABILITY(type) static H323CapabilityFactory::Worker<H323_##type##_Capability> capability(OPAL_##type, true) #else #define CAPABILITY(t) @@ -178,9 +178,10 @@ #define FORMAT(name, rate, annex) \ const OpalAudioFormat & GetOpal##name() \ { \ - static const OpalG7231Format name##_Format(OPAL_##name, rate, annex); \ + static OpalAudioFormat const plugin(OPAL_##name); if (plugin.IsValid()) return plugin; \ + static const OpalG7231Format format(OPAL_##name, rate, annex); \ CAPABILITY(name); \ - return name##_Format; \ + return format; \ } FORMAT(G7231_6k3, 6300, false); Modified: opal/branches/v3_14/src/codec/g726mf.cxx =================================================================== --- opal/branches/v3_14/src/codec/g726mf.cxx 2014-06-28 00:23:19 UTC (rev 32249) +++ opal/branches/v3_14/src/codec/g726mf.cxx 2014-06-28 04:55:01 UTC (rev 32250) @@ -65,6 +65,7 @@ static const char G726_##rate##K_EncodingName[] = "G726-" #rate; \ const OpalAudioFormat & GetOpalG726_##rate##K() \ { \ + static OpalAudioFormat const plugin(G726_##rate##K_FormatName); if (plugin.IsValid()) return plugin; \ static const OpalAudioFormat format(G726_##rate##K_FormatName, RTP_DataFrame::DynamicBase, \ G726_##rate##K_EncodingName, bits, 8, 240, 30, 256, 8000); \ CAPABILITY(rate); \ Modified: opal/branches/v3_14/src/codec/g728mf.cxx =================================================================== --- opal/branches/v3_14/src/codec/g728mf.cxx 2014-06-28 00:23:19 UTC (rev 32249) +++ opal/branches/v3_14/src/codec/g728mf.cxx 2014-06-28 04:55:01 UTC (rev 32250) @@ -66,6 +66,10 @@ const OpalAudioFormat & GetOpalG728() { + static OpalAudioFormat const plugin(OPAL_G728); + if (plugin.IsValid()) + return plugin; + static const OpalAudioFormat G728_Format(OPAL_G728, RTP_DataFrame::G728, "G728", 5, 20, 100, 10, 256, 8000); #if OPAL_H323 Modified: opal/branches/v3_14/src/codec/g729mf.cxx =================================================================== --- opal/branches/v3_14/src/codec/g729mf.cxx 2014-06-28 00:23:19 UTC (rev 32249) +++ opal/branches/v3_14/src/codec/g729mf.cxx 2014-06-28 04:55:01 UTC (rev 32250) @@ -87,7 +87,7 @@ } }; -#define CAPABILITY(type) static H323CapabilityFactory::Worker<H323_G729CapabilityTemplate<type> > type##_Factory(G729Name[type], true) +#define CAPABILITY(type) static H323CapabilityFactory::Worker<H323_G729CapabilityTemplate<type> > capability(G729Name[type], true) #else #define CAPABILITY(t) @@ -124,9 +124,10 @@ #define FORMAT(name) \ const OpalAudioFormat & GetOpal##name() \ { \ - static const OpalG729Format name##_Format(G729Name[name]); \ + static OpalAudioFormat const plugin(G729Name[name]); if (plugin.IsValid()) return plugin; \ + static const OpalG729Format format(G729Name[name]); \ CAPABILITY(name); \ - return name##_Format; \ + return format; \ } FORMAT(G729 ); Modified: opal/branches/v3_14/src/codec/gsm0610mf.cxx =================================================================== --- opal/branches/v3_14/src/codec/gsm0610mf.cxx 2014-06-28 00:23:19 UTC (rev 32249) +++ opal/branches/v3_14/src/codec/gsm0610mf.cxx 2014-06-28 04:55:01 UTC (rev 32250) @@ -92,13 +92,17 @@ const OpalAudioFormat & GetOpalGSM0610() { - static const OpalAudioFormat GSM0610(OPAL_GSM0610, RTP_DataFrame::GSM, "GSM", 33, 160, 7, 4, 7, 8000); + static OpalAudioFormat const plugin(OPAL_GSM0610); + if (plugin.IsValid()) + return plugin; + static const OpalAudioFormat format(OPAL_GSM0610, RTP_DataFrame::GSM, "GSM", 33, 160, 7, 4, 7, 8000); + #if OPAL_H323 - static H323CapabilityFactory::Worker<H323_GSM0610Capability> GSM0610_Factory(OPAL_GSM0610, true); + static H323CapabilityFactory::Worker<H323_GSM0610Capability> capability(OPAL_GSM0610, true); #endif // OPAL_H323 - return GSM0610; + return format; } Modified: opal/branches/v3_14/src/codec/gsmamrmf.cxx =================================================================== --- opal/branches/v3_14/src/codec/gsmamrmf.cxx 2014-06-28 00:23:19 UTC (rev 32249) +++ opal/branches/v3_14/src/codec/gsmamrmf.cxx 2014-06-28 04:55:01 UTC (rev 32250) @@ -81,15 +81,19 @@ const OpalAudioFormat & GetOpalGSMAMR() { - static OpalAudioFormat const GSMAMR_Format(new OpalGSMAMRFormat); + static OpalAudioFormat const plugin(OPAL_GSMAMR); + if (plugin.IsValid()) + return plugin; + static OpalAudioFormat const format(new OpalGSMAMRFormat); + #if OPAL_H323 static H323CapabilityFactory::Worker< H323GenericAudioCapabilityTemplate<GSM_AMR_Identifier, GetOpalGSMAMR> > capability(OPAL_GSMAMR, true); #endif // OPAL_H323 - return GSMAMR_Format; + return format; } Modified: opal/branches/v3_14/src/codec/h261mf.cxx =================================================================== --- opal/branches/v3_14/src/codec/h261mf.cxx 2014-06-28 00:23:19 UTC (rev 32249) +++ opal/branches/v3_14/src/codec/h261mf.cxx 2014-06-28 04:55:01 UTC (rev 32250) @@ -110,6 +110,10 @@ const OpalVideoFormat & GetOpalH261() { + static OpalVideoFormat const plugin(H261FormatName); + if (plugin.IsValid()) + return plugin; + static OpalVideoFormat const format(new OpalH261Format()); #if OPAL_H323 Modified: opal/branches/v3_14/src/codec/h263mf.cxx =================================================================== --- opal/branches/v3_14/src/codec/h263mf.cxx 2014-06-28 00:23:19 UTC (rev 32249) +++ opal/branches/v3_14/src/codec/h263mf.cxx 2014-06-28 04:55:01 UTC (rev 32250) @@ -195,6 +195,10 @@ const OpalVideoFormat & GetOpalH263() { + static OpalVideoFormat const plugin(H263FormatName); + if (plugin.IsValid()) + return plugin; + static OpalVideoFormat const format(new OpalH263Format(H263FormatName, H263EncodingName)); #if OPAL_H323 @@ -207,6 +211,10 @@ const OpalVideoFormat & GetOpalH263plus() { + static OpalVideoFormat const plugin(H263plusFormatName); + if (plugin.IsValid()) + return plugin; + static OpalVideoFormat const format(new OpalH263Format(H263plusFormatName, H263plusEncodingName)); #if OPAL_H323 Modified: opal/branches/v3_14/src/codec/h264mf.cxx =================================================================== --- opal/branches/v3_14/src/codec/h264mf.cxx 2014-06-28 00:23:19 UTC (rev 32249) +++ opal/branches/v3_14/src/codec/h264mf.cxx 2014-06-28 04:55:01 UTC (rev 32250) @@ -193,6 +193,10 @@ const OpalVideoFormat & GetOpalH264_MODE1() { + static OpalVideoFormat const plugin(H264_Mode1_FormatName); + if (plugin.IsValid()) + return plugin; + static OpalVideoFormat const format(new OpalH264Format(H264_Mode1_FormatName, OpalH264Format::NonInterleaved)); #if OPAL_H323 Modified: opal/branches/v3_14/src/codec/iLBCmf.cxx =================================================================== --- opal/branches/v3_14/src/codec/iLBCmf.cxx 2014-06-28 00:23:19 UTC (rev 32249) +++ opal/branches/v3_14/src/codec/iLBCmf.cxx 2014-06-28 04:55:01 UTC (rev 32250) @@ -116,6 +116,10 @@ const OpalAudioFormat & GetOpaliLBC() { + static OpalAudioFormat const plugin(OPAL_iLBC); + if (plugin.IsValid()) + return plugin; + static OpalAudioFormat const iLBC_Format(new OpaliLBCFormat); #if OPAL_H323 Modified: opal/branches/v3_14/src/codec/mpeg4mf.cxx =================================================================== --- opal/branches/v3_14/src/codec/mpeg4mf.cxx 2014-06-28 00:23:19 UTC (rev 32249) +++ opal/branches/v3_14/src/codec/mpeg4mf.cxx 2014-06-28 04:55:01 UTC (rev 32250) @@ -109,6 +109,10 @@ const OpalVideoFormat & GetOpalMPEG4() { + static OpalVideoFormat const plugin(MPEG4FormatName); + if (plugin.IsValid()) + return plugin; + static OpalVideoFormat const format(new OpalMPEG4Format()); #if OPAL_H323 Modified: opal/branches/v3_14/src/codec/opalpluginmgr.cxx =================================================================== --- opal/branches/v3_14/src/codec/opalpluginmgr.cxx 2014-06-28 00:23:19 UTC (rev 32249) +++ opal/branches/v3_14/src/codec/opalpluginmgr.cxx 2014-06-28 04:55:01 UTC (rev 32250) @@ -3034,7 +3034,7 @@ PluginCodec_GetCodecFunction Get_GetCodecFn() \ { return &Opal_StaticCodec_##name##_GetCodecs; } \ }; \ -static H323StaticPluginCodecFactory::Worker<H323StaticPluginCodec_##name > static##name##CodecFactory( #name ); \ +PFACTORY_CREATE(H323StaticPluginCodecFactory, H323StaticPluginCodec_##name, #name ) #ifdef H323_EMBEDDED_GSM Modified: opal/branches/v3_14/src/codec/opalwavfile.cxx =================================================================== --- opal/branches/v3_14/src/codec/opalwavfile.cxx 2014-06-28 00:23:19 UTC (rev 32249) +++ opal/branches/v3_14/src/codec/opalwavfile.cxx 2014-06-28 04:55:01 UTC (rev 32250) @@ -178,7 +178,7 @@ PFACTORY_CREATE(PWAVFileConverterFactory, PWAVFileConverterULaw, PWAVFile::fmt_uLaw, false); -PWAVFileConverterFactory::Worker<PWAVFileConverterALaw> ALawConverter(PWAVFile::fmt_ALaw); +PFACTORY_CREATE(PWAVFileConverterFactory, PWAVFileConverterALaw, PWAVFile::fmt_ALaw); /////////////////////////////////////////////////////////////////////// Modified: opal/branches/v3_14/src/ep/opalmixer.cxx =================================================================== --- opal/branches/v3_14/src/ep/opalmixer.cxx 2014-06-28 00:23:19 UTC (rev 32249) +++ opal/branches/v3_14/src/ep/opalmixer.cxx 2014-06-28 04:55:01 UTC (rev 32250) @@ -1666,7 +1666,7 @@ } }; -static SIPEventPackageFactory::Worker<SIPConferenceEventPackageHandler> conferenceEventPackageHandler(SIPSubscribe::Conference); +PFACTORY_CREATE(SIPEventPackageFactory, SIPConferenceEventPackageHandler, SIPSubscribe::Conference); #endif // OPAL_SIP Modified: opal/branches/v3_14/src/im/msrp.cxx =================================================================== --- opal/branches/v3_14/src/im/msrp.cxx 2014-06-28 00:23:19 UTC (rev 32249) +++ opal/branches/v3_14/src/im/msrp.cxx 2014-06-28 04:55:01 UTC (rev 32250) @@ -56,7 +56,7 @@ const PCaselessString & OpalMSRPMediaSession::TCP_MSRP() { static const PConstCaselessString s("TCP/MSRP"); return s; } -static OpalMediaSessionFactory::Worker<OpalMSRPMediaSession> tcp_msrp_session(OpalMSRPMediaSession::TCP_MSRP()); +PFACTORY_CREATE(OpalMediaSessionFactory, OpalMSRPMediaSession, OpalMSRPMediaSession::TCP_MSRP()); class OpalMSRPMediaDefinition : public OpalMediaTypeDefinition { @@ -87,7 +87,7 @@ class IM##title##OpalMSRPEncoding : public OpalMSRPEncoding \ { \ }; \ -static PFactory<OpalMSRPEncoding>::Worker<IM##title##OpalMSRPEncoding> worker_##IM##title##OpalMSRPEncoding(encoding, true); \ +PFACTORY_CREATE(PFactory<OpalMSRPEncoding>, IM##title##OpalMSRPEncoding, encoding, true) DECLARE_MSRP_ENCODING(Text, "text/plain"); Modified: opal/branches/v3_14/src/im/sipim.cxx =================================================================== --- opal/branches/v3_14/src/im/sipim.cxx 2014-06-28 00:23:19 UTC (rev 32249) +++ opal/branches/v3_14/src/im/sipim.cxx 2014-06-28 04:55:01 UTC (rev 32250) @@ -234,7 +234,7 @@ //////////////////////////////////////////////////////////////////////////////////////////// -static PFactory<OpalIMContext>::Worker<OpalSIPIMContext> static_OpalSIPContext("sip"); +PFACTORY_CREATE(PFactory<OpalIMContext>, OpalSIPIMContext, "sip"); OpalSIPIMContext::OpalSIPIMContext() { Modified: opal/branches/v3_14/src/opal/mediasession.cxx =================================================================== --- opal/branches/v3_14/src/opal/mediasession.cxx 2014-06-28 00:23:19 UTC (rev 32249) +++ opal/branches/v3_14/src/opal/mediasession.cxx 2014-06-28 04:55:01 UTC (rev 32250) @@ -408,7 +408,7 @@ ////////////////////////////////////////////////////////////////////////////// -static OpalMediaSessionFactory::Worker<OpalDummySession> dummy_session(OpalDummySession::SessionType()); +PFACTORY_CREATE(OpalMediaSessionFactory, OpalDummySession, OpalDummySession::SessionType()); OpalDummySession::OpalDummySession(const Init & init, const OpalTransportAddressArray & transports) : OpalMediaSession(init) Modified: opal/branches/v3_14/src/opal/transports.cxx =================================================================== --- opal/branches/v3_14/src/opal/transports.cxx 2014-06-28 00:23:19 UTC (rev 32249) +++ opal/branches/v3_14/src/opal/transports.cxx 2014-06-28 04:55:01 UTC (rev 32250) @@ -52,27 +52,27 @@ const PCaselessString & OpalTransportAddress::IpPrefix() { static PConstCaselessString s("ip$" ); return s; } // For backward compatibility with OpenH323 -static PFactory<OpalInternalTransport>::Worker<OpalInternalTCPTransport> opalInternalTCPTransportFactory(OpalTransportAddress::TcpPrefix(), true); +PFACTORY_CREATE(PFactory<OpalInternalTransport>, OpalInternalTCPTransport, OpalTransportAddress::IpPrefix(), true); const PCaselessString & OpalTransportAddress::UdpPrefix() { static PConstCaselessString s("udp$"); return s; } -static PFactory<OpalInternalTransport>::Worker<OpalInternalTCPTransport> opalInternalIPTransportFactory (OpalTransportAddress::IpPrefix (), true); +PFACTORY_CREATE(PFactory<OpalInternalTransport>, OpalInternalUDPTransport, OpalTransportAddress::UdpPrefix(), true); const PCaselessString & OpalTransportAddress::TcpPrefix() { static PConstCaselessString s("tcp$"); return s; } -static PFactory<OpalInternalTransport>::Worker<OpalInternalUDPTransport> opalInternalUDPTransportFactory(OpalTransportAddress::UdpPrefix(), true); +PFACTORY_SYNONYM(PFactory<OpalInternalTransport>, OpalInternalTCPTransport, TCP, OpalTransportAddress::TcpPrefix ()); #if OPAL_PTLIB_SSL #include <ptclib/pssl.h> const PCaselessString & OpalTransportAddress::TlsPrefix() { static PConstCaselessString s("tls$"); return s; } -static PFactory<OpalInternalTransport>::Worker<OpalInternalTLSTransport> opalInternalTLSTransportFactory(OpalTransportAddress::TlsPrefix(), true); +PFACTORY_CREATE(PFactory<OpalInternalTransport>, OpalInternalTLSTransport, OpalTransportAddress::TlsPrefix(), true); #if OPAL_PTLIB_HTTP const PCaselessString & OpalTransportAddress::WsPrefix() { static PConstCaselessString s("ws$"); return s; } -static PFactory<OpalInternalTransport>::Worker<OpalInternalWSTransport> opalInternalWSTransportFactory(OpalTransportAddress::WsPrefix(), true); +PFACTORY_CREATE(PFactory<OpalInternalTransport>, OpalInternalWSTransport, OpalTransportAddress::WsPrefix(), true); const PCaselessString & OpalTransportAddress::WssPrefix() { static PConstCaselessString s("wss$"); return s; } -static PFactory<OpalInternalTransport>::Worker<OpalInternalWSSTransport> opalInternalWSSTransportFactory(OpalTransportAddress::WssPrefix(), true); +PFACTORY_CREATE(PFactory<OpalInternalTransport>, OpalInternalWSSTransport, OpalTransportAddress::WssPrefix(), true); #endif // OPAL_PTLIB_HTTP Modified: opal/branches/v3_14/src/rtp/rtp_session.cxx =================================================================== --- opal/branches/v3_14/src/rtp/rtp_session.cxx 2014-06-28 00:23:19 UTC (rev 32249) +++ opal/branches/v3_14/src/rtp/rtp_session.cxx 2014-06-28 04:55:01 UTC (rev 32250) @@ -121,7 +121,7 @@ const PCaselessString & OpalRTPSession::RTP_AVPF() { static const PConstCaselessString s("RTP/AVPF"); return s; } PFACTORY_CREATE(OpalMediaSessionFactory, OpalRTPSession, OpalRTPSession::RTP_AVP()); -static bool RegisteredAVPF = OpalMediaSessionFactory::RegisterAs(OpalRTPSession::RTP_AVPF(), OpalRTPSession::RTP_AVP()); +PFACTORY_SYNONYM(OpalMediaSessionFactory, OpalRTPSession, AVPF, OpalRTPSession::RTP_AVPF()); #if P_CONFIG_FILE static PTimeInterval GetDefaultOutOfOrderWaitTime() Modified: opal/branches/v3_14/src/rtp/srtp_session.cxx =================================================================== --- opal/branches/v3_14/src/rtp/srtp_session.cxx 2014-06-28 00:23:19 UTC (rev 32249) +++ opal/branches/v3_14/src/rtp/srtp_session.cxx 2014-06-28 04:55:01 UTC (rev 32250) @@ -247,7 +247,7 @@ const PCaselessString & OpalSRTPSession::RTP_SAVPF() { static const PConstCaselessString s("RTP/SAVPF"); return s; } PFACTORY_CREATE(OpalMediaSessionFactory, OpalSRTPSession, OpalSRTPSession::RTP_SAVP()); -static bool RegisteredSAVPF = OpalMediaSessionFactory::RegisterAs(OpalSRTPSession::RTP_SAVPF(), OpalSRTPSession::RTP_SAVP()); +PFACTORY_SYNONYM(OpalMediaSessionFactory, OpalSRTPSession, SAVPF, OpalSRTPSession::RTP_SAVPF()); static PConstCaselessString AES_CM_128_HMAC_SHA1_80("AES_CM_128_HMAC_SHA1_80"); Modified: opal/branches/v3_14/src/sip/handlers.cxx =================================================================== --- opal/branches/v3_14/src/sip/handlers.cxx 2014-06-28 00:23:19 UTC (rev 32249) +++ opal/branches/v3_14/src/sip/handlers.cxx 2014-06-28 04:55:01 UTC (rev 32250) @@ -1295,7 +1295,7 @@ } }; -static SIPEventPackageFactory::Worker<SIPMwiEventPackageHandler> mwiEventPackageHandler(SIPSubscribe::MessageSummary); +PFACTORY_CREATE(SIPEventPackageFactory, SIPMwiEventPackageHandler, SIPSubscribe::MessageSummary); /////////////////////////////////////////////////////////////////////////////// @@ -1338,7 +1338,7 @@ } }; -static SIPEventPackageFactory::Worker<SIPPresenceEventPackageHandler> presenceEventPackageHandler(SIPSubscribe::Presence); +PFACTORY_CREATE(SIPEventPackageFactory, SIPPresenceEventPackageHandler, SIPSubscribe::Presence); #endif // OPAL_SIP_PRESENCE @@ -1503,7 +1503,7 @@ std::map<PString, SIPDialogNotification> m_activeDialogs; }; -static SIPEventPackageFactory::Worker<SIPDialogEventPackageHandler> dialogEventPackageHandler(SIPSubscribe::Dialog); +PFACTORY_CREATE(SIPEventPackageFactory, SIPDialogEventPackageHandler, SIPSubscribe::Dialog); /////////////////////////////////////////////////////////////////////////////// @@ -1576,7 +1576,7 @@ } }; -static SIPEventPackageFactory::Worker<SIPRegEventPackageHandler> regEventPackageHandler(SIPSubscribe::Reg); +PFACTORY_CREATE(SIPEventPackageFactory, SIPRegEventPackageHandler, SIPSubscribe::Reg); /////////////////////////////////////////////////////////////////////////////// Modified: opal/branches/v3_14/src/sip/sippres.cxx =================================================================== --- opal/branches/v3_14/src/sip/sippres.cxx 2014-06-28 00:23:19 UTC (rev 32249) +++ opal/branches/v3_14/src/sip/sippres.cxx 2014-06-28 04:55:01 UTC (rev 32250) @@ -58,7 +58,7 @@ PFACTORY_CREATE(PFactory<OpalPresentity>, SIP_Presentity, "sip", false); -static bool Synonym_for_pres_URL = PFactory<OpalPresentity>::RegisterAs("pres", "sip"); +PFACTORY_SYNONYM(PFactory<OpalPresentity>, SIP_Presentity, pres, "pres"); const PCaselessString & SIP_Presentity::PIDFEntityKey() { static const PConstCaselessString s("PIDF-Entity"); return s; } const PCaselessString & SIP_Presentity::SubProtocolKey() { static const PConstCaselessString s("Sub-Protocol"); return s; } Modified: opal/branches/v3_14/src/t38/t38proto.cxx =================================================================== --- opal/branches/v3_14/src/t38/t38proto.cxx 2014-06-28 00:23:19 UTC (rev 32249) +++ opal/branches/v3_14/src/t38/t38proto.cxx 2014-06-28 04:55:01 UTC (rev 32250) @@ -54,7 +54,7 @@ static const char TIFF_File_FormatName[] = OPAL_FAX_TIFF_FILE; const PCaselessString & OpalFaxSession::UDPTL() { return OpalFaxMediaDefinition::UDPTL(); } -static OpalMediaSessionFactory::Worker<OpalFaxSession> udptl_session(OpalFaxMediaDefinition::UDPTL()); +PFACTORY_CREATE(OpalMediaSessionFactory, OpalFaxSession, OpalFaxMediaDefinition::UDPTL()); ///////////////////////////////////////////////////////////////////////////// Modified: ptlib/branches/v2_14/include/ptclib/pwavfile.h =================================================================== --- ptlib/branches/v2_14/include/ptclib/pwavfile.h 2014-06-28 00:23:19 UTC (rev 32249) +++ ptlib/branches/v2_14/include/ptclib/pwavfile.h 2014-06-28 04:55:01 UTC (rev 32250) @@ -138,6 +138,11 @@ typedef PFactory<PWAVFileFormat, PCaselessString> PWAVFileFormatByFormatFactory; typedef PFactory<PWAVFileFormat, unsigned> PWAVFileFormatByIDFactory; +#define PCREATE_WAVFILE_FORMAT_FACTORY(cls, id, name) \ + PFACTORY_CREATE(PWAVFileFormatByIDFactory, cls, id); \ + typedef cls cls##_ByFormat; \ + PFACTORY_CREATE(PWAVFileFormatByFormatFactory, cls##_ByFormat, name) + PFACTORY_LOAD(PWAVFileFormatPCM); Modified: ptlib/branches/v2_14/include/ptclib/url.h =================================================================== --- ptlib/branches/v2_14/include/ptclib/url.h 2014-06-28 00:23:19 UTC (rev 32249) +++ ptlib/branches/v2_14/include/ptclib/url.h 2014-06-28 04:55:01 UTC (rev 32250) @@ -532,7 +532,7 @@ defaultPort) \ { } \ }; \ - static PURLSchemeFactory::Worker<PURLLegacyScheme_##schemeName> schemeName##Factory(#schemeName, true); \ + PFACTORY_CREATE(PURLSchemeFactory, PURLLegacyScheme_##schemeName, #schemeName, true) Modified: ptlib/branches/v2_14/include/ptlib/pfactory.h =================================================================== --- ptlib/branches/v2_14/include/ptlib/pfactory.h 2014-06-28 00:23:19 UTC (rev 32249) +++ ptlib/branches/v2_14/include/ptlib/pfactory.h 2014-06-28 04:55:01 UTC (rev 32250) @@ -221,6 +221,8 @@ Types m_type; Abstract_T * m_singletonInstance; + + friend class PFactoryTemplate; }; virtual void DestroySingletons() @@ -241,8 +243,9 @@ bool InternalRegister(const Key_T & key, WorkerBase * worker) { PWaitAndSignal mutex(m_mutex); - if (m_workers.find(key) != m_workers.end()) - return false; + typename WorkerMap_T::iterator it = m_workers.find(key); + if (it != m_workers.end()) + return it->second == worker; PMEMORY_IGNORE_ALLOCATIONS_FOR_SCOPE; m_workers[key] = PAssertNULL(worker); @@ -252,8 +255,9 @@ bool InternalRegister(const Key_T & key, Abstract_T * instance, bool autoDeleteInstance) { PWaitAndSignal mutex(m_mutex); - if (m_workers.find(key) != m_workers.end()) - return false; + typename WorkerMap_T::iterator it = m_workers.find(key); + if (it != m_workers.end()) + return it->second->m_singletonInstance == instance; PMEMORY_IGNORE_ALLOCATIONS_FOR_SCOPE; m_workers[key] = PNEW WorkerBase(instance, autoDeleteInstance); @@ -263,10 +267,15 @@ PBoolean InternalRegisterAs(const Key_T & newKey, const Key_T & oldKey) { PWaitAndSignal mutex(m_mutex); - if (m_workers.find(oldKey) == m_workers.end()) + typename WorkerMap_T::iterator itOld = m_workers.find(oldKey); + if (itOld == m_workers.end()) return false; - m_workers[newKey] = m_workers[oldKey]; + typename WorkerMap_T::iterator itNew = m_workers.find(newKey); + if (itNew != m_workers.end()) + return itNew->second == itOld->second; + + m_workers[newKey] = PAssertNULL(itOld->second); return true; } @@ -389,11 +398,14 @@ { PAssert(Register(key, this), "Factory Worker already registered"); } + ~Worker() { Unregister(m_key); } + const Key_T & GetKey() const { return m_key; } + protected: virtual Abstract_T * Create(Param_T) const { @@ -438,13 +450,23 @@ template <class ConcreteClass> class Worker : protected WorkerBase_T { + private: + Key_T m_key; public: Worker(const Key_T & key, bool singleton = false) : WorkerBase_T(singleton) + , m_key(key) { PAssert(Register(key, this), "Factory Worker already registered"); } + ~Worker() + { + Unregister(m_key); + } + + const Key_T & GetKey() const { return m_key; } + protected: virtual Abstract_T * Create(Param_T param) const { @@ -487,6 +509,11 @@ factory::Worker<ConcreteClass> ConcreteClass##_instance(__VA_ARGS__); \ } +#define PFACTORY_SYNONYM(factory, ConcreteClass, name, key) \ + namespace PFactoryLoader { \ + bool ConcreteClass##name##_synonym = factory::RegisterAs(key, ConcreteClass##_instance.GetKey()); \ + } + #define PFACTORY_CREATE_SINGLETON(factory, ConcreteClass) \ PFACTORY_CREATE(factory, ConcreteClass, typeid(ConcreteClass).name(), true) Modified: ptlib/branches/v2_14/src/ptclib/httpclnt.cxx =================================================================== --- ptlib/branches/v2_14/src/ptclib/httpclnt.cxx 2014-06-28 00:23:19 UTC (rev 32249) +++ ptlib/branches/v2_14/src/ptclib/httpclnt.cxx 2014-06-28 04:55:01 UTC (rev 32250) @@ -44,8 +44,9 @@ //////////////////////////////////////////////////////////////////////////////////// -static PHTTPClientAuthenticationFactory::Worker<PHTTPClientBasicAuthentication> httpClient_basicAuthenticator("basic"); -static PHTTPClientAuthenticationFactory::Worker<PHTTPClientDigestAuthentication> httpClient_md5Authenticator("digest"); +PFACTORY_CREATE(PHTTPClientAuthenticationFactory, PHTTPClientBasicAuthentication, "basic"); +PFACTORY_CREATE(PHTTPClientAuthenticationFactory, PHTTPClientDigestAuthentication, "digest"); + static const char * const AlgorithmNames[PHTTPClientDigestAuthentication::NumAlgorithms] = { "MD5" }; @@ -1137,7 +1138,7 @@ PFACTORY_CREATE(PURLLoaderFactory, PURL_HttpLoader, "http", true); #if P_SSL -static PURLLoaderFactory::Worker<PURL_HttpLoader> httpsLoader("https", true); +PFACTORY_SYNONYM(PURLLoaderFactory, PURL_HttpLoader, https, "https"); #endif #endif // P_HTTP Modified: ptlib/branches/v2_14/src/ptclib/pvidfile.cxx =================================================================== --- ptlib/branches/v2_14/src/ptclib/pvidfile.cxx 2014-06-28 00:23:19 UTC (rev 32249) +++ ptlib/branches/v2_14/src/ptclib/pvidfile.cxx 2014-06-28 04:55:01 UTC (rev 32250) @@ -175,8 +175,8 @@ /////////////////////////////////////////////////////////////////////////////// -PFACTORY_CREATE(PVideoFileFactory, PYUVFile, ".yuv", false); -static PVideoFileFactory::Worker<PYUVFile> y4mFileFactory(".y4m"); +PFACTORY_CREATE(PVideoFileFactory, PYUVFile, ".yuv"); +PFACTORY_SYNONYM(PVideoFileFactory, PYUVFile, y4m, ".y4m"); PYUVFile::PYUVFile() @@ -317,8 +317,8 @@ #include <ptlib/vconvert.h> -PFACTORY_CREATE(PVideoFileFactory, PJPEGFile, ".jpg", false); -static PVideoFileFactory::Worker<PJPEGFile> jpegFileFactory(".jpeg"); +PFACTORY_CREATE(PVideoFileFactory, PJPEGFile, ".jpg"); +PFACTORY_SYNONYM(PVideoFileFactory, PJPEGFile, jpeg, ".jpeg"); PJPEGFile::PJPEGFile() { Modified: ptlib/branches/v2_14/src/ptclib/pwavfile.cxx =================================================================== --- ptlib/branches/v2_14/src/ptclib/pwavfile.cxx 2014-06-28 00:23:19 UTC (rev 32249) +++ ptlib/branches/v2_14/src/ptclib/pwavfile.cxx 2014-06-28 04:55:01 UTC (rev 32250) @@ -798,8 +798,7 @@ PBoolean Write(PWAVFile & file, const void * buf, PINDEX & len); }; -PFACTORY_CREATE(PWAVFileFormatByIDFactory, PWAVFileFormatPCM, PWAVFile::fmt_PCM, false); -PWAVFileFormatByFormatFactory::Worker<PWAVFileFormatPCM> pcmFormatWAVFormat("PCM-16"); +PCREATE_WAVFILE_FORMAT_FACTORY(PWAVFileFormatPCM, PWAVFile::fmt_PCM, "PCM-16"); void PWAVFileFormatPCM::CreateHeader(PWAV::FMTChunk & wavFmtChunk, PBYTEArray & /*extendedHeader*/) @@ -1024,8 +1023,7 @@ { return GetFormatString() & "Vivo"; } }; -PWAVFileFormatByIDFactory::Worker<PWAVFileFormatG7231_vivo> g7231VivoWAVFormat(PWAVFile::fmt_VivoG7231); -PWAVFileFormatByFormatFactory::Worker<PWAVFileFormatG7231_vivo> g7231FormatWAVFormat("G.723.1"); +PCREATE_WAVFILE_FORMAT_FACTORY(PWAVFileFormatG7231_vivo, PWAVFile::fmt_VivoG7231, "G.723.1"); class PWAVFileFormatG7231_ms : public PWAVFileFormatG7231 { @@ -1039,7 +1037,7 @@ { return GetFormatString() & "MS"; } }; -PWAVFileFormatByIDFactory::Worker<PWAVFileFormatG7231_ms> g7231MSWAVFormat(PWAVFile::fmt_MSG7231); +PFACTORY_CREATE(PWAVFileFormatByIDFactory, PWAVFileFormatG7231_ms, PWAVFile::fmt_MSG7231); ////////////////////////////////////////////////////////////////// @@ -1121,7 +1119,7 @@ return false; } -PWAVFileConverterFactory::Worker<PWAVFileConverterPCM> pcmConverter(PWAVFile::fmt_PCM); +PFACTORY_CREATE(PWAVFileConverterFactory, PWAVFileConverterPCM, PWAVFile::fmt_PCM); #endif // P_WAVFILE Modified: ptlib/branches/v2_14/src/ptclib/url.cxx =================================================================== --- ptlib/branches/v2_14/src/ptclib/url.cxx 2014-06-28 00:23:19 UTC (rev 32249) +++ ptlib/branches/v2_14/src/ptclib/url.cxx 2014-06-28 04:55:01 UTC (rev 32250) @@ -1067,7 +1067,7 @@ } }; -static PURLSchemeFactory::Worker<PURL_CalltoScheme> calltoScheme("callto", true); +PFACTORY_CREATE(PURLSchemeFactory, PURL_CalltoScheme, "callto", true); /////////////////////////////////////////////////////////////////////////////// @@ -1123,7 +1123,7 @@ } }; -static PURLSchemeFactory::Worker<PURL_TelScheme> telScheme("tel", true); +PFACTORY_CREATE(PURLSchemeFactory,PURL_TelScheme, "tel", true); /////////////////////////////////////////////////////////////////////////////// @@ -1192,7 +1192,7 @@ } }; -static PURLSchemeFactory::Worker<PURL_DataScheme> dataScheme("data", true); +PFACTORY_CREATE(PURLSchemeFactory, PURL_DataScheme, "data", true); /////////////////////////////////////////////////////////////////////////////// Modified: ptlib/branches/v2_14/src/ptclib/vxml.cxx =================================================================== --- ptlib/branches/v2_14/src/ptclib/vxml.cxx 2014-06-28 00:23:19 UTC (rev 32249) +++ ptlib/branches/v2_14/src/ptclib/vxml.cxx 2014-06-28 04:55:01 UTC (rev 32250) @@ -90,14 +90,14 @@ }; -static PVXMLNodeFactory::Worker<PVXMLNodeHandler> BlockNodeHandler("Block", true); +PFACTORY_CREATE(PVXMLNodeFactory, PVXMLNodeHandler, "Block", true); #define TRAVERSE_NODE(name) \ class PVXMLTraverse##name : public PVXMLNodeHandler { \ virtual bool Start(PVXMLSession & session, PXMLElement & element) const \ { return session.Traverse##name(element); } \ }; \ - static PVXMLNodeFactory::Worker<PVXMLTraverse##name> name##NodeHandler(#name, true) + PFACTORY_CREATE(PVXMLNodeFactory, PVXMLTraverse##name, #name, true) TRAVERSE_NODE(Audio); TRAVERSE_NODE(Break); @@ -120,7 +120,7 @@ virtual bool Finish(PVXMLSession & session, PXMLElement & element) const \ { return session.Traversed##name(element); } \ }; \ - static PVXMLNodeFactory::Worker<PVXMLTraverse##name> name##NodeHandler(#name, true) + PFACTORY_CREATE(PVXMLNodeFactory, PVXMLTraverse##name, #name, true) TRAVERSE_NODE2(Menu); TRAVERSE_NODE2(Form); @@ -142,11 +142,11 @@ return true; } }; -static PVXMLNodeFactory::Worker<PVXMLTraverseEvent> FilledNodeHandler("Filled", true); -static PVXMLNodeFactory::Worker<PVXMLTraverseEvent> NoInputNodeHandler("NoInput", true); -static PVXMLNodeFactory::Worker<PVXMLTraverseEvent> NoMatchNodeHandler("NoMatch", true); -static PVXMLNodeFactory::Worker<PVXMLTraverseEvent> ErrorNodeHandler("Error", true); -static PVXMLNodeFactory::Worker<PVXMLTraverseEvent> CatchNodeHandler("Catch", true); +PFACTORY_CREATE(PVXMLNodeFactory, PVXMLTraverseEvent, "Filled", true); +PFACTORY_SYNONYM(PVXMLNodeFactory, PVXMLTraverseEvent, NoInput, "NoInput"); +PFACTORY_SYNONYM(PVXMLNodeFactory, PVXMLTraverseEvent, NoMatch, "NoMatch"); +PFACTORY_SYNONYM(PVXMLNodeFactory, PVXMLTraverseEvent, Error, "Error"); +PFACTORY_SYNONYM(PVXMLNodeFactory, PVXMLTraverseEvent, Catch, "Catch"); #if PTRACING class PVXMLTraverseLog : public PVXMLNodeHandler { @@ -159,7 +159,7 @@ return true; } }; -static PVXMLNodeFactory::Worker<PVXMLTraverseLog> LogNodeHandler("Log", true); +PFACTORY_CREATE(PVXMLNodeFactory, PVXMLTraverseLog, "Log", true); #endif @@ -318,7 +318,7 @@ } -PFactory<PVXMLPlayable>::Worker<PVXMLPlayableFile> vxmlPlayableFilenameFactory("File"); +PFACTORY_CREATE(PFactory<PVXMLPlayable>, PVXMLPlayableFile, "File"); /////////////////////////////////////////////////////////////// @@ -388,7 +388,7 @@ } } -PFactory<PVXMLPlayable>::Worker<PVXMLPlayableFileList> vxmlPlayableFilenameListFactory("FileList"); +PFACTORY_CREATE(PFactory<PVXMLPlayable>, PVXMLPlayableFileList, "FileList"); /////////////////////////////////////////////////////////////// @@ -444,7 +444,7 @@ PVXMLPlayable::OnStop(); } -PFactory<PVXMLPlayable>::Worker<PVXMLPlayableCommand> vxmlPlayableCommandFactory("Command"); +PFACTORY_CREATE(PFactory<PVXMLPlayable>, PVXMLPlayableCommand, "Command"); #endif @@ -483,7 +483,7 @@ return PAssert(memfile != NULL, PLogicError) && PAssertOS(memfile->SetPosition(0)); } -PFactory<PVXMLPlayable>::Worker<PVXMLPlayableData> vxmlPlayableDataFactory("PCM Data"); +PFACTORY_CREATE(PFactory<PVXMLPlayable>, PVXMLPlayableData, "PCM Data"); /////////////////////////////////////////////////////////////// @@ -506,7 +506,7 @@ return PVXMLPlayable::Open(chan, toneSpec, delay, repeat, autoDelete); } -PFactory<PVXMLPlayable>::Worker<PVXMLPlayableTone> vxmlPlayableToneFactory("Tone"); +PFACTORY_CREATE(PFactory<PVXMLPlayable>, PVXMLPlayableTone, "Tone"); #endif // P_DTMF @@ -543,7 +543,7 @@ return m_vxmlChannel->SetReadChannel(client, false); } -PFactory<PVXMLPlayable>::Worker<PVXMLPlayableURL> vxmlPlayableURLFactory("URL"); +PFACTORY_CREATE(PFactory<PVXMLPlayable>, PVXMLPlayableURL, "URL"); /////////////////////////////////////////////////////////////// @@ -2822,7 +2822,7 @@ /////////////////////////////////////////////////////////////// -PFactory<PVXMLChannel>::Worker<PVXMLChannelPCM> pcmVXMLChannelFactory(VXML_PCM16); +PFACTORY_CREATE(PFactory<PVXMLChannel>, PVXMLChannelPCM, VXML_PCM16); PVXMLChannelPCM::PVXMLChannelPCM() : PVXMLChannel(10, 160) @@ -2894,7 +2894,7 @@ /////////////////////////////////////////////////////////////// -PFactory<PVXMLChannel>::Worker<PVXMLChannelG7231> g7231VXMLChannelFactory(VXML_G7231); +PFACTORY_CREATE(PFactory<PVXMLChannel>, PVXMLChannelG7231, VXML_G7231); PVXMLChannelG7231::PVXMLChannelG7231() : PVXMLChannel(30, 0) @@ -2951,7 +2951,7 @@ /////////////////////////////////////////////////////////////// -PFactory<PVXMLChannel>::Worker<PVXMLChannelG729> g729VXMLChannelFactory(VXML_G729); +PFACTORY_CREATE(PFactory<PVXMLChannel>, PVXMLChannelG729, VXML_G729); PVXMLChannelG729::PVXMLChannelG729() : PVXMLChannel(10, 0) @@ -3371,7 +3371,7 @@ return true; } -PFactory<PTextToSpeech>::Worker<TextToSpeech_Sample> sampleTTSFactory("sampler", false); +PFACTORY_CREATE(PFactory<PTextToSpeech>, TextToSpeech_Sample, "sampler", false); #endif // P_VXML This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |