Пример #1
0
// Return a pointer to the media task, creating it if necessary
MpMediaTask* MpMediaTask::getMediaTask(int maxFlowGraph)
{
   OsLock singletonLock(sLock);

   if (spInstance == NULL)
   {
       spInstance = new MpMediaTask(maxFlowGraph);
       spInstance->start();
   }

   return spInstance;
}
Пример #2
0
SipRegistrar*
SipRegistrar::getInstance(OsConfigDb* configDb)
{
    OsLock singletonLock(sLock);

    if ( spInstance == NULL )
    {
       Os::Logger::instance().log(FAC_SIP, PRI_DEBUG, "SipRegistrar::getInstance(%p)",
                     configDb);

       spInstance = new SipRegistrar(configDb);
    }

    return spInstance;
}