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 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
135 | 135 |
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(engine_.CreateChannel( |
146 engine_.CreateChannel(call_.get(), cricket::VideoOptions())); | 146 call_.get(), cricket::MediaChannelOptions(), cricket::VideoOptions())); |
147 EXPECT_TRUE(channel_.get() != NULL); | 147 EXPECT_TRUE(channel_.get() != NULL); |
148 network_interface_.SetDestination(channel_.get()); | 148 network_interface_.SetDestination(channel_.get()); |
149 channel_->SetInterface(&network_interface_); | 149 channel_->SetInterface(&network_interface_); |
150 media_error_ = cricket::VideoMediaChannel::ERROR_NONE; | 150 media_error_ = cricket::VideoMediaChannel::ERROR_NONE; |
151 cricket::VideoRecvParameters parameters; | 151 cricket::VideoRecvParameters parameters; |
152 parameters.codecs = engine_.codecs(); | 152 parameters.codecs = engine_.codecs(); |
153 channel_->SetRecvParameters(parameters); | 153 channel_->SetRecvParameters(parameters); |
154 EXPECT_TRUE(channel_->AddSendStream(DefaultSendStreamParams())); | 154 EXPECT_TRUE(channel_->AddSendStream(DefaultSendStreamParams())); |
155 video_capturer_.reset(CreateFakeVideoCapturer()); | 155 video_capturer_.reset(CreateFakeVideoCapturer()); |
156 cricket::VideoFormat format(640, 480, | 156 cricket::VideoFormat format(640, 480, |
(...skipping 1164 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1321 rtc::scoped_ptr<C> channel_; | 1321 rtc::scoped_ptr<C> channel_; |
1322 cricket::FakeNetworkInterface network_interface_; | 1322 cricket::FakeNetworkInterface network_interface_; |
1323 cricket::FakeVideoRenderer renderer_; | 1323 cricket::FakeVideoRenderer renderer_; |
1324 cricket::VideoMediaChannel::Error media_error_; | 1324 cricket::VideoMediaChannel::Error media_error_; |
1325 | 1325 |
1326 // Used by test cases where 2 streams are run on the same channel. | 1326 // Used by test cases where 2 streams are run on the same channel. |
1327 cricket::FakeVideoRenderer renderer2_; | 1327 cricket::FakeVideoRenderer renderer2_; |
1328 }; | 1328 }; |
1329 | 1329 |
1330 #endif // TALK_MEDIA_BASE_VIDEOENGINE_UNITTEST_H_ NOLINT | 1330 #endif // TALK_MEDIA_BASE_VIDEOENGINE_UNITTEST_H_ NOLINT |
OLD | NEW |