| OLD | NEW |
| 1 /* | 1 /* |
| 2 * libjingle | 2 * libjingle |
| 3 * Copyright 2014 Google Inc. | 3 * Copyright 2014 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 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 136 virtual cricket::VideoCodec DefaultCodec() = 0; | 136 virtual cricket::VideoCodec DefaultCodec() = 0; |
| 137 | 137 |
| 138 virtual cricket::StreamParams DefaultSendStreamParams() { | 138 virtual cricket::StreamParams DefaultSendStreamParams() { |
| 139 return cricket::StreamParams::CreateLegacy(kSsrc); | 139 return cricket::StreamParams::CreateLegacy(kSsrc); |
| 140 } | 140 } |
| 141 | 141 |
| 142 virtual void SetUp() { | 142 virtual void SetUp() { |
| 143 cricket::Device device("test", "device"); | 143 cricket::Device device("test", "device"); |
| 144 engine_.Init(); | 144 engine_.Init(); |
| 145 channel_.reset( | 145 channel_.reset( |
| 146 engine_.CreateChannel(call_.get(), cricket::VideoOptions())); | 146 engine_.CreateChannel(call_.get(), |
| 147 cricket::MediaChannelOptions(), |
| 148 cricket::VideoOptions())); |
| 147 EXPECT_TRUE(channel_.get() != NULL); | 149 EXPECT_TRUE(channel_.get() != NULL); |
| 148 network_interface_.SetDestination(channel_.get()); | 150 network_interface_.SetDestination(channel_.get()); |
| 149 channel_->SetInterface(&network_interface_); | 151 channel_->SetInterface(&network_interface_); |
| 150 media_error_ = cricket::VideoMediaChannel::ERROR_NONE; | 152 media_error_ = cricket::VideoMediaChannel::ERROR_NONE; |
| 151 cricket::VideoRecvParameters parameters; | 153 cricket::VideoRecvParameters parameters; |
| 152 parameters.codecs = engine_.codecs(); | 154 parameters.codecs = engine_.codecs(); |
| 153 channel_->SetRecvParameters(parameters); | 155 channel_->SetRecvParameters(parameters); |
| 154 EXPECT_TRUE(channel_->AddSendStream(DefaultSendStreamParams())); | 156 EXPECT_TRUE(channel_->AddSendStream(DefaultSendStreamParams())); |
| 155 video_capturer_.reset(CreateFakeVideoCapturer()); | 157 video_capturer_.reset(CreateFakeVideoCapturer()); |
| 156 cricket::VideoFormat format(640, 480, | 158 cricket::VideoFormat format(640, 480, |
| (...skipping 1057 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1214 rtc::scoped_ptr<C> channel_; | 1216 rtc::scoped_ptr<C> channel_; |
| 1215 cricket::FakeNetworkInterface network_interface_; | 1217 cricket::FakeNetworkInterface network_interface_; |
| 1216 cricket::FakeVideoRenderer renderer_; | 1218 cricket::FakeVideoRenderer renderer_; |
| 1217 cricket::VideoMediaChannel::Error media_error_; | 1219 cricket::VideoMediaChannel::Error media_error_; |
| 1218 | 1220 |
| 1219 // Used by test cases where 2 streams are run on the same channel. | 1221 // Used by test cases where 2 streams are run on the same channel. |
| 1220 cricket::FakeVideoRenderer renderer2_; | 1222 cricket::FakeVideoRenderer renderer2_; |
| 1221 }; | 1223 }; |
| 1222 | 1224 |
| 1223 #endif // WEBRTC_MEDIA_BASE_VIDEOENGINE_UNITTEST_H_ NOLINT | 1225 #endif // WEBRTC_MEDIA_BASE_VIDEOENGINE_UNITTEST_H_ NOLINT |
| OLD | NEW |