/** * * Method Name: CSenderReport() - Constructor * * * Inputs: ssrc_t ulSSRC - The Identifier for this source * ISetReceiverStatistics *piSetStatistics * - Interface for setting receiver stats * * Outputs: None * * Returns: None * * Description: Performs routine CSenderReport object initialization. * * Usage Notes: A CSenderReport object shall be created by the CRTCPRender * with this constructor. The Sender shall be responsible for * maintain sender statistics related to an outbound RTP * connection. The constructor shall be pass the SSRC and an * optional pointer to the Set Statistics interface of the * receiver report. * */ CSenderReport::CSenderReport(ssrc_t ulSSRC, ISetReceiverStatistics *piSetStatistics) : CBaseClass(CBASECLASS_CALL_ARGS("CSenderReport", __LINE__)), CRTCPHeader(ulSSRC, etSenderReport), // Base class construction m_ulPacketCount(0), m_ulOctetCount(0), m_bMediaSent(FALSE), m_ulRTPTimestamp(0) , m_iTSCollectState(0) , m_iUSecAdjust(0) { // Store the Statistics interface as an attribute m_piSetReceiverStatistics = piSetStatistics; // Increment the interface's reference counter if(m_piSetReceiverStatistics) m_piSetReceiverStatistics->AddRef(ADD_RELEASE_CALL_ARGS(__LINE__)); // Initialize NTP Timestamps m_aulNTPTimestamp[0] = 0; m_aulNTPTimestamp[1] = 0; m_aulNTPStartTime[0] = 0; m_aulNTPStartTime[1] = 0; ResetStatistics(); }
void StatisticsWindow::Reset() { int answer = QMessageBox::warning( this, tr("Reset statistics"), tr("Are you sure?"), QMessageBox::Yes | QMessageBox::No, QMessageBox::No ); if( answer == QMessageBox::Yes ) { emit ResetStatistics(); } }
/** * * Method Name: SetSSRC * * * Inputs: unsigned long ulSSRC - Source ID * * Outputs: None * * Returns: void * * Description: Stores the Source Identifier associated with an RTP connection. * * Usage Notes: This is an override of the base class method defined in * CRTCPHeader. This method shall additionally reset the octet * and packet count accumulators as mandated by standard. * * * */ void CSenderReport::SetSSRC(unsigned long ulSSRC) { // An SSRC collision must have been detected for this to occur. // Let's reset our statistics. ResetStatistics(); // Let's delegate to the base class method to set the new SSRC ID CRTCPHeader::SetSSRC(ulSSRC); }
CCrackEngine::CCrackEngine() { ResetStatistics(); writeOutput = false; resumeSession = false; debug = false; keepPrecalcFiles = false; sSessionPathName = ""; sProgressPathName = ""; }
//------------------------------------------------------------------------------ void stDiskPageManager::Create(const char *fName, int pagesize, int userHeaderSize, int cacheNPages){ this->pageSize = pagesize; this->myStorage = new CStorage; myStorage->Create(fName, pageSize, userHeaderSize, cacheNPages); ResetStatistics(); // Instance cache with pageInstanceCache = new stPageInstanceCache(STDISKPAGEMANAGER_INSTANCECACHESIZE, new stPageAllocator(pageSize)); }//end stDiskPageManager::Create()
//------------------------------------------------------------------------------ void stDiskPageManager::Open(char *fname){ if (this->myStorage == NULL) this->myStorage = new CStorage; this->myStorage->Open(fname); this->pageSize = myStorage->GetPageSize(); ResetStatistics(); // Instance cache with pageInstanceCache = new stPageInstanceCache(STDISKPAGEMANAGER_INSTANCECACHESIZE, new stPageAllocator(pageSize)); }//end stDiskPageManager::Open()
/** * * Method Name: SetSSRC * * * Inputs: unsigned long ulSSRC - Source ID * * Outputs: None * * Returns: void * * Description: Stores the Source Identifier associated with an RTP connection. * * Usage Notes: This is an override of the base class method defined in * CRTCPHeader. This method shall additionally reset the octet * and packet count accumulators as mandated by standard. * * * */ void CSenderReport::SetSSRC(ssrc_t ulSSRC) { OsSysLog::add(FAC_MP, PRI_DEBUG, "CSenderReport::SetSSRC(0x%8X) ", ulSSRC); // An SSRC collision must have been detected for this to occur. // Let's reset our statistics. ResetStatistics(); // Let's delegate to the base class method to set the new SSRC ID CRTCPHeader::SetSSRC(ulSSRC); }
//----------------------------------------------------------------------- void RenderSystem::UpdateRenderTargets(float delta_time) { ResetStatistics(); RenderTargetMap::iterator i; // Render a frame during idle time (no messages are waiting) RenderTargetPriorityMap::iterator itarg, itargend; itargend = mPrioritisedRenderTargets.end(); for( itarg = mPrioritisedRenderTargets.begin(); itarg != itargend; ++itarg ) { if( itarg->second->isActive() ) { itarg->second->update(); } } }
bool ModuleBase::StartMainLoop(int32 nFrameInterval) { m_nFrameInterval = nFrameInterval; TimeManager& timer = TimeManager::Instance(); #if _WINDOWS #define PERFORMANCE_START LARGE_INTEGER t0; QueryPerformanceFrequency(&t0); #define PERFORMANCE_END LARGE_INTEGER t1; QueryPerformanceFrequency(&t1); #define PERFORMANCE_DELTA t1.QuadPart - t0.QuadPart; #endif #if DOG WatchDog& dog = WatchDog::Instance(); dog.Start(); #endif ResetStatistics(); int64 nLogicProcTime = 0; int64 nPacketProcTime = 0; int32 nSleepPiece = 1; while (!m_bExitLoop) { int32 nFrameTime = timer.FrameTime(); uint64 nStartTime = timer.CurTime(); uint64 nCurTime = nStartTime; uint64 nDeadLine = nStartTime + m_nFrameInterval; PERFORMANCE_START; Servers.Tick(nFrameTime); ProcessLogic(nFrameTime); PERFORMANCE_END; nLogicProcTime = PERFORMANCE_DELTA; } return true; }