| 396 | } |
| 397 | |
| 398 | HRESULT |
| 399 | CPullPin::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 | |
| 433 | void CPullPin::Process(void) |
| 434 | { |
nothing calls this directly
no test coverage detected