OLD | NEW |
---|---|
1 /* | 1 /* |
2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2012 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 291 matching lines...) Loading... | |
302 void TriggerDecoderShutdown() override { receiver_.TriggerDecoderShutdown(); } | 302 void TriggerDecoderShutdown() override { receiver_.TriggerDecoderShutdown(); } |
303 | 303 |
304 private: | 304 private: |
305 EncodedImageCallbackWrapper post_encode_callback_; | 305 EncodedImageCallbackWrapper post_encode_callback_; |
306 vcm::VideoSender sender_; | 306 vcm::VideoSender sender_; |
307 vcm::VideoReceiver receiver_; | 307 vcm::VideoReceiver receiver_; |
308 rtc::scoped_ptr<EventFactory> own_event_factory_; | 308 rtc::scoped_ptr<EventFactory> own_event_factory_; |
309 }; | 309 }; |
310 } // namespace | 310 } // namespace |
311 | 311 |
312 uint8_t VideoCodingModule::NumberOfCodecs() { | |
313 return VCMCodecDataBase::NumberOfCodecs(); | |
314 } | |
315 | |
316 int32_t VideoCodingModule::Codec(uint8_t listId, VideoCodec* codec) { | |
317 if (codec == NULL) { | |
318 return VCM_PARAMETER_ERROR; | |
319 } | |
320 return VCMCodecDataBase::Codec(listId, codec) ? 0 : -1; | |
321 } | |
322 | |
323 int32_t VideoCodingModule::Codec(VideoCodecType codecType, VideoCodec* codec) { | 312 int32_t VideoCodingModule::Codec(VideoCodecType codecType, VideoCodec* codec) { |
mflodman
2015/11/24 10:14:36
Add TODO() Make void.
| |
324 if (codec == NULL) { | 313 VCMCodecDataBase::Codec(codecType, codec); |
325 return VCM_PARAMETER_ERROR; | 314 return 0; |
326 } | |
327 return VCMCodecDataBase::Codec(codecType, codec) ? 0 : -1; | |
328 } | 315 } |
329 | 316 |
330 VideoCodingModule* VideoCodingModule::Create( | 317 VideoCodingModule* VideoCodingModule::Create( |
331 Clock* clock, | 318 Clock* clock, |
332 VideoEncoderRateObserver* encoder_rate_observer, | 319 VideoEncoderRateObserver* encoder_rate_observer, |
333 VCMQMSettingsCallback* qm_settings_callback) { | 320 VCMQMSettingsCallback* qm_settings_callback) { |
334 return new VideoCodingModuleImpl(clock, new EventFactoryImpl, true, | 321 return new VideoCodingModuleImpl(clock, new EventFactoryImpl, true, |
335 encoder_rate_observer, qm_settings_callback); | 322 encoder_rate_observer, qm_settings_callback); |
336 } | 323 } |
337 | 324 |
338 VideoCodingModule* VideoCodingModule::Create( | 325 VideoCodingModule* VideoCodingModule::Create( |
339 Clock* clock, | 326 Clock* clock, |
340 EventFactory* event_factory) { | 327 EventFactory* event_factory) { |
341 assert(clock); | 328 assert(clock); |
342 assert(event_factory); | 329 assert(event_factory); |
343 return new VideoCodingModuleImpl(clock, event_factory, false, nullptr, | 330 return new VideoCodingModuleImpl(clock, event_factory, false, nullptr, |
344 nullptr); | 331 nullptr); |
345 } | 332 } |
346 | 333 |
347 void VideoCodingModule::Destroy(VideoCodingModule* module) { | 334 void VideoCodingModule::Destroy(VideoCodingModule* module) { |
348 if (module != NULL) { | 335 if (module != NULL) { |
349 delete static_cast<VideoCodingModuleImpl*>(module); | 336 delete static_cast<VideoCodingModuleImpl*>(module); |
350 } | 337 } |
351 } | 338 } |
352 } // namespace webrtc | 339 } // namespace webrtc |
OLD | NEW |