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

Side by Side Diff: webrtc/modules/video_coding/codecs/vp9/vp9_impl.cc

Issue 2253563002: Add codec name to CodecSpecificInfo and get the codec name stats from there instead. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Fix fake_encoder.cc Created 4 years, 4 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) 2014 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2014 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 542 matching lines...) Expand 10 before | Expand all | Expand 10 after
553 timestamp_ += duration; 553 timestamp_ += duration;
554 554
555 return WEBRTC_VIDEO_CODEC_OK; 555 return WEBRTC_VIDEO_CODEC_OK;
556 } 556 }
557 557
558 void VP9EncoderImpl::PopulateCodecSpecific(CodecSpecificInfo* codec_specific, 558 void VP9EncoderImpl::PopulateCodecSpecific(CodecSpecificInfo* codec_specific,
559 const vpx_codec_cx_pkt& pkt, 559 const vpx_codec_cx_pkt& pkt,
560 uint32_t timestamp) { 560 uint32_t timestamp) {
561 assert(codec_specific != NULL); 561 assert(codec_specific != NULL);
562 codec_specific->codecType = kVideoCodecVP9; 562 codec_specific->codecType = kVideoCodecVP9;
563 codec_specific->codec_name = ImplementationName();
563 CodecSpecificInfoVP9* vp9_info = &(codec_specific->codecSpecific.VP9); 564 CodecSpecificInfoVP9* vp9_info = &(codec_specific->codecSpecific.VP9);
564 // TODO(asapersson): Set correct value. 565 // TODO(asapersson): Set correct value.
565 vp9_info->inter_pic_predicted = 566 vp9_info->inter_pic_predicted =
566 (pkt.data.frame.flags & VPX_FRAME_IS_KEY) ? false : true; 567 (pkt.data.frame.flags & VPX_FRAME_IS_KEY) ? false : true;
567 vp9_info->flexible_mode = codec_.codecSpecific.VP9.flexibleMode; 568 vp9_info->flexible_mode = codec_.codecSpecific.VP9.flexibleMode;
568 vp9_info->ss_data_available = ((pkt.data.frame.flags & VPX_FRAME_IS_KEY) && 569 vp9_info->ss_data_available = ((pkt.data.frame.flags & VPX_FRAME_IS_KEY) &&
569 !codec_.codecSpecific.VP9.flexibleMode) 570 !codec_.codecSpecific.VP9.flexibleMode)
570 ? true 571 ? true
571 : false; 572 : false;
572 573
(...skipping 419 matching lines...) Expand 10 before | Expand all | Expand 10 after
992 frame_buffer_pool_.ClearPool(); 993 frame_buffer_pool_.ClearPool();
993 inited_ = false; 994 inited_ = false;
994 return WEBRTC_VIDEO_CODEC_OK; 995 return WEBRTC_VIDEO_CODEC_OK;
995 } 996 }
996 997
997 const char* VP9DecoderImpl::ImplementationName() const { 998 const char* VP9DecoderImpl::ImplementationName() const {
998 return "libvpx"; 999 return "libvpx";
999 } 1000 }
1000 1001
1001 } // namespace webrtc 1002 } // namespace webrtc
OLDNEW
« no previous file with comments | « webrtc/modules/video_coding/codecs/vp8/vp8_impl.cc ('k') | webrtc/modules/video_coding/generic_encoder.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698