Просмотр исходного кода

cleanup: Renames a confusingly named class.

dev1
Boris Grozev 9 лет назад
Родитель
Сommit
b99136f199
1 измененных файлов: 9 добавлений и 9 удалений
  1. 9
    9
      modules/statistics/RTPStatsCollector.js

+ 9
- 9
modules/statistics/RTPStatsCollector.js Просмотреть файл

@@ -104,7 +104,7 @@ function acceptReport(id, type) {
104 104
  * Holds "statistics" for a single SSRC.
105 105
  * @constructor
106 106
  */
107
-function PeerStats() {
107
+function SsrcStats() {
108 108
     this.loss = {};
109 109
     this.bitrate = {
110 110
         download: 0,
@@ -117,7 +117,7 @@ function PeerStats() {
117 117
  * Sets the "loss" object.
118 118
  * @param loss the value to set.
119 119
  */
120
-PeerStats.prototype.setLoss = function (loss) {
120
+SsrcStats.prototype.setLoss = function (loss) {
121 121
     this.loss = loss || {};
122 122
 };
123 123
 
@@ -125,7 +125,7 @@ PeerStats.prototype.setLoss = function (loss) {
125 125
  * Sets resolution that belong to the ssrc represented by this instance.
126 126
  * @param resolution new resolution value to be set.
127 127
  */
128
-PeerStats.prototype.setResolution = function (resolution) {
128
+SsrcStats.prototype.setResolution = function (resolution) {
129 129
     this.resolution = resolution || {};
130 130
 };
131 131
 
@@ -134,7 +134,7 @@ PeerStats.prototype.setResolution = function (resolution) {
134 134
  * the respective fields of the "bitrate" field of this object.
135 135
  * @param bitrate an object holding the values to add.
136 136
  */
137
-PeerStats.prototype.addBitrate = function (bitrate) {
137
+SsrcStats.prototype.addBitrate = function (bitrate) {
138 138
     this.bitrate.download += bitrate.download;
139 139
     this.bitrate.upload += bitrate.upload;
140 140
 };
@@ -143,7 +143,7 @@ PeerStats.prototype.addBitrate = function (bitrate) {
143 143
  * Resets the bit rate for given <tt>ssrc</tt> that belong to the peer
144 144
  * represented by this instance.
145 145
  */
146
-PeerStats.prototype.resetBitrate = function () {
146
+SsrcStats.prototype.resetBitrate = function () {
147 147
     this.bitrate.download = 0;
148 148
     this.bitrate.upload = 0;
149 149
 };
@@ -178,7 +178,7 @@ function ConferenceStats() {
178 178
 /**
179 179
  * <tt>StatsCollector</tt> registers for stats updates of given
180 180
  * <tt>peerconnection</tt> in given <tt>interval</tt>. On each update particular
181
- * stats are extracted and put in {@link PeerStats} objects. Once the processing
181
+ * stats are extracted and put in {@link SsrcStats} objects. Once the processing
182 182
  * is done <tt>audioLevelsUpdateCallback</tt> is called with <tt>this</tt>
183 183
  * instance as an event source.
184 184
  *
@@ -253,7 +253,7 @@ function StatsCollector(
253 253
 
254 254
     this.statsIntervalId = null;
255 255
     this.statsIntervalMilis = statsInterval;
256
-    // Map of ssrcs to PeerStats
256
+    // Map of ssrcs to SsrcStats
257 257
     this.ssrc2stats = {};
258 258
 }
259 259
 
@@ -565,7 +565,7 @@ StatsCollector.prototype.processStatsReport = function () {
565 565
         }
566 566
 
567 567
         var ssrcStats
568
-          = this.ssrc2stats[ssrc] || (this.ssrc2stats[ssrc] = new PeerStats());
568
+          = this.ssrc2stats[ssrc] || (this.ssrc2stats[ssrc] = new SsrcStats());
569 569
 
570 570
         var isDownloadStream = true;
571 571
         var key = 'packetsReceived';
@@ -741,7 +741,7 @@ StatsCollector.prototype.processAudioLevelReport = function () {
741 741
 
742 742
         var ssrcStats
743 743
             = this.ssrc2stats[ssrc]
744
-                || (this.ssrc2stats[ssrc] = new PeerStats());
744
+                || (this.ssrc2stats[ssrc] = new SsrcStats());
745 745
 
746 746
         // Audio level
747 747
         try {

Загрузка…
Отмена
Сохранить