Bug 1289668 - HTMLMediaElement uses video decoder's frame statistics - r=kamidphish

HTMLVideoElement can expose its thread-safe FrameStatistics object, so that
HTMLMediaElement can access more adequate data for its telemetry, without
having to use an intermediary (and potentially less accurate)
VideoPlaybackQuality object.

This will also help with accessing other/new FrameStatistics members later on.

MozReview-Commit-ID: AT7mEGy0zGr
This commit is contained in:
Gerald Squelart
2016-07-26 11:32:58 +10:00
parent d9701bc58b
commit 5073971142
3 changed files with 22 additions and 12 deletions

View File

@@ -228,6 +228,12 @@ HTMLVideoElement::NotifyOwnerDocumentActivityChangedInternal()
return pauseElement;
}
FrameStatistics*
HTMLVideoElement::GetFrameStatistics()
{
return mDecoder ? &(mDecoder->GetFrameStatistics()) : nullptr;
}
already_AddRefed<VideoPlaybackQuality>
HTMLVideoElement::GetVideoPlaybackQuality()
{