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 3091 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3102 stats.decoder_implementation_name = "decoder_implementation_name"; | 3102 stats.decoder_implementation_name = "decoder_implementation_name"; |
3103 stats.decode_ms = 2; | 3103 stats.decode_ms = 2; |
3104 stats.max_decode_ms = 3; | 3104 stats.max_decode_ms = 3; |
3105 stats.current_delay_ms = 4; | 3105 stats.current_delay_ms = 4; |
3106 stats.target_delay_ms = 5; | 3106 stats.target_delay_ms = 5; |
3107 stats.jitter_buffer_ms = 6; | 3107 stats.jitter_buffer_ms = 6; |
3108 stats.min_playout_delay_ms = 7; | 3108 stats.min_playout_delay_ms = 7; |
3109 stats.render_delay_ms = 8; | 3109 stats.render_delay_ms = 8; |
3110 stats.width = 9; | 3110 stats.width = 9; |
3111 stats.height = 10; | 3111 stats.height = 10; |
| 3112 stats.frames_decoded = 11; |
3112 stream->SetStats(stats); | 3113 stream->SetStats(stats); |
3113 | 3114 |
3114 cricket::VideoMediaInfo info; | 3115 cricket::VideoMediaInfo info; |
3115 ASSERT_TRUE(channel_->GetStats(&info)); | 3116 ASSERT_TRUE(channel_->GetStats(&info)); |
3116 EXPECT_EQ(stats.decoder_implementation_name, | 3117 EXPECT_EQ(stats.decoder_implementation_name, |
3117 info.receivers[0].decoder_implementation_name); | 3118 info.receivers[0].decoder_implementation_name); |
3118 EXPECT_EQ(stats.decode_ms, info.receivers[0].decode_ms); | 3119 EXPECT_EQ(stats.decode_ms, info.receivers[0].decode_ms); |
3119 EXPECT_EQ(stats.max_decode_ms, info.receivers[0].max_decode_ms); | 3120 EXPECT_EQ(stats.max_decode_ms, info.receivers[0].max_decode_ms); |
3120 EXPECT_EQ(stats.current_delay_ms, info.receivers[0].current_delay_ms); | 3121 EXPECT_EQ(stats.current_delay_ms, info.receivers[0].current_delay_ms); |
3121 EXPECT_EQ(stats.target_delay_ms, info.receivers[0].target_delay_ms); | 3122 EXPECT_EQ(stats.target_delay_ms, info.receivers[0].target_delay_ms); |
3122 EXPECT_EQ(stats.jitter_buffer_ms, info.receivers[0].jitter_buffer_ms); | 3123 EXPECT_EQ(stats.jitter_buffer_ms, info.receivers[0].jitter_buffer_ms); |
3123 EXPECT_EQ(stats.min_playout_delay_ms, info.receivers[0].min_playout_delay_ms); | 3124 EXPECT_EQ(stats.min_playout_delay_ms, info.receivers[0].min_playout_delay_ms); |
3124 EXPECT_EQ(stats.render_delay_ms, info.receivers[0].render_delay_ms); | 3125 EXPECT_EQ(stats.render_delay_ms, info.receivers[0].render_delay_ms); |
3125 EXPECT_EQ(stats.width, info.receivers[0].frame_width); | 3126 EXPECT_EQ(stats.width, info.receivers[0].frame_width); |
3126 EXPECT_EQ(stats.height, info.receivers[0].frame_height); | 3127 EXPECT_EQ(stats.height, info.receivers[0].frame_height); |
| 3128 EXPECT_EQ(stats.frames_decoded, info.receivers[0].frames_decoded); |
3127 } | 3129 } |
3128 | 3130 |
3129 TEST_F(WebRtcVideoChannel2Test, GetStatsTranslatesReceivePacketStatsCorrectly) { | 3131 TEST_F(WebRtcVideoChannel2Test, GetStatsTranslatesReceivePacketStatsCorrectly) { |
3130 FakeVideoReceiveStream* stream = AddRecvStream(); | 3132 FakeVideoReceiveStream* stream = AddRecvStream(); |
3131 webrtc::VideoReceiveStream::Stats stats; | 3133 webrtc::VideoReceiveStream::Stats stats; |
3132 stats.rtp_stats.transmitted.payload_bytes = 2; | 3134 stats.rtp_stats.transmitted.payload_bytes = 2; |
3133 stats.rtp_stats.transmitted.header_bytes = 3; | 3135 stats.rtp_stats.transmitted.header_bytes = 3; |
3134 stats.rtp_stats.transmitted.padding_bytes = 4; | 3136 stats.rtp_stats.transmitted.padding_bytes = 4; |
3135 stats.rtp_stats.transmitted.packets = 5; | 3137 stats.rtp_stats.transmitted.packets = 5; |
3136 stats.rtcp_stats.cumulative_lost = 6; | 3138 stats.rtcp_stats.cumulative_lost = 6; |
(...skipping 697 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3834 TEST_F(WebRtcVideoChannel2SimulcastTest, SetSendCodecsWith3SimulcastStreams) { | 3836 TEST_F(WebRtcVideoChannel2SimulcastTest, SetSendCodecsWith3SimulcastStreams) { |
3835 VerifySimulcastSettings(kVp8Codec, 1280, 720, 3, 3); | 3837 VerifySimulcastSettings(kVp8Codec, 1280, 720, 3, 3); |
3836 } | 3838 } |
3837 | 3839 |
3838 // Test that we normalize send codec format size in simulcast. | 3840 // Test that we normalize send codec format size in simulcast. |
3839 TEST_F(WebRtcVideoChannel2SimulcastTest, SetSendCodecsWithOddSizeInSimulcast) { | 3841 TEST_F(WebRtcVideoChannel2SimulcastTest, SetSendCodecsWithOddSizeInSimulcast) { |
3840 cricket::VideoCodec codec(kVp8Codec); | 3842 cricket::VideoCodec codec(kVp8Codec); |
3841 VerifySimulcastSettings(codec, 541, 271, 2, 2); | 3843 VerifySimulcastSettings(codec, 541, 271, 2, 2); |
3842 } | 3844 } |
3843 } // namespace cricket | 3845 } // namespace cricket |
OLD | NEW |