Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(89)

Side by Side Diff: webrtc/modules/video_coding/main/source/codec_database.cc

Issue 1315413002: Wire up currently-received video codec to stats. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: feedback Created 5 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « webrtc/modules/video_coding/main/interface/video_coding_defines.h ('k') | webrtc/video/end_to_end_tests.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698