OLD | NEW |
1 /* | 1 /* |
2 * libjingle | 2 * libjingle |
3 * Copyright 2015 Google Inc. | 3 * Copyright 2015 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 158 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
169 | 169 |
170 void FakeVideoSendStream::SetStats( | 170 void FakeVideoSendStream::SetStats( |
171 const webrtc::VideoSendStream::Stats& stats) { | 171 const webrtc::VideoSendStream::Stats& stats) { |
172 stats_ = stats; | 172 stats_ = stats; |
173 } | 173 } |
174 | 174 |
175 webrtc::VideoSendStream::Stats FakeVideoSendStream::GetStats() { | 175 webrtc::VideoSendStream::Stats FakeVideoSendStream::GetStats() { |
176 return stats_; | 176 return stats_; |
177 } | 177 } |
178 | 178 |
179 bool FakeVideoSendStream::ReconfigureVideoEncoder( | 179 void FakeVideoSendStream::ReconfigureVideoEncoder( |
180 const webrtc::VideoEncoderConfig& config) { | 180 const webrtc::VideoEncoderConfig& config) { |
181 encoder_config_ = config; | 181 encoder_config_ = config; |
182 if (config.encoder_specific_settings != NULL) { | 182 if (config.encoder_specific_settings != NULL) { |
183 if (config_.encoder_settings.payload_name == "VP8") { | 183 if (config_.encoder_settings.payload_name == "VP8") { |
184 vpx_settings_.vp8 = *reinterpret_cast<const webrtc::VideoCodecVP8*>( | 184 vpx_settings_.vp8 = *reinterpret_cast<const webrtc::VideoCodecVP8*>( |
185 config.encoder_specific_settings); | 185 config.encoder_specific_settings); |
186 } else if (config_.encoder_settings.payload_name == "VP9") { | 186 } else if (config_.encoder_settings.payload_name == "VP9") { |
187 vpx_settings_.vp9 = *reinterpret_cast<const webrtc::VideoCodecVP9*>( | 187 vpx_settings_.vp9 = *reinterpret_cast<const webrtc::VideoCodecVP9*>( |
188 config.encoder_specific_settings); | 188 config.encoder_specific_settings); |
189 } else { | 189 } else { |
190 ADD_FAILURE() << "Unsupported encoder payload: " | 190 ADD_FAILURE() << "Unsupported encoder payload: " |
191 << config_.encoder_settings.payload_name; | 191 << config_.encoder_settings.payload_name; |
192 } | 192 } |
193 } | 193 } |
194 codec_settings_set_ = config.encoder_specific_settings != NULL; | 194 codec_settings_set_ = config.encoder_specific_settings != NULL; |
195 return true; | |
196 } | 195 } |
197 | 196 |
198 webrtc::VideoCaptureInput* FakeVideoSendStream::Input() { | 197 webrtc::VideoCaptureInput* FakeVideoSendStream::Input() { |
199 return this; | 198 return this; |
200 } | 199 } |
201 | 200 |
202 void FakeVideoSendStream::Start() { | 201 void FakeVideoSendStream::Start() { |
203 sending_ = true; | 202 sending_ = true; |
204 } | 203 } |
205 | 204 |
(...skipping 228 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
434 } | 433 } |
435 | 434 |
436 void FakeCall::SignalNetworkState(webrtc::NetworkState state) { | 435 void FakeCall::SignalNetworkState(webrtc::NetworkState state) { |
437 network_state_ = state; | 436 network_state_ = state; |
438 } | 437 } |
439 | 438 |
440 void FakeCall::OnSentPacket(const rtc::SentPacket& sent_packet) { | 439 void FakeCall::OnSentPacket(const rtc::SentPacket& sent_packet) { |
441 last_sent_packet_ = sent_packet; | 440 last_sent_packet_ = sent_packet; |
442 } | 441 } |
443 } // namespace cricket | 442 } // namespace cricket |
OLD | NEW |