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

Method SetTime

common/baseclasses/amfilter.cpp:3520–3548  ·  view source on GitHub ↗

Set the stream time at which this sample should start and finish. NULL pointers means the time is reset

Source from the content-addressed store, hash-verified

3518// Set the stream time at which this sample should start and finish.
3519// NULL pointers means the time is reset
3520STDMETHODIMP
3521CMediaSample::SetTime(__in_opt REFERENCE_TIME *pTimeStart, __in_opt REFERENCE_TIME *pTimeEnd)
3522{
3523 if (pTimeStart == NULL)
3524 {
3525 ASSERT(pTimeEnd == NULL);
3526 m_dwFlags &= ~(Sample_TimeValid | Sample_StopValid);
3527 }
3528 else
3529 {
3530 if (pTimeEnd == NULL)
3531 {
3532 m_Start = *pTimeStart;
3533 m_dwFlags |= Sample_TimeValid;
3534 m_dwFlags &= ~Sample_StopValid;
3535 }
3536 else
3537 {
3538 ValidateReadPtr(pTimeStart, sizeof(REFERENCE_TIME));
3539 ValidateReadPtr(pTimeEnd, sizeof(REFERENCE_TIME));
3540 ASSERT(*pTimeEnd >= *pTimeStart);
3541
3542 m_Start = *pTimeStart;
3543 m_End = *pTimeEnd;
3544 m_dwFlags |= Sample_TimeValid | Sample_StopValid;
3545 }
3546 }
3547 return NOERROR;
3548}
3549
3550// get the media times (eg bytes) for this sample
3551STDMETHODIMP

Callers 5

CopyMethod · 0.45
QueueSampleMethod · 0.45
DeliverSampleMethod · 0.45
ProcessMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected