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 3150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3161 FakeVideoReceiveStream* stream = AddRecvStream(); | 3161 FakeVideoReceiveStream* stream = AddRecvStream(); |
3162 webrtc::VideoReceiveStream::Stats stats; | 3162 webrtc::VideoReceiveStream::Stats stats; |
3163 stats.decoder_implementation_name = "decoder_implementation_name"; | 3163 stats.decoder_implementation_name = "decoder_implementation_name"; |
3164 stats.decode_ms = 2; | 3164 stats.decode_ms = 2; |
3165 stats.max_decode_ms = 3; | 3165 stats.max_decode_ms = 3; |
3166 stats.current_delay_ms = 4; | 3166 stats.current_delay_ms = 4; |
3167 stats.target_delay_ms = 5; | 3167 stats.target_delay_ms = 5; |
3168 stats.jitter_buffer_ms = 6; | 3168 stats.jitter_buffer_ms = 6; |
3169 stats.min_playout_delay_ms = 7; | 3169 stats.min_playout_delay_ms = 7; |
3170 stats.render_delay_ms = 8; | 3170 stats.render_delay_ms = 8; |
| 3171 stats.width = 9; |
| 3172 stats.height = 10; |
3171 stream->SetStats(stats); | 3173 stream->SetStats(stats); |
3172 | 3174 |
3173 cricket::VideoMediaInfo info; | 3175 cricket::VideoMediaInfo info; |
3174 ASSERT_TRUE(channel_->GetStats(&info)); | 3176 ASSERT_TRUE(channel_->GetStats(&info)); |
3175 EXPECT_EQ(stats.decoder_implementation_name, | 3177 EXPECT_EQ(stats.decoder_implementation_name, |
3176 info.receivers[0].decoder_implementation_name); | 3178 info.receivers[0].decoder_implementation_name); |
3177 EXPECT_EQ(stats.decode_ms, info.receivers[0].decode_ms); | 3179 EXPECT_EQ(stats.decode_ms, info.receivers[0].decode_ms); |
3178 EXPECT_EQ(stats.max_decode_ms, info.receivers[0].max_decode_ms); | 3180 EXPECT_EQ(stats.max_decode_ms, info.receivers[0].max_decode_ms); |
3179 EXPECT_EQ(stats.current_delay_ms, info.receivers[0].current_delay_ms); | 3181 EXPECT_EQ(stats.current_delay_ms, info.receivers[0].current_delay_ms); |
3180 EXPECT_EQ(stats.target_delay_ms, info.receivers[0].target_delay_ms); | 3182 EXPECT_EQ(stats.target_delay_ms, info.receivers[0].target_delay_ms); |
3181 EXPECT_EQ(stats.jitter_buffer_ms, info.receivers[0].jitter_buffer_ms); | 3183 EXPECT_EQ(stats.jitter_buffer_ms, info.receivers[0].jitter_buffer_ms); |
3182 EXPECT_EQ(stats.min_playout_delay_ms, info.receivers[0].min_playout_delay_ms); | 3184 EXPECT_EQ(stats.min_playout_delay_ms, info.receivers[0].min_playout_delay_ms); |
3183 EXPECT_EQ(stats.render_delay_ms, info.receivers[0].render_delay_ms); | 3185 EXPECT_EQ(stats.render_delay_ms, info.receivers[0].render_delay_ms); |
| 3186 EXPECT_EQ(stats.width, info.receivers[0].frame_width); |
| 3187 EXPECT_EQ(stats.height, info.receivers[0].frame_height); |
3184 } | 3188 } |
3185 | 3189 |
3186 TEST_F(WebRtcVideoChannel2Test, GetStatsTranslatesReceivePacketStatsCorrectly) { | 3190 TEST_F(WebRtcVideoChannel2Test, GetStatsTranslatesReceivePacketStatsCorrectly) { |
3187 FakeVideoReceiveStream* stream = AddRecvStream(); | 3191 FakeVideoReceiveStream* stream = AddRecvStream(); |
3188 webrtc::VideoReceiveStream::Stats stats; | 3192 webrtc::VideoReceiveStream::Stats stats; |
3189 stats.rtp_stats.transmitted.payload_bytes = 2; | 3193 stats.rtp_stats.transmitted.payload_bytes = 2; |
3190 stats.rtp_stats.transmitted.header_bytes = 3; | 3194 stats.rtp_stats.transmitted.header_bytes = 3; |
3191 stats.rtp_stats.transmitted.padding_bytes = 4; | 3195 stats.rtp_stats.transmitted.padding_bytes = 4; |
3192 stats.rtp_stats.transmitted.packets = 5; | 3196 stats.rtp_stats.transmitted.packets = 5; |
3193 stats.rtcp_stats.cumulative_lost = 6; | 3197 stats.rtcp_stats.cumulative_lost = 6; |
(...skipping 654 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3848 } | 3852 } |
3849 | 3853 |
3850 // Test that we normalize send codec format size in simulcast. | 3854 // Test that we normalize send codec format size in simulcast. |
3851 TEST_F(WebRtcVideoChannel2SimulcastTest, SetSendCodecsWithOddSizeInSimulcast) { | 3855 TEST_F(WebRtcVideoChannel2SimulcastTest, SetSendCodecsWithOddSizeInSimulcast) { |
3852 cricket::VideoCodec codec(kVp8Codec270p); | 3856 cricket::VideoCodec codec(kVp8Codec270p); |
3853 codec.width += 1; | 3857 codec.width += 1; |
3854 codec.height += 1; | 3858 codec.height += 1; |
3855 VerifySimulcastSettings(codec, 2, 2); | 3859 VerifySimulcastSettings(codec, 2, 2); |
3856 } | 3860 } |
3857 } // namespace cricket | 3861 } // namespace cricket |
OLD | NEW |