1. h323ep.cxx 525行
// Special case, if we aborted the call then already will be unlocked
if (reason != H323Connection::EndedByCallerAbort /*chf*/ &&reason != H323Connection::EndedByConnectFail
&&reason != H323Connection::EndedByUnreachable
&&reason != H323Connection::EndedByNoEndPoint
&&reason != H323Connection::EndedByHostOffline
/*chf*/)
2. H323_RTPChannel::Transmit()
// video frames produce many packets per frame especially at
// higher resolutions and can easily overload the link if sent
// without delay
if (!isAudio) {
PThread::Sleep(1);
if (frame.GetMarker())
rtpTimestamp = nextTimestamp;
}
3. if (payloadSize == 0) {
/* rec_ok = codec->Write(NULL, 0, frame, rec_written);
rtpTimestamp += codecFrameRate;*/
PThread::Sleep(1);
} else {
silenceStartTick = PTimer::Tick().GetMilliSeconds();
4. h46018_h225.cxx
PNatMethod_H46019::ReadThread(PThread &, H323_INT)
while (1) //changed by chf
{
//added by chf begin
if (muxShutdown)
{
if (muxSockets.rtp) {
muxSockets.rtp->Close();
delete muxSockets.rtp;
muxSockets.rtp = NULL;
}
if (muxSockets.rtcp) {
muxSockets.rtcp->Close();
delete muxSockets.rtcp;
muxSockets.rtcp = NULL;
}
break;
}
//added by chf end
if (select == 0)
select = PIPSocket::Select(dataSocket,ctrlSocket);
void PNatMethod_H46019::UnregisterSocket(bool rtp, unsigned id)
{
if (rtp) {
std::map<unsigned,PUDPSocket*>::iterator it = rtpSocketMap.find(id);
if (it != rtpSocketMap.end())
rtpSocketMap.erase(it);
} else {
std::map<unsigned,PUDPSocket*>::iterator it = rtcpSocketMap.find(id);
if (it != rtcpSocketMap.end())
rtcpSocketMap.erase(it);
}
if (rtp && rtpSocketMap.size() == 0) {
muxShutdown = true;
#if 0 //commented by chf
if (muxSockets.rtp) {
muxSockets.rtp->Close();
delete muxSockets.rtp;
muxSockets.rtp = NULL;
}
if (muxSockets.rtcp) {
muxSockets.rtcp->Close();
delete muxSockets.rtcp;
muxSockets.rtcp = NULL;
}
#endif
EnableMultiplex(false);
}
}
5. ptlib pluginmgr.cxx
PStringArray PPluginManager::GetPluginDirs()
{
#if 0
PString env = ::getenv(ENV_PTLIB_PLUGIN_DIR);
#else
PString env = PString(".\\");
#endif
if (env.IsEmpty())
env = ::getenv(ENV_PWLIB_PLUGIN_DIR);
if (env.IsEmpty())
env = P_DEFAULT_PLUGIN_DIR + GetAdditionalPluginDirs();
// split into directories on correct seperator
PStringArray dirs = env.Tokenise(PATH_SEP, true);
#ifdef _WIN32_WCE
PVarString moduleName;
if (GetModuleFileName(GetModuleHandle(NULL), moduleName.GetPointer(1024), 1024) > 0) {
PFilePath modulePath = moduleName;
dirs.AppendString(modulePath.GetDirectory());
}
#endif // _WIN32
return dirs;
}