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

Method DeliverSample

common/baseclasses/pullpin.cpp:398–431  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

396}
397
398HRESULT
399CPullPin::DeliverSample(IMediaSample *pSample, REFERENCE_TIME tStart, REFERENCE_TIME tStop)
400{
401 // fix up sample if past actual stop (for sector alignment)
402 REFERENCE_TIME t1, t2;
403 if (S_OK == pSample->GetTime(&t1, &t2))
404 {
405 if (t2 > tStop)
406 {
407 t2 = tStop;
408 }
409
410 // adjust times to be relative to (aligned) start time
411 t1 -= tStart;
412 t2 -= tStart;
413 HRESULT hr = pSample->SetTime(&t1, &t2);
414 if (FAILED(hr))
415 {
416 return hr;
417 }
418 }
419
420#ifdef DXMPERF
421 {
422 AM_MEDIA_TYPE *pmt = NULL;
423 pSample->GetMediaType(&pmt);
424 PERFLOG_RECEIVE(L"CPullPin", m_pReader, this, pSample, pmt);
425 }
426#endif
427
428 HRESULT hr = Receive(pSample);
429 pSample->Release();
430 return hr;
431}
432
433void CPullPin::Process(void)
434{

Callers

nothing calls this directly

Calls 4

GetTimeMethod · 0.45
SetTimeMethod · 0.45
GetMediaTypeMethod · 0.45
ReleaseMethod · 0.45

Tested by

no test coverage detected