| 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 563 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 574 if (ptr_decoder_) { | 574 if (ptr_decoder_) { |
| 575 ReleaseDecoder(ptr_decoder_); | 575 ReleaseDecoder(ptr_decoder_); |
| 576 ptr_decoder_ = NULL; | 576 ptr_decoder_ = NULL; |
| 577 memset(&receive_codec_, 0, sizeof(VideoCodec)); | 577 memset(&receive_codec_, 0, sizeof(VideoCodec)); |
| 578 } | 578 } |
| 579 ptr_decoder_ = CreateAndInitDecoder(payload_type, &receive_codec_); | 579 ptr_decoder_ = CreateAndInitDecoder(payload_type, &receive_codec_); |
| 580 if (!ptr_decoder_) { | 580 if (!ptr_decoder_) { |
| 581 return NULL; | 581 return NULL; |
| 582 } | 582 } |
| 583 VCMReceiveCallback* callback = decoded_frame_callback->UserReceiveCallback(); | 583 VCMReceiveCallback* callback = decoded_frame_callback->UserReceiveCallback(); |
| 584 if (callback) callback->IncomingCodecChanged(receive_codec_); | 584 if (callback) callback->OnIncomingPayloadType(receive_codec_.plType); |
| 585 if (ptr_decoder_->RegisterDecodeCompleteCallback(decoded_frame_callback) | 585 if (ptr_decoder_->RegisterDecodeCompleteCallback(decoded_frame_callback) |
| 586 < 0) { | 586 < 0) { |
| 587 ReleaseDecoder(ptr_decoder_); | 587 ReleaseDecoder(ptr_decoder_); |
| 588 ptr_decoder_ = NULL; | 588 ptr_decoder_ = NULL; |
| 589 memset(&receive_codec_, 0, sizeof(VideoCodec)); | 589 memset(&receive_codec_, 0, sizeof(VideoCodec)); |
| 590 return NULL; | 590 return NULL; |
| 591 } | 591 } |
| 592 return ptr_decoder_; | 592 return ptr_decoder_; |
| 593 } | 593 } |
| 594 | 594 |
| (...skipping 136 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 |