| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (c) 2013 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2013 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 227 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 238 // Register an externally defined decoder/render object. | 238 // Register an externally defined decoder/render object. |
| 239 // Can be a decoder only or a decoder coupled with a renderer. | 239 // Can be a decoder only or a decoder coupled with a renderer. |
| 240 void VideoReceiver::RegisterExternalDecoder(VideoDecoder* externalDecoder, | 240 void VideoReceiver::RegisterExternalDecoder(VideoDecoder* externalDecoder, |
| 241 uint8_t payloadType, | 241 uint8_t payloadType, |
| 242 bool internalRenderTiming) { | 242 bool internalRenderTiming) { |
| 243 CriticalSectionScoped cs(_receiveCritSect); | 243 CriticalSectionScoped cs(_receiveCritSect); |
| 244 if (externalDecoder == NULL) { | 244 if (externalDecoder == NULL) { |
| 245 // Make sure the VCM updates the decoder next time it decodes. | 245 // Make sure the VCM updates the decoder next time it decodes. |
| 246 _decoder = NULL; | 246 _decoder = NULL; |
| 247 RTC_CHECK(_codecDataBase.DeregisterExternalDecoder(payloadType)); | 247 RTC_CHECK(_codecDataBase.DeregisterExternalDecoder(payloadType)); |
| 248 return; |
| 248 } | 249 } |
| 249 _codecDataBase.RegisterExternalDecoder(externalDecoder, payloadType, | 250 _codecDataBase.RegisterExternalDecoder(externalDecoder, payloadType, |
| 250 internalRenderTiming); | 251 internalRenderTiming); |
| 251 } | 252 } |
| 252 | 253 |
| 253 // Register a frame type request callback. | 254 // Register a frame type request callback. |
| 254 int32_t VideoReceiver::RegisterFrameTypeCallback( | 255 int32_t VideoReceiver::RegisterFrameTypeCallback( |
| 255 VCMFrameTypeCallback* frameTypeCallback) { | 256 VCMFrameTypeCallback* frameTypeCallback) { |
| 256 CriticalSectionScoped cs(process_crit_sect_.get()); | 257 CriticalSectionScoped cs(process_crit_sect_.get()); |
| 257 _frameTypeCallback = frameTypeCallback; | 258 _frameTypeCallback = frameTypeCallback; |
| (...skipping 308 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 566 } | 567 } |
| 567 | 568 |
| 568 void VideoReceiver::RegisterPreDecodeImageCallback( | 569 void VideoReceiver::RegisterPreDecodeImageCallback( |
| 569 EncodedImageCallback* observer) { | 570 EncodedImageCallback* observer) { |
| 570 CriticalSectionScoped cs(_receiveCritSect); | 571 CriticalSectionScoped cs(_receiveCritSect); |
| 571 pre_decode_image_callback_ = observer; | 572 pre_decode_image_callback_ = observer; |
| 572 } | 573 } |
| 573 | 574 |
| 574 } // namespace vcm | 575 } // namespace vcm |
| 575 } // namespace webrtc | 576 } // namespace webrtc |
| OLD | NEW |