| 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 223 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 234 DeleteEncoder(); | 234 DeleteEncoder(); |
| 235 periodic_key_frames_ = false; | 235 periodic_key_frames_ = false; |
| 236 } | 236 } |
| 237 | 237 |
| 238 // Assuming only one registered encoder - since only one used, no need for more. | 238 // Assuming only one registered encoder - since only one used, no need for more. |
| 239 bool VCMCodecDataBase::SetSendCodec( | 239 bool VCMCodecDataBase::SetSendCodec( |
| 240 const VideoCodec* send_codec, | 240 const VideoCodec* send_codec, |
| 241 int number_of_cores, | 241 int number_of_cores, |
| 242 size_t max_payload_size, | 242 size_t max_payload_size, |
| 243 VCMEncodedFrameCallback* encoded_frame_callback) { | 243 VCMEncodedFrameCallback* encoded_frame_callback) { |
| 244 DCHECK(send_codec); | 244 RTC_DCHECK(send_codec); |
| 245 if (max_payload_size == 0) { | 245 if (max_payload_size == 0) { |
| 246 max_payload_size = kDefaultPayloadSize; | 246 max_payload_size = kDefaultPayloadSize; |
| 247 } | 247 } |
| 248 DCHECK_GE(number_of_cores, 1); | 248 RTC_DCHECK_GE(number_of_cores, 1); |
| 249 DCHECK_GE(send_codec->plType, 1); | 249 RTC_DCHECK_GE(send_codec->plType, 1); |
| 250 // Make sure the start bit rate is sane... | 250 // Make sure the start bit rate is sane... |
| 251 DCHECK_LE(send_codec->startBitrate, 1000000u); | 251 RTC_DCHECK_LE(send_codec->startBitrate, 1000000u); |
| 252 DCHECK(send_codec->codecType != kVideoCodecUnknown); | 252 RTC_DCHECK(send_codec->codecType != kVideoCodecUnknown); |
| 253 bool reset_required = pending_encoder_reset_; | 253 bool reset_required = pending_encoder_reset_; |
| 254 if (number_of_cores_ != number_of_cores) { | 254 if (number_of_cores_ != number_of_cores) { |
| 255 number_of_cores_ = number_of_cores; | 255 number_of_cores_ = number_of_cores; |
| 256 reset_required = true; | 256 reset_required = true; |
| 257 } | 257 } |
| 258 if (max_payload_size_ != max_payload_size) { | 258 if (max_payload_size_ != max_payload_size) { |
| 259 max_payload_size_ = max_payload_size; | 259 max_payload_size_ = max_payload_size; |
| 260 reset_required = true; | 260 reset_required = true; |
| 261 } | 261 } |
| 262 | 262 |
| (...skipping 468 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 731 | 731 |
| 732 const VCMExtDecoderMapItem* VCMCodecDataBase::FindExternalDecoderItem( | 732 const VCMExtDecoderMapItem* VCMCodecDataBase::FindExternalDecoderItem( |
| 733 uint8_t payload_type) const { | 733 uint8_t payload_type) const { |
| 734 ExternalDecoderMap::const_iterator it = dec_external_map_.find(payload_type); | 734 ExternalDecoderMap::const_iterator it = dec_external_map_.find(payload_type); |
| 735 if (it != dec_external_map_.end()) { | 735 if (it != dec_external_map_.end()) { |
| 736 return (*it).second; | 736 return (*it).second; |
| 737 } | 737 } |
| 738 return NULL; | 738 return NULL; |
| 739 } | 739 } |
| 740 } // namespace webrtc | 740 } // namespace webrtc |
| OLD | NEW |