Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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 var tabView = null; | 5 var tabView = null; |
| 6 var ssrcInfoManager = null; | 6 var ssrcInfoManager = null; |
| 7 var peerConnectionUpdateTable = null; | 7 var peerConnectionUpdateTable = null; |
| 8 var statsTable = null; | 8 var statsTable = null; |
| 9 var dumpCreator = null; | 9 var dumpCreator = null; |
| 10 /** A map from peer connection id to the PeerConnectionRecord. */ | 10 /** A map from peer connection id to the PeerConnectionRecord. */ |
| 11 var peerConnectionDataStore = {}; | 11 var peerConnectionDataStore = {}; |
| 12 /** A list of getUserMedia requests. */ | |
| 13 var userMediaRequests = []; | |
| 12 | 14 |
| 13 /** A simple class to store the updates and stats data for a peer connection. */ | 15 /** A simple class to store the updates and stats data for a peer connection. */ |
| 14 var PeerConnectionRecord = (function() { | 16 var PeerConnectionRecord = (function() { |
| 15 /** @constructor */ | 17 /** @constructor */ |
| 16 function PeerConnectionRecord() { | 18 function PeerConnectionRecord() { |
| 17 /** @private */ | 19 /** @private */ |
| 18 this.record_ = { | 20 this.record_ = { |
| 19 constraints: {}, | 21 constraints: {}, |
| 20 servers: [], | 22 servers: [], |
| 21 stats: {}, | 23 stats: {}, |
| (...skipping 219 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 241 statsTable.addStatsReport(peerConnectionElement, report); | 243 statsTable.addStatsReport(peerConnectionElement, report); |
| 242 drawSingleReport(peerConnectionElement, report); | 244 drawSingleReport(peerConnectionElement, report); |
| 243 } | 245 } |
| 244 } | 246 } |
| 245 | 247 |
| 246 | 248 |
| 247 /** | 249 /** |
| 248 * Adds a getUserMedia request. | 250 * Adds a getUserMedia request. |
| 249 * | 251 * |
| 250 * @param {!Object} data The object containing rid {number}, pid {number}, | 252 * @param {!Object} data The object containing rid {number}, pid {number}, |
| 251 * origin {string}, audio {Object<string>}, video {Object<string>}. | 253 * origin {string}, audio {string}, video {string}. |
| 252 */ | 254 */ |
| 253 function addGetUserMedia(data) { | 255 function addGetUserMedia(data) { |
| 254 // TODO(jiayl): add the getUserMedia info to the tabbed UI. | 256 // TODO(jiayl): add the getUserMedia info to the tabbed UI. |
|
vrk (LEFT CHROMIUM)
2014/01/09 00:26:31
nit: remove TODO?
| |
| 257 userMediaRequests.push(data); | |
| 255 } | 258 } |
| 256 | 259 |
| 257 | 260 |
| 258 /** | 261 /** |
| 259 * Removes the getUserMedia requests from the specified |rid|. | 262 * Removes the getUserMedia requests from the specified |rid|. |
| 260 * | 263 * |
| 261 * @param {!Object} data The object containing rid {number}, the render id. | 264 * @param {!Object} data The object containing rid {number}, the render id. |
| 262 */ | 265 */ |
| 263 function removeGetUserMediaForRenderer(data) { | 266 function removeGetUserMediaForRenderer(data) { |
| 264 // TODO(jiayl): remove the getUserMedia info from the tabbed UI. | 267 // TODO(jiayl): remove the getUserMedia info from the tabbed UI. |
|
vrk (LEFT CHROMIUM)
2014/01/09 00:26:31
nit: remove TODO?
| |
| 268 for (var i = userMediaRequests.length - 1; i >= 0; --i) { | |
| 269 if (userMediaRequests[i].rid == data.rid) { | |
|
vrk (LEFT CHROMIUM)
2014/01/09 00:26:31
nit: no {}
| |
| 270 userMediaRequests.splice(i, 1); | |
| 271 } | |
| 272 } | |
| 265 } | 273 } |
| 266 | 274 |
| 267 | 275 |
| 268 /** | 276 /** |
| 269 * Delegates to dumpCreator to update the recording status. | 277 * Delegates to dumpCreator to update the recording status. |
| 270 * @param {!Object.<string>} update Key-value pairs describing the status of the | 278 * @param {!Object.<string>} update Key-value pairs describing the status of the |
| 271 * RTP recording. | 279 * RTP recording. |
| 272 */ | 280 */ |
| 273 function updateDumpStatus(update) { | 281 function updateDumpStatus(update) { |
| 274 dumpCreator.onUpdate(update); | 282 dumpCreator.onUpdate(update); |
| 275 } | 283 } |
| 276 | 284 |
| 277 /** | 285 /** |
| 278 * Set | 286 * Set |
| 279 */ | 287 */ |
| 280 function enableAecRecording() { | 288 function enableAecRecording() { |
| 281 dumpCreator.enableAecRecording(); | 289 dumpCreator.enableAecRecording(); |
| 282 } | 290 } |
| OLD | NEW |