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

Side by Side Diff: webrtc/modules/video_coding/codecs/vp8/vp8_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) 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 942 matching lines...) Expand 10 before | Expand all | Expand 10 after
953 } 953 }
954 954
955 void VP8EncoderImpl::PopulateCodecSpecific( 955 void VP8EncoderImpl::PopulateCodecSpecific(
956 CodecSpecificInfo* codec_specific, 956 CodecSpecificInfo* codec_specific,
957 const vpx_codec_cx_pkt_t& pkt, 957 const vpx_codec_cx_pkt_t& pkt,
958 int stream_idx, 958 int stream_idx,
959 uint32_t timestamp, 959 uint32_t timestamp,
960 bool only_predicting_from_key_frame) { 960 bool only_predicting_from_key_frame) {
961 assert(codec_specific != NULL); 961 assert(codec_specific != NULL);
962 codec_specific->codecType = kVideoCodecVP8; 962 codec_specific->codecType = kVideoCodecVP8;
963 codec_specific->codec_name = ImplementationName();
963 CodecSpecificInfoVP8* vp8Info = &(codec_specific->codecSpecific.VP8); 964 CodecSpecificInfoVP8* vp8Info = &(codec_specific->codecSpecific.VP8);
964 vp8Info->pictureId = picture_id_[stream_idx]; 965 vp8Info->pictureId = picture_id_[stream_idx];
965 if (pkt.data.frame.flags & VPX_FRAME_IS_KEY) { 966 if (pkt.data.frame.flags & VPX_FRAME_IS_KEY) {
966 last_key_frame_picture_id_[stream_idx] = picture_id_[stream_idx]; 967 last_key_frame_picture_id_[stream_idx] = picture_id_[stream_idx];
967 } 968 }
968 vp8Info->simulcastIdx = stream_idx; 969 vp8Info->simulcastIdx = stream_idx;
969 vp8Info->keyIdx = kNoKeyIdx; // TODO(hlundin) populate this 970 vp8Info->keyIdx = kNoKeyIdx; // TODO(hlundin) populate this
970 vp8Info->nonReference = 971 vp8Info->nonReference =
971 (pkt.data.frame.flags & VPX_FRAME_IS_DROPPABLE) ? true : false; 972 (pkt.data.frame.flags & VPX_FRAME_IS_DROPPABLE) ? true : false;
972 bool base_layer_sync_point = (pkt.data.frame.flags & VPX_FRAME_IS_KEY) || 973 bool base_layer_sync_point = (pkt.data.frame.flags & VPX_FRAME_IS_KEY) ||
(...skipping 431 matching lines...) Expand 10 before | Expand all | Expand 10 after
1404 return -1; 1405 return -1;
1405 } 1406 }
1406 if (vpx_codec_control(copy->decoder_, VP8_SET_REFERENCE, ref_frame_) != 1407 if (vpx_codec_control(copy->decoder_, VP8_SET_REFERENCE, ref_frame_) !=
1407 VPX_CODEC_OK) { 1408 VPX_CODEC_OK) {
1408 return -1; 1409 return -1;
1409 } 1410 }
1410 return 0; 1411 return 0;
1411 } 1412 }
1412 1413
1413 } // namespace webrtc 1414 } // namespace webrtc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698