MCPcopy Create free account
hub / github.com/Aleksoid1978/VideoRenderer / SyncFrameToStreamTime

Method SyncFrameToStreamTime

Source/VideoProcessor.cpp:258–271  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

256}
257
258void CVideoProcessor::SyncFrameToStreamTime(const REFERENCE_TIME frameStartTime)
259{
260 if (m_pFilter->m_filterState == State_Running && frameStartTime != INVALID_TIME) {
261 if (SUCCEEDED(m_pFilter->StreamTime(m_streamTime)) && frameStartTime > m_streamTime) {
262 const auto sleepTime = (frameStartTime - m_streamTime) / 10000LL - m_uHalfRefreshPeriodMs;
263 if (sleepTime > 0 && sleepTime < 42) {
264 // We are waiting for Preset to display the frame at the required display refresh interval.
265 // This is relevant for displays with high frame rates (for example 144 Hz).
266 // But no longer than 41 ms to avoid problems with the DVD-Video menu.
267 Sleep(static_cast<DWORD>(sleepTime));
268 }
269 }
270 }
271}
272
273bool CVideoProcessor::CheckDoviMetadata(const MediaSideDataDOVIMetadata* pDOVIMetadata, const uint8_t maxReshapeMethon)
274{

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected