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

Method QueueSample

common/baseclasses/pullpin.cpp:341–371  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

339}
340
341HRESULT
342CPullPin::QueueSample(__inout REFERENCE_TIME &tCurrent, REFERENCE_TIME tAlignStop, BOOL bDiscontinuity)
343{
344 IMediaSample *pSample;
345
346 HRESULT hr = m_pAlloc->GetBuffer(&pSample, NULL, NULL, 0);
347 if (FAILED(hr))
348 {
349 return hr;
350 }
351
352 LONGLONG tStopThis = tCurrent + (pSample->GetSize() * UNITS);
353 if (tStopThis > tAlignStop)
354 {
355 tStopThis = tAlignStop;
356 }
357 pSample->SetTime(&tCurrent, &tStopThis);
358 tCurrent = tStopThis;
359
360 pSample->SetDiscontinuity(bDiscontinuity);
361
362 hr = m_pReader->Request(pSample, 0);
363 if (FAILED(hr))
364 {
365 pSample->Release();
366
367 CleanupCancelled();
368 OnError(hr);
369 }
370 return hr;
371}
372
373HRESULT
374CPullPin::CollectAndDeliver(REFERENCE_TIME tStart, REFERENCE_TIME tStop)

Callers

nothing calls this directly

Calls 5

GetBufferMethod · 0.45
GetSizeMethod · 0.45
SetTimeMethod · 0.45
SetDiscontinuityMethod · 0.45
ReleaseMethod · 0.45

Tested by

no test coverage detected