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

Side by Side Diff: webrtc/media/base/videoengine_unittest.h

Issue 1898183002: Revert of Use initial bitrates for software VP8. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 4 years, 8 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 | « no previous file | webrtc/modules/video_coding/codecs/vp8/vp8_impl.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) 2014 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2014 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 1045 matching lines...) Expand 10 before | Expand all | Expand 10 after
1056 // Stream should already be deleted. 1056 // Stream should already be deleted.
1057 EXPECT_FALSE(channel_->RemoveSendStream(kSsrcs4[kSsrcsSize - 1])); 1057 EXPECT_FALSE(channel_->RemoveSendStream(kSsrcs4[kSsrcsSize - 1]));
1058 } 1058 }
1059 1059
1060 // Two streams one channel tests. 1060 // Two streams one channel tests.
1061 1061
1062 // Tests that we can send and receive frames. 1062 // Tests that we can send and receive frames.
1063 void TwoStreamsSendAndReceive(const cricket::VideoCodec& codec) { 1063 void TwoStreamsSendAndReceive(const cricket::VideoCodec& codec) {
1064 SetUpSecondStream(); 1064 SetUpSecondStream();
1065 // Test sending and receiving on first stream. 1065 // Test sending and receiving on first stream.
1066 EXPECT_TRUE(SetOneCodec(codec)); 1066 SendAndReceive(codec);
1067 EXPECT_TRUE(SetSend(true));
1068 EXPECT_TRUE(channel_->SetSink(kDefaultReceiveSsrc, &renderer_));
1069 EXPECT_EQ(0, renderer_.num_rendered_frames());
1070 EXPECT_TRUE(SendFrame());
1071 // Since multiple streams share this link we should be receiving smaller
1072 // initial frames (start at QVGA since shared bitrate is 150k each).
1073 EXPECT_FRAME_WAIT(1, codec.width / 2, codec.height / 2, kTimeout);
1074 std::unique_ptr<const rtc::CopyOnWriteBuffer> p(GetRtpPacket(0));
1075 EXPECT_EQ(codec.id, GetPayloadType(p.get()));
1076 // Test sending and receiving on second stream. 1067 // Test sending and receiving on second stream.
1077 EXPECT_EQ_WAIT(1, renderer2_.num_rendered_frames(), kTimeout); 1068 EXPECT_EQ_WAIT(1, renderer2_.num_rendered_frames(), kTimeout);
1078 EXPECT_GT(NumRtpPackets(), 0); 1069 EXPECT_GT(NumRtpPackets(), 0);
1079 EXPECT_EQ(1, renderer2_.num_rendered_frames()); 1070 EXPECT_EQ(1, renderer2_.num_rendered_frames());
1080 } 1071 }
1081 1072
1082 const std::unique_ptr<webrtc::Call> call_; 1073 const std::unique_ptr<webrtc::Call> call_;
1083 E engine_; 1074 E engine_;
1084 std::unique_ptr<cricket::FakeVideoCapturer> video_capturer_; 1075 std::unique_ptr<cricket::FakeVideoCapturer> video_capturer_;
1085 std::unique_ptr<cricket::FakeVideoCapturer> video_capturer_2_; 1076 std::unique_ptr<cricket::FakeVideoCapturer> video_capturer_2_;
1086 std::unique_ptr<C> channel_; 1077 std::unique_ptr<C> channel_;
1087 cricket::FakeNetworkInterface network_interface_; 1078 cricket::FakeNetworkInterface network_interface_;
1088 cricket::FakeVideoRenderer renderer_; 1079 cricket::FakeVideoRenderer renderer_;
1089 cricket::VideoMediaChannel::Error media_error_; 1080 cricket::VideoMediaChannel::Error media_error_;
1090 1081
1091 // Used by test cases where 2 streams are run on the same channel. 1082 // Used by test cases where 2 streams are run on the same channel.
1092 cricket::FakeVideoRenderer renderer2_; 1083 cricket::FakeVideoRenderer renderer2_;
1093 }; 1084 };
1094 1085
1095 #endif // WEBRTC_MEDIA_BASE_VIDEOENGINE_UNITTEST_H_ NOLINT 1086 #endif // WEBRTC_MEDIA_BASE_VIDEOENGINE_UNITTEST_H_ NOLINT
OLDNEW
« no previous file with comments | « no previous file | webrtc/modules/video_coding/codecs/vp8/vp8_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698