| 253 | // occur if the drawing thread is interrupted and switched to somewhere else. |
| 254 | |
| 255 | void CBaseVideoRenderer2::OnRenderEnd(IMediaSample *pMediaSample) |
| 256 | { |
| 257 | // The renderer time can vary erratically if we are interrupted so we do |
| 258 | // some smoothing to help get more sensible figures out but even that is |
| 259 | // not enough as figures can go 9,10,9,9,83,9 and we must disregard 83 |
| 260 | |
| 261 | int tr = (timeGetTime() - m_tRenderStart)*10000; // convert mSec->UNITS |
| 262 | if (tr < m_trRenderAvg*32 || tr < m_trRenderLast*32) { |
| 263 | // But in reality, the rendering time can cyclically increase and decrease by 25 times. For example : 5 125 6 127 5 126. |
| 264 | m_trRenderAvg = (tr + (AVGPERIOD-1)*m_trRenderAvg)/AVGPERIOD; |
| 265 | } |
| 266 | m_trRenderLast = tr; |
| 267 | ThrottleWait(); |
| 268 | } // OnRenderEnd |
| 269 | |
| 270 | |
| 271 | STDMETHODIMP CBaseVideoRenderer2::SetSink( IQualityControl * piqc) |
nothing calls this directly
no outgoing calls
no test coverage detected