Set the stream time at which this sample should start and finish. NULL pointers means the time is reset
| 3518 | // Set the stream time at which this sample should start and finish. |
| 3519 | // NULL pointers means the time is reset |
| 3520 | STDMETHODIMP |
| 3521 | CMediaSample::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 |
| 3551 | STDMETHODIMP |
no outgoing calls
no test coverage detected