/work/obj-fuzz/dist/include/mozilla/dom/VideoPlaybackQuality.h
Line | Count | Source (jump to first uncovered line) |
1 | | /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ |
2 | | /* vim: set ts=8 sts=2 et sw=2 tw=80: */ |
3 | | /* This Source Code Form is subject to the terms of the Mozilla Public |
4 | | * License, v. 2.0. If a copy of the MPL was not distributed with this |
5 | | * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ |
6 | | |
7 | | #ifndef mozilla_dom_VideoPlaybackQuality_h_ |
8 | | #define mozilla_dom_VideoPlaybackQuality_h_ |
9 | | |
10 | | #include "mozilla/dom/HTMLMediaElement.h" |
11 | | #include "nsCycleCollectionParticipant.h" |
12 | | #include "nsDOMNavigationTiming.h" |
13 | | #include "nsWrapperCache.h" |
14 | | |
15 | | namespace mozilla { |
16 | | namespace dom { |
17 | | |
18 | | class VideoPlaybackQuality final : public nsWrapperCache |
19 | | { |
20 | | public: |
21 | | NS_INLINE_DECL_CYCLE_COLLECTING_NATIVE_REFCOUNTING(VideoPlaybackQuality) |
22 | | NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_NATIVE_CLASS(VideoPlaybackQuality) |
23 | | |
24 | | VideoPlaybackQuality(HTMLMediaElement* aElement, |
25 | | DOMHighResTimeStamp aCreationTime, |
26 | | uint32_t aTotalFrames, |
27 | | uint32_t aDroppedFrames, |
28 | | uint32_t aCorruptedFrames); |
29 | | |
30 | | HTMLMediaElement* GetParentObject() const; |
31 | | |
32 | | JSObject* WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto) override; |
33 | | |
34 | | DOMHighResTimeStamp CreationTime() const |
35 | 0 | { |
36 | 0 | return mCreationTime; |
37 | 0 | } |
38 | | |
39 | | uint32_t TotalVideoFrames() const |
40 | 0 | { |
41 | 0 | return mTotalFrames; |
42 | 0 | } |
43 | | |
44 | | uint32_t DroppedVideoFrames() const |
45 | 0 | { |
46 | 0 | return mDroppedFrames; |
47 | 0 | } |
48 | | |
49 | | uint32_t CorruptedVideoFrames() const |
50 | 0 | { |
51 | 0 | return mCorruptedFrames; |
52 | 0 | } |
53 | | |
54 | | private: |
55 | | ~VideoPlaybackQuality() {} |
56 | | |
57 | | RefPtr<HTMLMediaElement> mElement; |
58 | | DOMHighResTimeStamp mCreationTime; |
59 | | uint32_t mTotalFrames; |
60 | | uint32_t mDroppedFrames; |
61 | | uint32_t mCorruptedFrames; |
62 | | }; |
63 | | |
64 | | } // namespace dom |
65 | | } // namespace mozilla |
66 | | |
67 | | #endif // mozilla_dom_VideoPlaybackQuality_h_ |