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

Method GetTime

common/baseclasses/amfilter.cpp:3490–3516  ·  view source on GitHub ↗

get the stream time at which this sample should start and finish.

Source from the content-addressed store, hash-verified

3488
3489// get the stream time at which this sample should start and finish.
3490STDMETHODIMP
3491CMediaSample::GetTime(__out REFERENCE_TIME *pTimeStart, // put time here
3492 __out REFERENCE_TIME *pTimeEnd)
3493{
3494 ValidateReadWritePtr(pTimeStart, sizeof(REFERENCE_TIME));
3495 ValidateReadWritePtr(pTimeEnd, sizeof(REFERENCE_TIME));
3496
3497 if (!(m_dwFlags & Sample_StopValid))
3498 {
3499 if (!(m_dwFlags & Sample_TimeValid))
3500 {
3501 return VFW_E_SAMPLE_TIME_NOT_SET;
3502 }
3503 else
3504 {
3505 *pTimeStart = m_Start;
3506
3507 // Make sure old stuff works
3508 *pTimeEnd = m_Start + 1;
3509 return VFW_S_NO_STOP_TIME;
3510 }
3511 }
3512
3513 *pTimeStart = m_Start;
3514 *pTimeEnd = m_End;
3515 return NOERROR;
3516}
3517
3518// Set the stream time at which this sample should start and finish.
3519// NULL pointers means the time is reset

Callers 2

StreamTimeMethod · 0.45
ReceiveMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected