OLD | NEW |
1 /* | 1 /* |
2 * libjingle | 2 * libjingle |
3 * Copyright 2004 Google Inc. | 3 * Copyright 2004 Google Inc. |
4 * | 4 * |
5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
6 * modification, are permitted provided that the following conditions are met: | 6 * modification, are permitted provided that the following conditions are met: |
7 * | 7 * |
8 * 1. Redistributions of source code must retain the above copyright notice, | 8 * 1. Redistributions of source code must retain the above copyright notice, |
9 * this list of conditions and the following disclaimer. | 9 * this list of conditions and the following disclaimer. |
10 * 2. Redistributions in binary form must reproduce the above copyright notice, | 10 * 2. Redistributions in binary form must reproduce the above copyright notice, |
(...skipping 2427 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2438 parameters.codecs.push_back(kVp8Codec); | 2438 parameters.codecs.push_back(kVp8Codec); |
2439 EXPECT_TRUE(channel_->SetSendParameters(parameters)); | 2439 EXPECT_TRUE(channel_->SetSendParameters(parameters)); |
2440 | 2440 |
2441 AddSendStream(); | 2441 AddSendStream(); |
2442 | 2442 |
2443 cricket::VideoMediaInfo info; | 2443 cricket::VideoMediaInfo info; |
2444 ASSERT_TRUE(channel_->GetStats(&info)); | 2444 ASSERT_TRUE(channel_->GetStats(&info)); |
2445 EXPECT_EQ(kVp8Codec.name, info.senders[0].codec_name); | 2445 EXPECT_EQ(kVp8Codec.name, info.senders[0].codec_name); |
2446 } | 2446 } |
2447 | 2447 |
| 2448 TEST_F(WebRtcVideoChannel2Test, GetStatsReportsEncoderImplementationName) { |
| 2449 FakeVideoSendStream* stream = AddSendStream(); |
| 2450 webrtc::VideoSendStream::Stats stats; |
| 2451 stats.encoder_implementation_name = "encoder_implementation_name"; |
| 2452 stream->SetStats(stats); |
| 2453 |
| 2454 cricket::VideoMediaInfo info; |
| 2455 ASSERT_TRUE(channel_->GetStats(&info)); |
| 2456 EXPECT_EQ(stats.encoder_implementation_name, |
| 2457 info.senders[0].encoder_implementation_name); |
| 2458 } |
| 2459 |
2448 TEST_F(WebRtcVideoChannel2Test, GetStatsReportsCpuOveruseMetrics) { | 2460 TEST_F(WebRtcVideoChannel2Test, GetStatsReportsCpuOveruseMetrics) { |
2449 FakeVideoSendStream* stream = AddSendStream(); | 2461 FakeVideoSendStream* stream = AddSendStream(); |
2450 webrtc::VideoSendStream::Stats stats; | 2462 webrtc::VideoSendStream::Stats stats; |
2451 stats.avg_encode_time_ms = 13; | 2463 stats.avg_encode_time_ms = 13; |
2452 stats.encode_usage_percent = 42; | 2464 stats.encode_usage_percent = 42; |
2453 stream->SetStats(stats); | 2465 stream->SetStats(stats); |
2454 | 2466 |
2455 cricket::VideoMediaInfo info; | 2467 cricket::VideoMediaInfo info; |
2456 ASSERT_TRUE(channel_->GetStats(&info)); | 2468 ASSERT_TRUE(channel_->GetStats(&info)); |
2457 EXPECT_EQ(stats.avg_encode_time_ms, info.senders[0].avg_encode_ms); | 2469 EXPECT_EQ(stats.avg_encode_time_ms, info.senders[0].avg_encode_ms); |
(...skipping 212 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2670 info.receivers[0].firs_sent); | 2682 info.receivers[0].firs_sent); |
2671 EXPECT_EQ(stats.rtcp_packet_type_counts.nack_packets, | 2683 EXPECT_EQ(stats.rtcp_packet_type_counts.nack_packets, |
2672 info.receivers[0].nacks_sent); | 2684 info.receivers[0].nacks_sent); |
2673 EXPECT_EQ(stats.rtcp_packet_type_counts.pli_packets, | 2685 EXPECT_EQ(stats.rtcp_packet_type_counts.pli_packets, |
2674 info.receivers[0].plis_sent); | 2686 info.receivers[0].plis_sent); |
2675 } | 2687 } |
2676 | 2688 |
2677 TEST_F(WebRtcVideoChannel2Test, GetStatsTranslatesDecodeStatsCorrectly) { | 2689 TEST_F(WebRtcVideoChannel2Test, GetStatsTranslatesDecodeStatsCorrectly) { |
2678 FakeVideoReceiveStream* stream = AddRecvStream(); | 2690 FakeVideoReceiveStream* stream = AddRecvStream(); |
2679 webrtc::VideoReceiveStream::Stats stats; | 2691 webrtc::VideoReceiveStream::Stats stats; |
| 2692 stats.decoder_implementation_name = "decoder_implementation_name"; |
2680 stats.decode_ms = 2; | 2693 stats.decode_ms = 2; |
2681 stats.max_decode_ms = 3; | 2694 stats.max_decode_ms = 3; |
2682 stats.current_delay_ms = 4; | 2695 stats.current_delay_ms = 4; |
2683 stats.target_delay_ms = 5; | 2696 stats.target_delay_ms = 5; |
2684 stats.jitter_buffer_ms = 6; | 2697 stats.jitter_buffer_ms = 6; |
2685 stats.min_playout_delay_ms = 7; | 2698 stats.min_playout_delay_ms = 7; |
2686 stats.render_delay_ms = 8; | 2699 stats.render_delay_ms = 8; |
2687 stream->SetStats(stats); | 2700 stream->SetStats(stats); |
2688 | 2701 |
2689 cricket::VideoMediaInfo info; | 2702 cricket::VideoMediaInfo info; |
2690 ASSERT_TRUE(channel_->GetStats(&info)); | 2703 ASSERT_TRUE(channel_->GetStats(&info)); |
| 2704 EXPECT_EQ(stats.decoder_implementation_name, |
| 2705 info.receivers[0].decoder_implementation_name); |
2691 EXPECT_EQ(stats.decode_ms, info.receivers[0].decode_ms); | 2706 EXPECT_EQ(stats.decode_ms, info.receivers[0].decode_ms); |
2692 EXPECT_EQ(stats.max_decode_ms, info.receivers[0].max_decode_ms); | 2707 EXPECT_EQ(stats.max_decode_ms, info.receivers[0].max_decode_ms); |
2693 EXPECT_EQ(stats.current_delay_ms, info.receivers[0].current_delay_ms); | 2708 EXPECT_EQ(stats.current_delay_ms, info.receivers[0].current_delay_ms); |
2694 EXPECT_EQ(stats.target_delay_ms, info.receivers[0].target_delay_ms); | 2709 EXPECT_EQ(stats.target_delay_ms, info.receivers[0].target_delay_ms); |
2695 EXPECT_EQ(stats.jitter_buffer_ms, info.receivers[0].jitter_buffer_ms); | 2710 EXPECT_EQ(stats.jitter_buffer_ms, info.receivers[0].jitter_buffer_ms); |
2696 EXPECT_EQ(stats.min_playout_delay_ms, info.receivers[0].min_playout_delay_ms); | 2711 EXPECT_EQ(stats.min_playout_delay_ms, info.receivers[0].min_playout_delay_ms); |
2697 EXPECT_EQ(stats.render_delay_ms, info.receivers[0].render_delay_ms); | 2712 EXPECT_EQ(stats.render_delay_ms, info.receivers[0].render_delay_ms); |
2698 } | 2713 } |
2699 | 2714 |
2700 TEST_F(WebRtcVideoChannel2Test, GetStatsTranslatesReceivePacketStatsCorrectly) { | 2715 TEST_F(WebRtcVideoChannel2Test, GetStatsTranslatesReceivePacketStatsCorrectly) { |
(...skipping 686 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3387 // Ensures that the correct settings are applied to the codec when two temporal | 3402 // Ensures that the correct settings are applied to the codec when two temporal |
3388 // layer screencasting is enabled, and that the correct simulcast settings are | 3403 // layer screencasting is enabled, and that the correct simulcast settings are |
3389 // reapplied when disabling screencasting. | 3404 // reapplied when disabling screencasting. |
3390 TEST_F(WebRtcVideoChannel2SimulcastTest, | 3405 TEST_F(WebRtcVideoChannel2SimulcastTest, |
3391 DISABLED_TwoTemporalLayerScreencastSettings) { | 3406 DISABLED_TwoTemporalLayerScreencastSettings) { |
3392 // TODO(pbos): Implement. | 3407 // TODO(pbos): Implement. |
3393 FAIL() << "Not implemented."; | 3408 FAIL() << "Not implemented."; |
3394 } | 3409 } |
3395 | 3410 |
3396 } // namespace cricket | 3411 } // namespace cricket |
OLD | NEW |