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/.
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.
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.
17 * Below is the structures returned.
19 * Used by HTMLMediaElement.GetMozRequestDebugInfo(), see HTMLMediaElement.webidl:
21 * HTMLMediaElementDebugInfo
23 * MediaDecoderDebugInfo
24 * MediaFormatReaderDebugInfo
28 * MediaDecoderStateMachineDebugInfo
29 * MediaDecoderStateMachineDecodingStateDebugInfo
33 * DecodedStreamDebugInfo
34 * DecodedStreamDataDebugInfo
35 * MediaResourceDebugInfo
36 * MediaCacheStreamDebugInfo
38 * Used by MediaSource.GetMozDebugReaderData(), see MediaSource.webidl:
40 * MediaSourceDecoderDebugInfo
41 * MediaFormatReaderDebugInfo
45 * MediaSourceDemuxerDebugInfo
46 * TrackBuffersManagerDebugInfo
47 * TrackBuffersManagerDebugInfo
49 dictionary MediaCacheStreamDebugInfo {
50 long long streamLength = 0;
51 long long channelOffset = 0;
52 boolean cacheSuspended = false;
53 boolean channelEnded = false;
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;
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;
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;
141 DOMString state = "";
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 unsigned long long demuxQueueSize = 0;
162 boolean hasDecoder = false;
163 double timeTreshold = 0.0;
164 boolean timeTresholdHasSeeked = false;
165 unsigned long long numSamplesInput = 0;
166 unsigned long long numSamplesOutput = 0;
167 unsigned long long queueSize = 0;
168 unsigned long long pending = 0;
169 boolean waitingForData = false;
172 boolean waitingForKey = false;
173 unsigned long lastStreamSourceID = 0;
176 dictionary MediaFrameStats {
177 unsigned long long droppedDecodedFrames = 0;
178 unsigned long long droppedSinkFrames = 0;
179 unsigned long long droppedCompositorFrames = 0;
182 dictionary MediaFormatReaderDebugInfo {
183 DOMString videoType = "";
184 DOMString videoDecoderName = "";
186 long videoHeight = 0;
187 double videoRate = 0.0;
188 DOMString audioType = "";
189 DOMString audioDecoderName = "";
190 boolean videoHardwareAccelerated = false;
191 unsigned long long videoNumSamplesOutputTotal = 0;
192 unsigned long long videoNumSamplesSkippedTotal = 0;
193 unsigned long audioChannels = 0;
194 double audioRate = 0.0;
195 unsigned 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 {
208 dictionary TrackBuffersManagerDebugInfo {
210 double nextSampleTime = 0.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 = {};