| 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 2454 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2465 stats.substreams[11].height = 90; | 2465 stats.substreams[11].height = 90; |
| 2466 stream->SetStats(stats); | 2466 stream->SetStats(stats); |
| 2467 | 2467 |
| 2468 cricket::VideoMediaInfo info; | 2468 cricket::VideoMediaInfo info; |
| 2469 ASSERT_TRUE(channel_->GetStats(&info)); | 2469 ASSERT_TRUE(channel_->GetStats(&info)); |
| 2470 ASSERT_EQ(1u, info.senders.size()); | 2470 ASSERT_EQ(1u, info.senders.size()); |
| 2471 EXPECT_EQ(123, info.senders[0].send_frame_width); | 2471 EXPECT_EQ(123, info.senders[0].send_frame_width); |
| 2472 EXPECT_EQ(90, info.senders[0].send_frame_height); | 2472 EXPECT_EQ(90, info.senders[0].send_frame_height); |
| 2473 } | 2473 } |
| 2474 | 2474 |
| 2475 TEST_F(WebRtcVideoChannel2Test, GetStatsReportsQpForUpperResolution) { |
| 2476 FakeVideoSendStream* stream = AddSendStream(); |
| 2477 webrtc::VideoSendStream::Stats stats; |
| 2478 stats.substreams[17].width = 320; |
| 2479 stats.substreams[17].height = 180; |
| 2480 stats.substreams[17].qp = 20; |
| 2481 stats.substreams[42].width = 1280; |
| 2482 stats.substreams[42].height = 720; |
| 2483 stats.substreams[42].qp = 21; |
| 2484 stats.substreams[11].width = 640; |
| 2485 stats.substreams[11].height = 360; |
| 2486 stats.substreams[11].qp = 22; |
| 2487 stream->SetStats(stats); |
| 2488 |
| 2489 cricket::VideoMediaInfo info; |
| 2490 ASSERT_TRUE(channel_->GetStats(&info)); |
| 2491 ASSERT_EQ(1u, info.senders.size()); |
| 2492 EXPECT_EQ(21, info.senders[0].qp); |
| 2493 } |
| 2494 |
| 2475 TEST_F(WebRtcVideoChannel2Test, GetStatsTracksAdaptationStats) { | 2495 TEST_F(WebRtcVideoChannel2Test, GetStatsTracksAdaptationStats) { |
| 2476 AddSendStream(cricket::CreateSimStreamParams("cname", MAKE_VECTOR(kSsrcs3))); | 2496 AddSendStream(cricket::CreateSimStreamParams("cname", MAKE_VECTOR(kSsrcs3))); |
| 2477 | 2497 |
| 2478 // Capture format VGA. | 2498 // Capture format VGA. |
| 2479 cricket::FakeVideoCapturer video_capturer_vga; | 2499 cricket::FakeVideoCapturer video_capturer_vga; |
| 2480 const std::vector<cricket::VideoFormat>* formats = | 2500 const std::vector<cricket::VideoFormat>* formats = |
| 2481 video_capturer_vga.GetSupportedFormats(); | 2501 video_capturer_vga.GetSupportedFormats(); |
| 2482 cricket::VideoFormat capture_format_vga = (*formats)[1]; | 2502 cricket::VideoFormat capture_format_vga = (*formats)[1]; |
| 2483 EXPECT_EQ(cricket::CS_RUNNING, video_capturer_vga.Start(capture_format_vga)); | 2503 EXPECT_EQ(cricket::CS_RUNNING, video_capturer_vga.Start(capture_format_vga)); |
| 2484 EXPECT_TRUE(channel_->SetCapturer(kSsrcs3[0], &video_capturer_vga)); | 2504 EXPECT_TRUE(channel_->SetCapturer(kSsrcs3[0], &video_capturer_vga)); |
| (...skipping 817 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3302 // Ensures that the correct settings are applied to the codec when two temporal | 3322 // Ensures that the correct settings are applied to the codec when two temporal |
| 3303 // layer screencasting is enabled, and that the correct simulcast settings are | 3323 // layer screencasting is enabled, and that the correct simulcast settings are |
| 3304 // reapplied when disabling screencasting. | 3324 // reapplied when disabling screencasting. |
| 3305 TEST_F(WebRtcVideoChannel2SimulcastTest, | 3325 TEST_F(WebRtcVideoChannel2SimulcastTest, |
| 3306 DISABLED_TwoTemporalLayerScreencastSettings) { | 3326 DISABLED_TwoTemporalLayerScreencastSettings) { |
| 3307 // TODO(pbos): Implement. | 3327 // TODO(pbos): Implement. |
| 3308 FAIL() << "Not implemented."; | 3328 FAIL() << "Not implemented."; |
| 3309 } | 3329 } |
| 3310 | 3330 |
| 3311 } // namespace cricket | 3331 } // namespace cricket |
| OLD | NEW |