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

Side by Side Diff: webrtc/modules/video_coding/codecs/vp8/vp8_impl.cc

Issue 1406903002: Expose codec implementation names in stats. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: fix rebase Created 5 years 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 283 matching lines...) Expand 10 before | Expand all | Expand 10 after
294 framerate, 294 framerate,
295 &configurations_[i]); 295 &configurations_[i]);
296 if (vpx_codec_enc_config_set(&encoders_[i], &configurations_[i])) { 296 if (vpx_codec_enc_config_set(&encoders_[i], &configurations_[i])) {
297 return WEBRTC_VIDEO_CODEC_ERROR; 297 return WEBRTC_VIDEO_CODEC_ERROR;
298 } 298 }
299 } 299 }
300 quality_scaler_.ReportFramerate(new_framerate); 300 quality_scaler_.ReportFramerate(new_framerate);
301 return WEBRTC_VIDEO_CODEC_OK; 301 return WEBRTC_VIDEO_CODEC_OK;
302 } 302 }
303 303
304 const char* VP8EncoderImpl::ImplementationName() const {
305 return "libvpx";
306 }
307
304 void VP8EncoderImpl::SetStreamState(bool send_stream, 308 void VP8EncoderImpl::SetStreamState(bool send_stream,
305 int stream_idx) { 309 int stream_idx) {
306 if (send_stream && !send_stream_[stream_idx]) { 310 if (send_stream && !send_stream_[stream_idx]) {
307 // Need a key frame if we have not sent this stream before. 311 // Need a key frame if we have not sent this stream before.
308 key_frame_request_[stream_idx] = true; 312 key_frame_request_[stream_idx] = true;
309 } 313 }
310 send_stream_[stream_idx] = send_stream; 314 send_stream_[stream_idx] = send_stream;
311 } 315 }
312 316
313 void VP8EncoderImpl::SetupTemporalLayers(int num_streams, 317 void VP8EncoderImpl::SetupTemporalLayers(int num_streams,
(...skipping 1077 matching lines...) Expand 10 before | Expand all | Expand 10 after
1391 if (ref_frame_ != NULL) { 1395 if (ref_frame_ != NULL) {
1392 vpx_img_free(&ref_frame_->img); 1396 vpx_img_free(&ref_frame_->img);
1393 delete ref_frame_; 1397 delete ref_frame_;
1394 ref_frame_ = NULL; 1398 ref_frame_ = NULL;
1395 } 1399 }
1396 buffer_pool_.Release(); 1400 buffer_pool_.Release();
1397 inited_ = false; 1401 inited_ = false;
1398 return WEBRTC_VIDEO_CODEC_OK; 1402 return WEBRTC_VIDEO_CODEC_OK;
1399 } 1403 }
1400 1404
1405 const char* VP8DecoderImpl::ImplementationName() const {
1406 return "libvpx";
1407 }
1408
1401 int VP8DecoderImpl::CopyReference(VP8DecoderImpl* copy) { 1409 int VP8DecoderImpl::CopyReference(VP8DecoderImpl* copy) {
1402 // The type of frame to copy should be set in ref_frame_->frame_type 1410 // The type of frame to copy should be set in ref_frame_->frame_type
1403 // before the call to this function. 1411 // before the call to this function.
1404 if (vpx_codec_control(decoder_, VP8_COPY_REFERENCE, ref_frame_) 1412 if (vpx_codec_control(decoder_, VP8_COPY_REFERENCE, ref_frame_)
1405 != VPX_CODEC_OK) { 1413 != VPX_CODEC_OK) {
1406 return -1; 1414 return -1;
1407 } 1415 }
1408 if (vpx_codec_control(copy->decoder_, VP8_SET_REFERENCE, ref_frame_) 1416 if (vpx_codec_control(copy->decoder_, VP8_SET_REFERENCE, ref_frame_)
1409 != VPX_CODEC_OK) { 1417 != VPX_CODEC_OK) {
1410 return -1; 1418 return -1;
1411 } 1419 }
1412 return 0; 1420 return 0;
1413 } 1421 }
1414 1422
1415 } // namespace webrtc 1423 } // namespace webrtc
OLDNEW
« no previous file with comments | « webrtc/modules/video_coding/codecs/vp8/vp8_impl.h ('k') | webrtc/modules/video_coding/codecs/vp9/vp9_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698