Bug 1885602 - Part 5: Implement navigating to the SUMO help topic from the menu heade...
[gecko.git] / dom / webidl / MediaDebugInfo.webidl
blob7740a9dbd32d4ca0409d797981fa0e38c7ffad80
1 /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* This Source Code Form is subject to the terms of the Mozilla Public
3  * License, v. 2.0. If a copy of the MPL was not distributed with this file,
4  * You can obtain one at http://mozilla.org/MPL/2.0/.
5  */
7 /*
8  * This module defines dictonaries that are filled with debug information
9  * through GetDebugInfo() calls in the media component. To get the information
10  * filled and returned, we have two methods that return promises, one in
11  * HTMLMediaElement and one in MediaSource.
12  *
13  * If you need to add some extra info, there's one dictionary per class,
14  * following the pattern <ClassName>DebugInfo, where you can add some fields
15  * and fill them in the corresponding GetDebugInfo() call.
16  *
17  * Below is the structures returned.
18  *
19  * Used by HTMLMediaElement.GetMozRequestDebugInfo(), see HTMLMediaElement.webidl:
20  *
21  * HTMLMediaElementDebugInfo
22  *   EMEDebugInfo
23  *   MediaDecoderDebugInfo
24  *     MediaFormatReaderDebugInfo
25  *       MediaStateDebugInfo
26  *       MediaStateDebugInfo
27  *       MediaFrameStats
28  *     MediaDecoderStateMachineDebugInfo
29  *       MediaDecoderStateMachineDecodingStateDebugInfo
30  *       MediaSinkDebugInfo
31  *         VideoSinkDebugInfo
32  *         AudioSinkDebugInfo
33  *         DecodedStreamDebugInfo
34  *           DecodedStreamDataDebugInfo
35  *     MediaResourceDebugInfo
36  *       MediaCacheStreamDebugInfo
37  *
38  * Used by MediaSource.GetMozDebugReaderData(), see MediaSource.webidl:
39  *
40  * MediaSourceDecoderDebugInfo
41  *  MediaFormatReaderDebugInfo
42  *    MediaStateDebugInfo
43  *    MediaStateDebugInfo
44  *    MediaFrameStats
45  *  MediaSourceDemuxerDebugInfo
46  *    TrackBuffersManagerDebugInfo
47  *    TrackBuffersManagerDebugInfo
48  */
49 dictionary MediaCacheStreamDebugInfo {
50   long long streamLength = 0;
51   long long channelOffset = 0;
52   boolean cacheSuspended = false;
53   boolean channelEnded = false;
54   long loadID = 0;
57 dictionary MediaResourceDebugInfo {
58   MediaCacheStreamDebugInfo cacheStream = {};
61 dictionary MediaDecoderDebugInfo {
62   DOMString instance = "";
63   unsigned long channels = 0;
64   unsigned long rate = 0;
65   boolean hasAudio = false;
66   boolean hasVideo = false;
67   DOMString PlayState = "";
68   DOMString containerType = "";
69   MediaFormatReaderDebugInfo reader = {};
70   MediaDecoderStateMachineDebugInfo stateMachine = {};
71   MediaResourceDebugInfo resource = {};
74 dictionary AudioSinkDebugInfo {
75   long long startTime = 0;
76   long long lastGoodPosition = 0;
77   boolean isPlaying = false;
78   boolean isStarted = false;
79   boolean audioEnded = false;
80   unsigned long outputRate = 0;
81   long long written = 0;
82   boolean hasErrored = false;
83   boolean playbackComplete = false;
86 dictionary AudioSinkWrapperDebugInfo {
87   boolean isPlaying = false;
88   boolean isStarted = false;
89   boolean audioEnded = false;
90   AudioSinkDebugInfo audioSink = {};
93 dictionary VideoSinkDebugInfo {
94   boolean isStarted = false;
95   boolean isPlaying = false;
96   boolean finished = false;
97   long size = 0;
98   long long videoFrameEndTime = 0;
99   boolean hasVideo = false;
100   boolean videoSinkEndRequestExists = false;
101   boolean endPromiseHolderIsEmpty = false;
104 dictionary DecodedStreamDataDebugInfo {
105   DOMString instance = "";
106   long long audioFramesWritten = 0;
107   long long streamAudioWritten = 0;
108   long long streamVideoWritten = 0;
109   long long nextAudioTime = 0;
110   long long lastVideoStartTime = 0;
111   long long lastVideoEndTime = 0;
112   boolean haveSentFinishAudio = false;
113   boolean haveSentFinishVideo = false;
116 dictionary DecodedStreamDebugInfo {
117   DOMString instance = "";
118   long long startTime = 0;
119   long long lastOutputTime = 0;
120   long playing = 0;
121   long long lastAudio = 0;
122   boolean audioQueueFinished = false;
123   long audioQueueSize = 0;
124   DecodedStreamDataDebugInfo data = {};
127 dictionary MediaSinkDebugInfo {
128   AudioSinkWrapperDebugInfo audioSinkWrapper = {};
129   VideoSinkDebugInfo videoSink = {};
130   DecodedStreamDebugInfo decodedStream = {};
133 dictionary MediaDecoderStateMachineDecodingStateDebugInfo {
134   boolean isPrerolling = false;
137 dictionary MediaDecoderStateMachineDebugInfo {
138   long long duration = 0;
139   long long mediaTime = 0;
140   long long clock = 0;
141   DOMString state = "";
142   long playState = 0;
143   boolean sentFirstFrameLoadedEvent = false;
144   boolean isPlaying = false;
145   DOMString audioRequestStatus = "";
146   DOMString videoRequestStatus = "";
147   long long decodedAudioEndTime = 0;
148   long long decodedVideoEndTime = 0;
149   boolean audioCompleted = false;
150   boolean videoCompleted = false;
151   MediaDecoderStateMachineDecodingStateDebugInfo stateObj = {};
152   MediaSinkDebugInfo mediaSink = {};
153   double totalBufferingTimeMs = 0;
156 dictionary MediaStateDebugInfo {
157   boolean needInput = false;
158   boolean hasPromise = false;
159   boolean waitingPromise = false;
160   boolean hasDemuxRequest = false;
161   long demuxQueueSize = 0;
162   boolean hasDecoder = false;
163   double timeTreshold = 0.0;
164   boolean timeTresholdHasSeeked = false;
165   long long numSamplesInput = 0;
166   long long numSamplesOutput = 0;
167   long queueSize = 0;
168   long pending = 0;
169   boolean waitingForData = false;
170   long demuxEOS = 0;
171   long drainState = 0;
172   boolean waitingForKey = false;
173   long long lastStreamSourceID = 0;
176 dictionary MediaFrameStats {
177   long long droppedDecodedFrames = 0;
178   long long droppedSinkFrames = 0;
179   long long droppedCompositorFrames = 0;
182 dictionary MediaFormatReaderDebugInfo {
183   DOMString videoType = "";
184   DOMString videoDecoderName = "";
185   long videoWidth = 0;
186   long videoHeight = 0;
187   double videoRate = 0.0;
188   DOMString audioType = "";
189   DOMString audioDecoderName = "";
190   boolean videoHardwareAccelerated = false;
191   long long videoNumSamplesOutputTotal = 0;
192   long long videoNumSamplesSkippedTotal = 0;
193   long audioChannels = 0;
194   double audioRate = 0.0;
195   long long audioFramesDecoded = 0;
196   MediaStateDebugInfo audioState = {};
197   MediaStateDebugInfo videoState = {};
198   MediaFrameStats frameStats = {};
199   double totalReadMetadataTimeMs = 0.0;
200   double totalWaitingForVideoDataTimeMs = 0.0;
203 dictionary BufferRange {
204   double start = 0;
205   double end = 0;
208 dictionary TrackBuffersManagerDebugInfo {
209   DOMString type = "";
210   double nextSampleTime = 0.0;
211   long numSamples = 0;
212   long bufferSize = 0;
213   long evictable = 0;
214   long nextGetSampleIndex = 0;
215   long nextInsertionIndex = 0;
216   sequence<BufferRange> ranges = [];
219 dictionary MediaSourceDemuxerDebugInfo {
220   TrackBuffersManagerDebugInfo audioTrack = {};
221   TrackBuffersManagerDebugInfo videoTrack = {};
224 dictionary MediaSourceDecoderDebugInfo {
225   MediaFormatReaderDebugInfo reader = {};
226   MediaSourceDemuxerDebugInfo demuxer = {};
229 dictionary EMEDebugInfo {
230   DOMString keySystem = "";
231   DOMString sessionsInfo = "";
234 dictionary HTMLMediaElementDebugInfo {
235   unsigned long compositorDroppedFrames = 0;
236   EMEDebugInfo EMEInfo = {};
237   MediaDecoderDebugInfo decoder = {};