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

Side by Side Diff: webrtc/api/android/jni/androidmediaencoder_jni.cc

Issue 2508853002: Reland of Declare VideoCodec.codec_specific_info private (Closed)
Patch Set: Rebase Created 4 years, 1 month 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
« no previous file with comments | « no previous file | webrtc/common_types.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2015 The WebRTC project authors. All Rights Reserved. 2 * Copyright 2015 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 387 matching lines...) Expand 10 before | Expand all | Expand 10 after
398 if (sw_fallback_required_) { 398 if (sw_fallback_required_) {
399 return WEBRTC_VIDEO_CODEC_OK; 399 return WEBRTC_VIDEO_CODEC_OK;
400 } 400 }
401 codec_mode_ = codec_settings->mode; 401 codec_mode_ = codec_settings->mode;
402 int init_width = codec_settings->width; 402 int init_width = codec_settings->width;
403 int init_height = codec_settings->height; 403 int init_height = codec_settings->height;
404 // Scaling is disabled for VP9, but optionally enabled for VP8. 404 // Scaling is disabled for VP9, but optionally enabled for VP8.
405 // TODO(pbos): Extract automaticResizeOn out of VP8 settings. 405 // TODO(pbos): Extract automaticResizeOn out of VP8 settings.
406 scale_ = false; 406 scale_ = false;
407 if (codecType_ == kVideoCodecVP8) { 407 if (codecType_ == kVideoCodecVP8) {
408 scale_ = codec_settings->codecSpecific.VP8.automaticResizeOn; 408 scale_ = codec_settings->VP8().automaticResizeOn;
409 } else if (codecType_ != kVideoCodecVP9) { 409 } else if (codecType_ != kVideoCodecVP9) {
410 scale_ = true; 410 scale_ = true;
411 } 411 }
412 412
413 ALOGD << "InitEncode request: " << init_width << " x " << init_height; 413 ALOGD << "InitEncode request: " << init_width << " x " << init_height;
414 ALOGD << "Encoder automatic resize " << (scale_ ? "enabled" : "disabled"); 414 ALOGD << "Encoder automatic resize " << (scale_ ? "enabled" : "disabled");
415 415
416 if (scale_) { 416 if (scale_) {
417 if (codecType_ == kVideoCodecVP8 || codecType_ == kVideoCodecH264) { 417 if (codecType_ == kVideoCodecVP8 || codecType_ == kVideoCodecH264) {
418 quality_scaler_.Init(codecType_, codec_settings->startBitrate, 418 quality_scaler_.Init(codecType_, codec_settings->startBitrate,
(...skipping 953 matching lines...) Expand 10 before | Expand all | Expand 10 after
1372 return supported_codecs_; 1372 return supported_codecs_;
1373 } 1373 }
1374 1374
1375 void MediaCodecVideoEncoderFactory::DestroyVideoEncoder( 1375 void MediaCodecVideoEncoderFactory::DestroyVideoEncoder(
1376 webrtc::VideoEncoder* encoder) { 1376 webrtc::VideoEncoder* encoder) {
1377 ALOGD << "Destroy video encoder."; 1377 ALOGD << "Destroy video encoder.";
1378 delete encoder; 1378 delete encoder;
1379 } 1379 }
1380 1380
1381 } // namespace webrtc_jni 1381 } // namespace webrtc_jni
OLDNEW
« no previous file with comments | « no previous file | webrtc/common_types.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698