DXR is a code search and navigation tool aimed at making sense of large projects. It supports full-text and regex searches as well as structural queries.

Mercurial (a5710687f9b4)

VCS Links

Line Code
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235
/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this file,
 * You can obtain one at http://mozilla.org/MPL/2.0/.
 */

/*
 * This module defines dictonaries that are filled with debug information
 * through GetDebugInfo() calls in the media component. To get the information
 * filled and returned, we have two methods that return promises, one in
 * HTMLMediaElement and one in MediaSource.
 *
 * If you need to add some extra info, there's one dictionary per class,
 * following the pattern <ClassName>DebugInfo, where you can add some fields
 * and fill them in the corresponding GetDebugInfo() call.
 *
 * Below is the structures returned.
 *
 * Used by HTMLMediaElement.GetMozRequestDebugInfo(), see HTMLMediaElement.webidl:
 *
 * HTMLMediaElementDebugInfo
 *   EMEDebugInfo
 *   MediaDecoderDebugInfo
 *     MediaFormatReaderDebugInfo
 *       MediaStateDebugInfo
 *       MediaStateDebugInfo
 *       MediaFrameStats
 *     MediaDecoderStateMachineDebugInfo
 *       MediaDecoderStateMachineDecodingStateDebugInfo
 *       MediaSinkDebugInfo
 *         VideoSinkDebugInfo
 *         AudioSinkDebugInfo
 *         DecodedStreamDebugInfo
 *           DecodedStreamDataDebugInfo
 *     MediaResourceDebugInfo
 *       MediaCacheStreamDebugInfo
 *
 * Used by MediaSource.GetMozDebugReaderData(), see MediaSource.webidl:
 *
 * MediaSourceDecoderDebugInfo
 *  MediaFormatReaderDebugInfo
 *    MediaStateDebugInfo
 *    MediaStateDebugInfo
 *    MediaFrameStats
 *  MediaSourceDemuxerDebugInfo
 *    TrackBuffersManagerDebugInfo
 *    TrackBuffersManagerDebugInfo
 */
dictionary MediaCacheStreamDebugInfo {
  long long streamLength = 0;
  long long channelOffset = 0;
  boolean cacheSuspended = false;
  boolean channelEnded = false;
  long loadID = 0;
};

dictionary MediaResourceDebugInfo {
  required MediaCacheStreamDebugInfo cacheStream;
};

dictionary MediaDecoderDebugInfo {
  DOMString instance = "";
  unsigned long channels = 0;
  unsigned long rate = 0;
  boolean hasAudio = false;
  boolean hasVideo = false;
  DOMString PlayState = "";
  DOMString containerType = "";
  required MediaFormatReaderDebugInfo reader;
  required MediaDecoderStateMachineDebugInfo stateMachine;
  required MediaResourceDebugInfo resource;
};

dictionary AudioSinkDebugInfo {
  long long startTime = 0;
  long long lastGoodPosition = 0;
  boolean isPlaying = false;
  boolean isStarted = false;
  boolean audioEnded = false;
  long outputRate = 0;
  long long written = 0;
  boolean hasErrored = false;
  boolean playbackComplete = false;
};

dictionary AudioSinkWrapperDebugInfo {
  boolean isPlaying = false;
  boolean isStarted = false;
  boolean audioEnded = false;
  required AudioSinkDebugInfo audioSink;
};

dictionary VideoSinkDebugInfo {
  boolean isStarted = false;
  boolean isPlaying = false;
  boolean finished = false;
  long size = 0;
  long long videoFrameEndTime = 0;
  boolean hasVideo = false;
  boolean videoSinkEndRequestExists = false;
  boolean endPromiseHolderIsEmpty = false;
};

dictionary DecodedStreamDataDebugInfo {
  DOMString instance = "";
  long long audioFramesWritten = 0;
  long long streamAudioWritten = 0;
  long long streamVideoWritten = 0;
  long long nextAudioTime = 0;
  long long lastVideoStartTime = 0;
  long long lastVideoEndTime = 0;
  boolean haveSentFinishAudio = false;
  boolean haveSentFinishVideo = false;
};

dictionary DecodedStreamDebugInfo {
  DOMString instance = "";
  long long startTime = 0;
  long long lastOutputTime = 0;
  long playing = 0;
  long long lastAudio = 0;
  boolean audioQueueFinished = false;
  long audioQueueSize = 0;
  required DecodedStreamDataDebugInfo data;
};

dictionary MediaSinkDebugInfo {
  required AudioSinkWrapperDebugInfo audioSinkWrapper;
  required VideoSinkDebugInfo videoSink;
  required DecodedStreamDebugInfo decodedStream;
};

dictionary MediaDecoderStateMachineDecodingStateDebugInfo {
  boolean isPrerolling = false;
};

dictionary MediaDecoderStateMachineDebugInfo {
  long long duration = 0;
  long long mediaTime = 0;
  long long clock = 0;
  DOMString state = "";
  long playState = 0;
  boolean sentFirstFrameLoadedEvent = false;
  boolean isPlaying = false;
  DOMString audioRequestStatus = "";
  DOMString videoRequestStatus = "";
  long long decodedAudioEndTime = 0;
  long long decodedVideoEndTime = 0;
  boolean audioCompleted = false;
  boolean videoCompleted = false;
  required MediaDecoderStateMachineDecodingStateDebugInfo stateObj;
  required MediaSinkDebugInfo mediaSink;
};

dictionary MediaStateDebugInfo {
  boolean needInput = false;
  boolean hasPromise = false;
  boolean waitingPromise = false;
  boolean hasDemuxRequest = false;
  long demuxQueueSize = 0;
  boolean hasDecoder = false;
  double timeTreshold = 0.0;
  boolean timeTresholdHasSeeked = false;
  long long numSamplesInput = 0;
  long long numSamplesOutput = 0;
  long queueSize = 0;
  long pending = 0;
  long waitingForData = 0;
  long demuxEOS = 0;
  long drainState = 0;
  long waitingForKey = 0;
  long lastStreamSourceID = 0;
};

dictionary MediaFrameStats {
  long long droppedDecodedFrames = 0;
  long long droppedSinkFrames = 0;
  long long droppedCompositorFrames = 0;
};

dictionary MediaFormatReaderDebugInfo {
  DOMString videoType = "";
  DOMString videoDecoderName = "";
  long videoWidth = 0;
  long videoHeight = 0;
  double videoRate = 0.0;
  DOMString audioType = "";
  DOMString audioDecoderName = "";
  boolean videoHardwareAccelerated = false;
  long long videoNumSamplesOutputTotal = 0;
  long long videoNumSamplesSkippedTotal = 0;
  long audioChannels = 0;
  double audioRate = 0.0;
  long long audioFramesDecoded = 0;
  required MediaStateDebugInfo audioState;
  required MediaStateDebugInfo videoState;
  required MediaFrameStats frameStats;
};

dictionary BufferRange {
  double start = 0;
  double end = 0;
};

dictionary TrackBuffersManagerDebugInfo {
  DOMString type = "";
  double nextSampleTime = 0.0;
  long numSamples = 0;
  long bufferSize = 0;
  long evictable = 0;
  long nextGetSampleIndex = 0;
  long nextInsertionIndex = 0;
  sequence<BufferRange> ranges = [];
};

dictionary MediaSourceDemuxerDebugInfo {
  required TrackBuffersManagerDebugInfo audioTrack;
  required TrackBuffersManagerDebugInfo videoTrack;
};

dictionary MediaSourceDecoderDebugInfo {
  required MediaFormatReaderDebugInfo reader;
  required MediaSourceDemuxerDebugInfo demuxer;
};

dictionary EMEDebugInfo {
  DOMString keySystem = "";
  DOMString sessionsInfo = "";
};

dictionary HTMLMediaElementDebugInfo {
  long compositorDroppedFrames = 0;
  required EMEDebugInfo EMEInfo;
  required MediaDecoderDebugInfo decoder;
};