| 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 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 47 EncodedImageCallbackWrapper() | 47 EncodedImageCallbackWrapper() |
| 48 : cs_(CriticalSectionWrapper::CreateCriticalSection()), callback_(NULL) {} | 48 : cs_(CriticalSectionWrapper::CreateCriticalSection()), callback_(NULL) {} |
| 49 | 49 |
| 50 virtual ~EncodedImageCallbackWrapper() {} | 50 virtual ~EncodedImageCallbackWrapper() {} |
| 51 | 51 |
| 52 void Register(EncodedImageCallback* callback) { | 52 void Register(EncodedImageCallback* callback) { |
| 53 CriticalSectionScoped cs(cs_.get()); | 53 CriticalSectionScoped cs(cs_.get()); |
| 54 callback_ = callback; | 54 callback_ = callback; |
| 55 } | 55 } |
| 56 | 56 |
| 57 // TODO(andresp): Change to void as return value is ignored. | |
| 58 virtual int32_t Encoded(const EncodedImage& encoded_image, | 57 virtual int32_t Encoded(const EncodedImage& encoded_image, |
| 59 const CodecSpecificInfo* codec_specific_info, | 58 const CodecSpecificInfo* codec_specific_info, |
| 60 const RTPFragmentationHeader* fragmentation) { | 59 const RTPFragmentationHeader* fragmentation) { |
| 61 CriticalSectionScoped cs(cs_.get()); | 60 CriticalSectionScoped cs(cs_.get()); |
| 62 if (callback_) | 61 if (callback_) |
| 63 return callback_->Encoded(encoded_image, codec_specific_info, | 62 return callback_->Encoded(encoded_image, codec_specific_info, |
| 64 fragmentation); | 63 fragmentation); |
| 65 return 0; | 64 return 0; |
| 66 } | 65 } |
| 67 | 66 |
| (...skipping 270 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 338 NackSender* nack_sender, | 337 NackSender* nack_sender, |
| 339 KeyFrameRequestSender* keyframe_request_sender) { | 338 KeyFrameRequestSender* keyframe_request_sender) { |
| 340 assert(clock); | 339 assert(clock); |
| 341 assert(event_factory); | 340 assert(event_factory); |
| 342 return new VideoCodingModuleImpl(clock, event_factory, false, nullptr, | 341 return new VideoCodingModuleImpl(clock, event_factory, false, nullptr, |
| 343 nullptr, nack_sender, | 342 nullptr, nack_sender, |
| 344 keyframe_request_sender, nullptr); | 343 keyframe_request_sender, nullptr); |
| 345 } | 344 } |
| 346 | 345 |
| 347 } // namespace webrtc | 346 } // namespace webrtc |
| OLD | NEW |