| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (c) 2004 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2004 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 3124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3135 stats.decoder_implementation_name = "decoder_implementation_name"; | 3135 stats.decoder_implementation_name = "decoder_implementation_name"; |
| 3136 stats.decode_ms = 2; | 3136 stats.decode_ms = 2; |
| 3137 stats.max_decode_ms = 3; | 3137 stats.max_decode_ms = 3; |
| 3138 stats.current_delay_ms = 4; | 3138 stats.current_delay_ms = 4; |
| 3139 stats.target_delay_ms = 5; | 3139 stats.target_delay_ms = 5; |
| 3140 stats.jitter_buffer_ms = 6; | 3140 stats.jitter_buffer_ms = 6; |
| 3141 stats.min_playout_delay_ms = 7; | 3141 stats.min_playout_delay_ms = 7; |
| 3142 stats.render_delay_ms = 8; | 3142 stats.render_delay_ms = 8; |
| 3143 stats.width = 9; | 3143 stats.width = 9; |
| 3144 stats.height = 10; | 3144 stats.height = 10; |
| 3145 stats.frames_decoded = 11; |
| 3145 stream->SetStats(stats); | 3146 stream->SetStats(stats); |
| 3146 | 3147 |
| 3147 cricket::VideoMediaInfo info; | 3148 cricket::VideoMediaInfo info; |
| 3148 ASSERT_TRUE(channel_->GetStats(&info)); | 3149 ASSERT_TRUE(channel_->GetStats(&info)); |
| 3149 EXPECT_EQ(stats.decoder_implementation_name, | 3150 EXPECT_EQ(stats.decoder_implementation_name, |
| 3150 info.receivers[0].decoder_implementation_name); | 3151 info.receivers[0].decoder_implementation_name); |
| 3151 EXPECT_EQ(stats.decode_ms, info.receivers[0].decode_ms); | 3152 EXPECT_EQ(stats.decode_ms, info.receivers[0].decode_ms); |
| 3152 EXPECT_EQ(stats.max_decode_ms, info.receivers[0].max_decode_ms); | 3153 EXPECT_EQ(stats.max_decode_ms, info.receivers[0].max_decode_ms); |
| 3153 EXPECT_EQ(stats.current_delay_ms, info.receivers[0].current_delay_ms); | 3154 EXPECT_EQ(stats.current_delay_ms, info.receivers[0].current_delay_ms); |
| 3154 EXPECT_EQ(stats.target_delay_ms, info.receivers[0].target_delay_ms); | 3155 EXPECT_EQ(stats.target_delay_ms, info.receivers[0].target_delay_ms); |
| 3155 EXPECT_EQ(stats.jitter_buffer_ms, info.receivers[0].jitter_buffer_ms); | 3156 EXPECT_EQ(stats.jitter_buffer_ms, info.receivers[0].jitter_buffer_ms); |
| 3156 EXPECT_EQ(stats.min_playout_delay_ms, info.receivers[0].min_playout_delay_ms); | 3157 EXPECT_EQ(stats.min_playout_delay_ms, info.receivers[0].min_playout_delay_ms); |
| 3157 EXPECT_EQ(stats.render_delay_ms, info.receivers[0].render_delay_ms); | 3158 EXPECT_EQ(stats.render_delay_ms, info.receivers[0].render_delay_ms); |
| 3158 EXPECT_EQ(stats.width, info.receivers[0].frame_width); | 3159 EXPECT_EQ(stats.width, info.receivers[0].frame_width); |
| 3159 EXPECT_EQ(stats.height, info.receivers[0].frame_height); | 3160 EXPECT_EQ(stats.height, info.receivers[0].frame_height); |
| 3161 EXPECT_EQ(stats.frames_decoded, info.receivers[0].frames_decoded); |
| 3160 } | 3162 } |
| 3161 | 3163 |
| 3162 TEST_F(WebRtcVideoChannel2Test, GetStatsTranslatesReceivePacketStatsCorrectly) { | 3164 TEST_F(WebRtcVideoChannel2Test, GetStatsTranslatesReceivePacketStatsCorrectly) { |
| 3163 FakeVideoReceiveStream* stream = AddRecvStream(); | 3165 FakeVideoReceiveStream* stream = AddRecvStream(); |
| 3164 webrtc::VideoReceiveStream::Stats stats; | 3166 webrtc::VideoReceiveStream::Stats stats; |
| 3165 stats.rtp_stats.transmitted.payload_bytes = 2; | 3167 stats.rtp_stats.transmitted.payload_bytes = 2; |
| 3166 stats.rtp_stats.transmitted.header_bytes = 3; | 3168 stats.rtp_stats.transmitted.header_bytes = 3; |
| 3167 stats.rtp_stats.transmitted.padding_bytes = 4; | 3169 stats.rtp_stats.transmitted.padding_bytes = 4; |
| 3168 stats.rtp_stats.transmitted.packets = 5; | 3170 stats.rtp_stats.transmitted.packets = 5; |
| 3169 stats.rtcp_stats.cumulative_lost = 6; | 3171 stats.rtcp_stats.cumulative_lost = 6; |
| (...skipping 697 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3867 } | 3869 } |
| 3868 | 3870 |
| 3869 // Test that we normalize send codec format size in simulcast. | 3871 // Test that we normalize send codec format size in simulcast. |
| 3870 TEST_F(WebRtcVideoChannel2SimulcastTest, SetSendCodecsWithOddSizeInSimulcast) { | 3872 TEST_F(WebRtcVideoChannel2SimulcastTest, SetSendCodecsWithOddSizeInSimulcast) { |
| 3871 cricket::VideoCodec codec(kVp8Codec270p); | 3873 cricket::VideoCodec codec(kVp8Codec270p); |
| 3872 codec.width += 1; | 3874 codec.width += 1; |
| 3873 codec.height += 1; | 3875 codec.height += 1; |
| 3874 VerifySimulcastSettings(codec, 2, 2); | 3876 VerifySimulcastSettings(codec, 2, 2); |
| 3875 } | 3877 } |
| 3876 } // namespace cricket | 3878 } // namespace cricket |
| OLD | NEW |