32 #include "audioOutputPortConfig.hpp"
33 #include "videoOutputPortConfig.hpp"
35 #include "videoDeviceConfig.hpp"
61 int Manager::IsInitialized = 0;
62 static std::mutex gManagerInitMutex;
97 void Manager::Initialize()
99 printf(
"Entering %s count %d with thread id %lu\n",__FUNCTION__,IsInitialized,pthread_self());
101 if (0 == IsInitialized) {
108 {std::lock_guard<std::mutex> lock(gManagerInitMutex);
109 AudioOutputPortConfig::getInstance().load();
110 VideoOutputPortConfig::getInstance().load();
111 VideoDeviceConfig::getInstance().load();
115 printf(
"Exiting %s with thread %lu\n",__FUNCTION__,pthread_self());
138 void Manager::DeInitialize()
140 printf(
"Entering %s count %d with thread id: %lu\n",__FUNCTION__,IsInitialized,pthread_self());
141 if(IsInitialized>0)IsInitialized--;
142 if (0 == IsInitialized) {
144 VideoDeviceConfig::getInstance().release();
145 VideoOutputPortConfig::getInstance().release();
146 AudioOutputPortConfig::getInstance().release();
148 {std::lock_guard<std::mutex> lock(gManagerInitMutex);
155 printf(
"Exiting %s with thread %lu\n",__FUNCTION__,pthread_self());