gecko/content/media/omx
Robert O'Callahan 25cffcb402 Bug 880601. Emulate a form of keyframe skipping by allowing MediaOmxReader::DecodeVideoFrame to decode more than one video frame if video decoding is falling behind. r=cpearce
If we don't support this in any way, then we get into trouble when there is
plenty of compressed data buffered but for some reason video decoding falls
behind (maybe there was a short period where the video data wasn't available).
Audio playback continues normally, but MediaOmxReader keeps making one call
to ReadAudio and one to ReadVideo, and if each call to ReadAudio decodes at
least as much as the calls to ReadVideo, video decoding can never catch up
to the current audio playback position. So video never plays. And when the
video decoding point gets far enough away from the audio decoding point,
horrible things start to happen, such as video and audio reading completely
different parts of the media cache and interfering with the caching mechanism
(which assumes audio and video reads are close together).

This patch approximates keyframe skipping, and is basically just a way for
MediaOmxReader::DecodeVideoFrame to decode more than one frame at a time
if we need video decoding to catch up.

To prevent pathological situations, we cap both the maximum number of frames
decoded per DecodeVideoFrame and the amount of time we spend in the method
(excluding the time for the last frame).

--HG--
extra : rebase_source : cba95c537fe97df5b696581be8233b6e9cffb70b
2013-06-15 23:51:56 +12:00
..
mediaresourcemanager Bug 871485 - Share hw codec between applications/tasks. r=mwu, r=doublec, r=roc 2013-06-10 08:22:05 -04:00
Makefile.in Bug 871485 - Share hw codec between applications/tasks. r=mwu, r=doublec, r=roc 2013-06-10 08:22:05 -04:00
MediaOmxDecoder.cpp Bug 812756 - Set AmpleVideoFrames to the minimum to win a race when shutting down OMX.qcom.video.decoder.mpeg4 decoder r=doublec 2012-11-28 15:34:53 +13:00
MediaOmxDecoder.h Bug 811381 - Remove ns prefix from media code. r=roc 2012-11-14 11:46:40 -08:00
MediaOmxReader.cpp Bug 880601. Emulate a form of keyframe skipping by allowing MediaOmxReader::DecodeVideoFrame to decode more than one video frame if video decoding is falling behind. r=cpearce 2013-06-15 23:51:56 +12:00
MediaOmxReader.h Bug 871485 - Share hw codec between applications/tasks. r=mwu, r=doublec, r=roc 2013-06-10 08:22:05 -04:00
MediaOmxStateMachine.h Bug 863441 - Increment GetAmpleVideoFrames() to 3. r=doublec 2013-05-07 10:53:42 -04:00
moz.build Bug 871485 - Share hw codec between applications/tasks. r=mwu, r=doublec, r=roc 2013-06-10 08:22:05 -04:00
MPAPI.h Bug 877461. Part 2: Initialize VideoFrame members to 0. r=doublec 2013-06-06 10:48:25 +12:00
OMXCodecProxy.cpp Bug 871485 - Share hw codec between applications/tasks. r=mwu, r=doublec, r=roc 2013-06-10 08:22:05 -04:00
OMXCodecProxy.h Bug 871485 - Share hw codec between applications/tasks. r=mwu, r=doublec, r=roc 2013-06-10 08:22:05 -04:00
OmxDecoder.cpp Bug 871485 - Share hw codec between applications/tasks. r=mwu, r=doublec, r=roc 2013-06-10 08:22:05 -04:00
OmxDecoder.h Bug 871485 - Share hw codec between applications/tasks. r=mwu, r=doublec, r=roc 2013-06-10 08:22:05 -04:00