MCPcopy Create free account
hub / github.com/Nevcairiel/LAVFilters / StreamTime

Method StreamTime

common/baseclasses/amfilter.cpp:250–273  ·  view source on GitHub ↗

return the current stream time - samples with start timestamps of this time or before should be rendered by now

Source from the content-addressed store, hash-verified

248// return the current stream time - samples with start timestamps of this
249// time or before should be rendered by now
250HRESULT
251CBaseMediaFilter::StreamTime(CRefTime &rtStream)
252{
253 // Caller must lock for synchronization
254 // We can't grab the filter lock because we want to be able to call
255 // this from worker threads without deadlocking
256
257 if (m_pClock == NULL)
258 {
259 return VFW_E_NO_CLOCK;
260 }
261
262 // get the current reference time
263 HRESULT hr = m_pClock->GetTime((REFERENCE_TIME *)&rtStream);
264 if (FAILED(hr))
265 {
266 return hr;
267 }
268
269 // subtract the stream offset to get stream time
270 rtStream -= m_tStart;
271
272 return S_OK;
273}
274
275//=====================================================================
276//=====================================================================

Callers

nothing calls this directly

Calls 1

GetTimeMethod · 0.45

Tested by

no test coverage detected