本文整理汇总了C++中QTSSModule::SetupModule方法的典型用法代码示例。如果您正苦于以下问题:C++ QTSSModule::SetupModule方法的具体用法?C++ QTSSModule::SetupModule怎么用?C++ QTSSModule::SetupModule使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类QTSSModule
的用法示例。
在下文中一共展示了QTSSModule::SetupModule方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: Initialize
Bool16 QTSServer::Initialize(XMLPrefsParser* inPrefsSource, PrefsSource* inMessagesSource, UInt16 inPortOverride, Bool16 createListeners)
{
fServerState = qtssFatalErrorState;
sPrefsSource = inPrefsSource;
sMessagesSource = inMessagesSource;
this->InitCallbacks();
fMediaSource = NULL;
//
// DICTIONARY INITIALIZATION
QTSSModule::Initialize();
QTSServerPrefs::Initialize();
QTSSMessages::Initialize();
QTSSFile::Initialize();
//
// STUB SERVER INITIALIZATION
//
// Construct stub versions of the prefs and messages dictionaries. We need
// both of these to initialize the server, but they have to be stubs because
// their QTSSDictionaryMaps will presumably be modified when modules get loaded.
fSrvrPrefs = new QTSServerPrefs(inPrefsSource, false); // First time, don't write changes to the prefs file
fSrvrMessages = new QTSSMessages(inMessagesSource);
QTSSModuleUtils::Initialize(fSrvrMessages, this, QTSServerInterface::GetErrorLogStream());
SetAssertLogger(this->GetErrorLogStream());// the error log stream is our assert logger
// Load ERROR LOG module only. This is good in case there is a startup error.
QTSSModule* theLoggingModule = new QTSSModule("QTSSErrorLogModule");
(void)theLoggingModule->SetupModule(&sCallbacks, &QTSSErrorLogModule_Main);
(void)AddModule(theLoggingModule);
this->BuildModuleRoleArrays();
//
// STARTUP TIME - record it
fStartupTime_UnixMilli = OS::Milliseconds();
fGMTOffset = OS::GetGMTOffset();
if ( fNumListeners == 0 )
{
if (createListeners)
QTSSModuleUtils::LogError(qtssWarningVerbosity, qtssMsgNoPortsSucceeded, 0);
}
fServerState = qtssStartingUpState;
return true;
}
示例2: QTSSModule
void QTSServer::LoadCompiledInModules()
{
#ifndef DSS_DYNAMIC_MODULES_ONLY
// MODULE DEVELOPERS SHOULD ADD THE FOLLOWING THREE LINES OF CODE TO THIS
// FUNCTION IF THEIR MODULE IS BEING COMPILED INTO THE SERVER.
//
// QTSSModule* myModule = new QTSSModule("__MODULE_NAME__");
// (void)myModule->Initialize(&sCallbacks, &__MODULE_MAIN_ROUTINE__);
// (void)AddModule(myModule);
//
// The following modules are all compiled into the server.
#endif //DSS_DYNAMIC_MODULES_ONLY
QTSSModule* theCMSModule = new QTSSModule("EasyCMSModule");
(void)theCMSModule->SetupModule(&sCallbacks, &EasyCMSModule_Main);
(void)AddModule(theCMSModule);
QTSSModule* theCameraModule = new QTSSModule("EasyCameraModule");
(void)theCameraModule->SetupModule(&sCallbacks, &EasyCameraModule_Main);
(void)AddModule(theCameraModule);
}