get the stream time at which this sample should start and finish.
| 3488 | |
| 3489 | // get the stream time at which this sample should start and finish. |
| 3490 | STDMETHODIMP |
| 3491 | CMediaSample::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 |
no outgoing calls
no test coverage detected