зеркало из https://github.com/mozilla/gecko-dev.git
2be26b6b7c
We have code in the MDSM to toggle on high resolution timers on Windows when we start/stop playing because the VideoSink relies on being awoken by timers to update the set of current frames in the compositor's queue, and on Windows 7 we end up dropping frames due to the timer lag without this. We assert in the MDSM's destructor that we've turned off high res timers (as they cause needless battery drain, so we only want them on when we need them), and the new test_mediarecorder_principals is hitting that assert on Windows. I think we're missing turning them off when we create a new VideoSink for outputting to the MSG. That affects the value returned by MediaDecoderStateMachine->mVideoSink->IsPlaying(), which is what we use to decide whether we should enable high resolution timers. We track whether we've enabled high res timers in MDSM::mHiResTimersRequested, and that gets out of sync with IsPlaying() when we re-create the MediaSink. Rather than trying to handle all the permutations of places where we need to turn off high resolution timers in the MDSM, we're better to move the code to toggle high res timers into the VideoSink, as that's actually where we need to be sure that we have high resolution timers enabled anyway. It's the VideoSink after all that is relying on timers for frame update, not the MDSM. Also remove the media.hi-res-timers.enabled pref, as we haven't needed it. MozReview-Commit-ID: 9dNxcYxPDZH --HG-- extra : rebase_source : 6e403d59bb5f1dd0241fe8298a823ba08b1670fb |
||
---|---|---|
.. | ||
AudioSink.cpp | ||
AudioSink.h | ||
AudioSinkWrapper.cpp | ||
AudioSinkWrapper.h | ||
DecodedStream.cpp | ||
DecodedStream.h | ||
MediaSink.h | ||
OutputStreamManager.cpp | ||
OutputStreamManager.h | ||
VideoSink.cpp | ||
VideoSink.h | ||
moz.build |