void CConferenceInfo::doAudioProc(void) { bool bGetTempMember = false; CLockMap<CConferenceMember*, CMemberData::pointer> toSendMembers; CLockList<CMemberData::pointer> memberTemps; while (!m_killed) { CMemberData::pointer memberData; if (bGetTempMember) { if (!memberTemps.front(memberData, true)) { bGetTempMember = false; continue; } }else if (!m_datasa.front(memberData, true)) { #ifdef WIN32 Sleep(20); #else usleep(20000); #endif continue; } CConferenceMember * pDataConferenceMember = (CConferenceMember*)memberData->getRtpParam(); if (pDataConferenceMember->getClosed() || pDataConferenceMember->getAudioHandler() == 0 || pDataConferenceMember->getVideoHandler() == 0) { continue; } BOOST_ASSERT (pDataConferenceMember->getAudioHandler().get() == memberData->getDoRtpHandler().get()); if (toSendMembers.exist(pDataConferenceMember)) { if (toSendMembers.size() < (unsigned int)countAudioMember()) { setToMemberFront(memberTemps, memberData); bGetTempMember = false; continue; } sendAudioFrame(toSendMembers); toSendMembers.clear(false); } toSendMembers.insert(pDataConferenceMember, memberData); bGetTempMember = !memberTemps.empty(); } }
virtual void onRtpKilledEvent(DoRtpHandler::pointer pDoRtpHandler, void * rtpParam) { while (true) { if (m_listMgr.empty()) break; #ifdef WIN32 Sleep(100); #else usleep(100000); #endif } }