Wed, 31 Dec 2014 06:09:35 +0100
Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.
michael@0 | 1 | /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ |
michael@0 | 2 | /* vim: set ts=8 sts=2 et sw=2 tw=80: */ |
michael@0 | 3 | /* This Source Code Form is subject to the terms of the Mozilla Public |
michael@0 | 4 | * License, v. 2.0. If a copy of the MPL was not distributed with this |
michael@0 | 5 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ |
michael@0 | 6 | |
michael@0 | 7 | #ifndef mozilla_dom_VideoPlaybackQuality_h_ |
michael@0 | 8 | #define mozilla_dom_VideoPlaybackQuality_h_ |
michael@0 | 9 | |
michael@0 | 10 | #include "mozilla/dom/HTMLMediaElement.h" |
michael@0 | 11 | #include "nsCycleCollectionParticipant.h" |
michael@0 | 12 | #include "nsDOMNavigationTiming.h" |
michael@0 | 13 | #include "nsWrapperCache.h" |
michael@0 | 14 | |
michael@0 | 15 | namespace mozilla { |
michael@0 | 16 | namespace dom { |
michael@0 | 17 | |
michael@0 | 18 | class VideoPlaybackQuality MOZ_FINAL : public nsWrapperCache |
michael@0 | 19 | { |
michael@0 | 20 | public: |
michael@0 | 21 | NS_INLINE_DECL_CYCLE_COLLECTING_NATIVE_REFCOUNTING(VideoPlaybackQuality) |
michael@0 | 22 | NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_NATIVE_CLASS(VideoPlaybackQuality) |
michael@0 | 23 | |
michael@0 | 24 | VideoPlaybackQuality(HTMLMediaElement* aElement, DOMHighResTimeStamp aCreationTime, |
michael@0 | 25 | uint64_t aTotalFrames, uint64_t aDroppedFrames, |
michael@0 | 26 | uint64_t aCorruptedFrames); |
michael@0 | 27 | |
michael@0 | 28 | HTMLMediaElement* GetParentObject() const; |
michael@0 | 29 | |
michael@0 | 30 | JSObject* WrapObject(JSContext* aCx) MOZ_OVERRIDE; |
michael@0 | 31 | |
michael@0 | 32 | DOMHighResTimeStamp CreationTime() const |
michael@0 | 33 | { |
michael@0 | 34 | return mCreationTime; |
michael@0 | 35 | } |
michael@0 | 36 | |
michael@0 | 37 | uint64_t TotalVideoFrames() |
michael@0 | 38 | { |
michael@0 | 39 | return mTotalFrames; |
michael@0 | 40 | } |
michael@0 | 41 | |
michael@0 | 42 | uint64_t DroppedVideoFrames() |
michael@0 | 43 | { |
michael@0 | 44 | return mDroppedFrames; |
michael@0 | 45 | } |
michael@0 | 46 | |
michael@0 | 47 | uint64_t CorruptedVideoFrames() |
michael@0 | 48 | { |
michael@0 | 49 | return mCorruptedFrames; |
michael@0 | 50 | } |
michael@0 | 51 | |
michael@0 | 52 | private: |
michael@0 | 53 | nsRefPtr<HTMLMediaElement> mElement; |
michael@0 | 54 | DOMHighResTimeStamp mCreationTime; |
michael@0 | 55 | uint64_t mTotalFrames; |
michael@0 | 56 | uint64_t mDroppedFrames; |
michael@0 | 57 | uint64_t mCorruptedFrames; |
michael@0 | 58 | }; |
michael@0 | 59 | |
michael@0 | 60 | } // namespace dom |
michael@0 | 61 | } // namespace mozilla |
michael@0 | 62 | #endif /* mozilla_dom_VideoPlaybackQuality_h_ */ |