| OLD | NEW | 
|    1 /* |    1 /* | 
|    2  *  Copyright 2016 The WebRTC project authors. All Rights Reserved. |    2  *  Copyright 2016 The WebRTC project authors. All Rights Reserved. | 
|    3  * |    3  * | 
|    4  *  Use of this source code is governed by a BSD-style license |    4  *  Use of this source code is governed by a BSD-style license | 
|    5  *  that can be found in the LICENSE file in the root of the source |    5  *  that can be found in the LICENSE file in the root of the source | 
|    6  *  tree. An additional intellectual property rights grant can be found |    6  *  tree. An additional intellectual property rights grant can be found | 
|    7  *  in the file PATENTS.  All contributing project authors may |    7  *  in the file PATENTS.  All contributing project authors may | 
|    8  *  be found in the AUTHORS file in the root of the source tree. |    8  *  be found in the AUTHORS file in the root of the source tree. | 
|    9  */ |    9  */ | 
|   10  |   10  | 
| (...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|   91   EXPECT_EQ(rtc::Optional<uint64_t>(), statistics_proxy_->GetStats().qp_sum); |   91   EXPECT_EQ(rtc::Optional<uint64_t>(), statistics_proxy_->GetStats().qp_sum); | 
|   92   statistics_proxy_->OnDecodedFrame(rtc::Optional<uint8_t>(3u), |   92   statistics_proxy_->OnDecodedFrame(rtc::Optional<uint8_t>(3u), | 
|   93                                     VideoContentType::UNSPECIFIED); |   93                                     VideoContentType::UNSPECIFIED); | 
|   94   EXPECT_EQ(rtc::Optional<uint64_t>(3u), statistics_proxy_->GetStats().qp_sum); |   94   EXPECT_EQ(rtc::Optional<uint64_t>(3u), statistics_proxy_->GetStats().qp_sum); | 
|   95   statistics_proxy_->OnDecodedFrame(rtc::Optional<uint8_t>(127u), |   95   statistics_proxy_->OnDecodedFrame(rtc::Optional<uint8_t>(127u), | 
|   96                                     VideoContentType::UNSPECIFIED); |   96                                     VideoContentType::UNSPECIFIED); | 
|   97   EXPECT_EQ(rtc::Optional<uint64_t>(130u), |   97   EXPECT_EQ(rtc::Optional<uint64_t>(130u), | 
|   98             statistics_proxy_->GetStats().qp_sum); |   98             statistics_proxy_->GetStats().qp_sum); | 
|   99 } |   99 } | 
|  100  |  100  | 
 |  101 TEST_F(ReceiveStatisticsProxyTest, ReportsContentType) { | 
 |  102   const std::string kRealtimeString("realtime"); | 
 |  103   const std::string kScreenshareString("screen"); | 
 |  104   EXPECT_EQ(kRealtimeString, videocontenttypehelpers::ToString( | 
 |  105                             statistics_proxy_->GetStats().content_type)); | 
 |  106   statistics_proxy_->OnDecodedFrame(rtc::Optional<uint8_t>(3u), | 
 |  107                                     VideoContentType::SCREENSHARE); | 
 |  108   EXPECT_EQ(kScreenshareString, videocontenttypehelpers::ToString( | 
 |  109                           statistics_proxy_->GetStats().content_type)); | 
 |  110   statistics_proxy_->OnDecodedFrame(rtc::Optional<uint8_t>(3u), | 
 |  111                                     VideoContentType::UNSPECIFIED); | 
 |  112   EXPECT_EQ(kRealtimeString, videocontenttypehelpers::ToString( | 
 |  113                             statistics_proxy_->GetStats().content_type)); | 
 |  114 } | 
 |  115  | 
|  101 TEST_F(ReceiveStatisticsProxyTest, ReportsMaxInterframeDelay) { |  116 TEST_F(ReceiveStatisticsProxyTest, ReportsMaxInterframeDelay) { | 
|  102   const int64_t kInterframeDelayMs1 = 100; |  117   const int64_t kInterframeDelayMs1 = 100; | 
|  103   const int64_t kInterframeDelayMs2 = 200; |  118   const int64_t kInterframeDelayMs2 = 200; | 
|  104   const int64_t kInterframeDelayMs3 = 100; |  119   const int64_t kInterframeDelayMs3 = 100; | 
|  105   EXPECT_EQ(-1, statistics_proxy_->GetStats().interframe_delay_max_ms); |  120   EXPECT_EQ(-1, statistics_proxy_->GetStats().interframe_delay_max_ms); | 
|  106   statistics_proxy_->OnDecodedFrame(rtc::Optional<uint8_t>(3u), |  121   statistics_proxy_->OnDecodedFrame(rtc::Optional<uint8_t>(3u), | 
|  107                                     VideoContentType::UNSPECIFIED); |  122                                     VideoContentType::UNSPECIFIED); | 
|  108   EXPECT_EQ(-1, statistics_proxy_->GetStats().interframe_delay_max_ms); |  123   EXPECT_EQ(-1, statistics_proxy_->GetStats().interframe_delay_max_ms); | 
|  109  |  124  | 
|  110   fake_clock_.AdvanceTimeMilliseconds(kInterframeDelayMs1); |  125   fake_clock_.AdvanceTimeMilliseconds(kInterframeDelayMs1); | 
| (...skipping 837 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  948               metrics::MinSample("WebRTC.Video.InterframeDelayInMs")); |  963               metrics::MinSample("WebRTC.Video.InterframeDelayInMs")); | 
|  949     EXPECT_EQ(kInterFrameDelayMs2, |  964     EXPECT_EQ(kInterFrameDelayMs2, | 
|  950               metrics::MinSample("WebRTC.Video.InterframeDelayMaxInMs")); |  965               metrics::MinSample("WebRTC.Video.InterframeDelayMaxInMs")); | 
|  951     EXPECT_EQ((kInterFrameDelayMs1 + kInterFrameDelayMs2) / 2, |  966     EXPECT_EQ((kInterFrameDelayMs1 + kInterFrameDelayMs2) / 2, | 
|  952               metrics::MinSample( |  967               metrics::MinSample( | 
|  953                   "WebRTC.Video.InterframeDelayInMs.ExperimentGroup0")); |  968                   "WebRTC.Video.InterframeDelayInMs.ExperimentGroup0")); | 
|  954   } |  969   } | 
|  955 } |  970 } | 
|  956  |  971  | 
|  957 }  // namespace webrtc |  972 }  // namespace webrtc | 
| OLD | NEW |