Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(502)

Side by Side Diff: webrtc/video/end_to_end_tests.cc

Issue 1972183004: Reland "Remove ViEEncoder::SetNetworkStatus" (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Fix bug in BitrateAllocator::Allocate(bitrate) Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « webrtc/modules/video_coding/video_sender_unittest.cc ('k') | webrtc/video/video_send_stream.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2013 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2013 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 #include <algorithm> 10 #include <algorithm>
(...skipping 3321 matching lines...) Expand 10 before | Expand all | Expand 10 after
3332 3332
3333 sender_transport.StopSending(); 3333 sender_transport.StopSending();
3334 3334
3335 DestroyStreams(); 3335 DestroyStreams();
3336 } 3336 }
3337 3337
3338 TEST_F(EndToEndTest, NewVideoSendStreamsRespectVideoNetworkDown) { 3338 TEST_F(EndToEndTest, NewVideoSendStreamsRespectVideoNetworkDown) {
3339 class UnusedEncoder : public test::FakeEncoder { 3339 class UnusedEncoder : public test::FakeEncoder {
3340 public: 3340 public:
3341 UnusedEncoder() : FakeEncoder(Clock::GetRealTimeClock()) {} 3341 UnusedEncoder() : FakeEncoder(Clock::GetRealTimeClock()) {}
3342
3343 int32_t InitEncode(const VideoCodec* config,
3344 int32_t number_of_cores,
3345 size_t max_payload_size) override {
3346 EXPECT_GT(config->startBitrate, 0u);
3347 return 0;
3348 }
3342 int32_t Encode(const VideoFrame& input_image, 3349 int32_t Encode(const VideoFrame& input_image,
3343 const CodecSpecificInfo* codec_specific_info, 3350 const CodecSpecificInfo* codec_specific_info,
3344 const std::vector<FrameType>* frame_types) override { 3351 const std::vector<FrameType>* frame_types) override {
3345 ADD_FAILURE() << "Unexpected frame encode."; 3352 ADD_FAILURE() << "Unexpected frame encode.";
3346 return test::FakeEncoder::Encode(input_image, codec_specific_info, 3353 return test::FakeEncoder::Encode(input_image, codec_specific_info,
3347 frame_types); 3354 frame_types);
3348 } 3355 }
3349 }; 3356 };
3350 3357
3351 UnusedEncoder unused_encoder; 3358 UnusedEncoder unused_encoder;
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after
3503 private: 3510 private:
3504 bool video_observed_; 3511 bool video_observed_;
3505 bool audio_observed_; 3512 bool audio_observed_;
3506 SequenceNumberUnwrapper unwrapper_; 3513 SequenceNumberUnwrapper unwrapper_;
3507 std::set<int64_t> received_packet_ids_; 3514 std::set<int64_t> received_packet_ids_;
3508 } test; 3515 } test;
3509 3516
3510 RunBaseTest(&test); 3517 RunBaseTest(&test);
3511 } 3518 }
3512 } // namespace webrtc 3519 } // namespace webrtc
OLDNEW
« no previous file with comments | « webrtc/modules/video_coding/video_sender_unittest.cc ('k') | webrtc/video/video_send_stream.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698