本文整理汇总了C++中TaskScheduler::doEventLoop方法的典型用法代码示例。如果您正苦于以下问题:C++ TaskScheduler::doEventLoop方法的具体用法?C++ TaskScheduler::doEventLoop怎么用?C++ TaskScheduler::doEventLoop使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TaskScheduler
的用法示例。
在下文中一共展示了TaskScheduler::doEventLoop方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: createRTSPServer
void RTSPManager::createRTSPServer(unsigned int id , unsigned int port , volatile char * watcher)
{
std::unique_lock<std::mutex> lock(_lock);
TaskScheduler* taskSchedular = BasicTaskScheduler::createNew();
BasicUsageEnvironment* usageEnvironment = BasicUsageEnvironment::createNew(*taskSchedular);
RTSPServer* rtspServer = RTSPServer::createNew(*usageEnvironment, port, NULL);
if(rtspServer == NULL)
{
logger::log(usageEnvironment->getResultMsg() , logger::logType::FAILURE);
*watcher = -1;
this->_done = true;
this->_condition.notify_all();
return;
}
H264LiveServerMediaSession *liveSubSession = H264LiveServerMediaSession::createNew(*usageEnvironment, true , id);
std::string streamName = "camera_" + std::to_string(id);
ServerMediaSession* sms = ServerMediaSession::createNew(*usageEnvironment, streamName.c_str(), streamName.c_str(), "Live H264 Stream");
sms->addSubsession(liveSubSession);
rtspServer->addServerMediaSession(sms);
char* url = rtspServer->rtspURL(sms);
logger::log(INFO_RTSP_URL(url) , logger::logType::PRIORITY);
delete[] url;
this->_done = true;
this->_condition.notify_all();
lock.unlock();
taskSchedular->doEventLoop(watcher);
return;
}