OLD | NEW |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |