Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1211)

Side by Side Diff: content/browser/resources/media/main.js

Issue 1236543007: MSE: Log buffered audio splice generation to media-internals (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 /** 5 /**
6 * A global object that gets used by the C++ interface. 6 * A global object that gets used by the C++ interface.
7 */ 7 */
8 var media = (function() { 8 var media = (function() {
9 'use strict'; 9 'use strict';
10 10
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after
158 158
159 var propertyCount = 0; 159 var propertyCount = 0;
160 util.object.forEach(event.params, function(value, key) { 160 util.object.forEach(event.params, function(value, key) {
161 key = key.trim(); 161 key = key.trim();
162 162
163 // These keys get spammed *a lot*, so put them on the display 163 // These keys get spammed *a lot*, so put them on the display
164 // but don't log list. 164 // but don't log list.
165 if (key === 'buffer_start' || 165 if (key === 'buffer_start' ||
166 key === 'buffer_end' || 166 key === 'buffer_end' ||
167 key === 'buffer_current' || 167 key === 'buffer_current' ||
168 key === 'is_downloading_data') { 168 key === 'is_downloading_data' ||
169 key === 'audio_splice_count' ||
wolenetz 2015/07/14 23:23:37 Likewise, this isn't a very efficient mechanism fo
DaleCurtis 2015/07/14 23:37:47 I think this is long enough that we want a global
170 key === 'audio_splice_degenerate_count' ||
171 key === 'audio_splice_duration_average' ||
172 key === 'audio_splice_duration_min' ||
173 key === 'audio_splice_duration_max') {
169 manager.updatePlayerInfoNoRecord( 174 manager.updatePlayerInfoNoRecord(
170 source, event.ticksMillis, key, value); 175 source, event.ticksMillis, key, value);
171 } else { 176 } else {
172 manager.updatePlayerInfo(source, event.ticksMillis, key, value); 177 manager.updatePlayerInfo(source, event.ticksMillis, key, value);
173 } 178 }
174 propertyCount += 1; 179 propertyCount += 1;
175 }); 180 });
176 181
177 if (propertyCount === 0) { 182 if (propertyCount === 0) {
178 manager.updatePlayerInfo( 183 manager.updatePlayerInfo(
179 source, event.ticksMillis, 'event', event.type); 184 source, event.ticksMillis, 'event', event.type);
180 } 185 }
181 }; 186 };
182 187
183 // |chrome| is not defined during tests. 188 // |chrome| is not defined during tests.
184 if (window.chrome && window.chrome.send) { 189 if (window.chrome && window.chrome.send) {
185 chrome.send('getEverything'); 190 chrome.send('getEverything');
186 } 191 }
187 return media; 192 return media;
188 }()); 193 }());
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698