OLD | NEW |
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 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
77 virtual cricket::VideoCodec DefaultCodec() = 0; | 77 virtual cricket::VideoCodec DefaultCodec() = 0; |
78 | 78 |
79 virtual cricket::StreamParams DefaultSendStreamParams() { | 79 virtual cricket::StreamParams DefaultSendStreamParams() { |
80 return cricket::StreamParams::CreateLegacy(kSsrc); | 80 return cricket::StreamParams::CreateLegacy(kSsrc); |
81 } | 81 } |
82 | 82 |
83 virtual void SetUp() { | 83 virtual void SetUp() { |
84 engine_.Init(); | 84 engine_.Init(); |
85 channel_.reset(engine_.CreateChannel(call_.get(), cricket::MediaConfig(), | 85 channel_.reset(engine_.CreateChannel(call_.get(), cricket::MediaConfig(), |
86 cricket::VideoOptions())); | 86 cricket::VideoOptions())); |
87 channel_->OnReadyToSend(true); | |
88 EXPECT_TRUE(channel_.get() != NULL); | 87 EXPECT_TRUE(channel_.get() != NULL); |
89 network_interface_.SetDestination(channel_.get()); | 88 network_interface_.SetDestination(channel_.get()); |
90 channel_->SetInterface(&network_interface_); | 89 channel_->SetInterface(&network_interface_); |
91 media_error_ = cricket::VideoMediaChannel::ERROR_NONE; | 90 media_error_ = cricket::VideoMediaChannel::ERROR_NONE; |
92 cricket::VideoRecvParameters parameters; | 91 cricket::VideoRecvParameters parameters; |
93 parameters.codecs = engine_.codecs(); | 92 parameters.codecs = engine_.codecs(); |
94 channel_->SetRecvParameters(parameters); | 93 channel_->SetRecvParameters(parameters); |
95 EXPECT_TRUE(channel_->AddSendStream(DefaultSendStreamParams())); | 94 EXPECT_TRUE(channel_->AddSendStream(DefaultSendStreamParams())); |
96 video_capturer_.reset(CreateFakeVideoCapturer()); | 95 video_capturer_.reset(CreateFakeVideoCapturer()); |
97 cricket::VideoFormat format(640, 480, | 96 cricket::VideoFormat format(640, 480, |
(...skipping 842 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
940 std::unique_ptr<C> channel_; | 939 std::unique_ptr<C> channel_; |
941 cricket::FakeNetworkInterface network_interface_; | 940 cricket::FakeNetworkInterface network_interface_; |
942 cricket::FakeVideoRenderer renderer_; | 941 cricket::FakeVideoRenderer renderer_; |
943 cricket::VideoMediaChannel::Error media_error_; | 942 cricket::VideoMediaChannel::Error media_error_; |
944 | 943 |
945 // Used by test cases where 2 streams are run on the same channel. | 944 // Used by test cases where 2 streams are run on the same channel. |
946 cricket::FakeVideoRenderer renderer2_; | 945 cricket::FakeVideoRenderer renderer2_; |
947 }; | 946 }; |
948 | 947 |
949 #endif // WEBRTC_MEDIA_BASE_VIDEOENGINE_UNITTEST_H_ NOLINT | 948 #endif // WEBRTC_MEDIA_BASE_VIDEOENGINE_UNITTEST_H_ NOLINT |
OLD | NEW |