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

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

Issue 2067103002: Avoid unnecessary HW video encoder reconfiguration (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: ReconfigureEncoderIfNecessary -> ReconfigureEncoder() Created 4 years, 6 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
« 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 398 matching lines...) Expand 10 before | Expand all | Expand 10 after
409 QualityScaler::Resolution res = quality_scaler_.GetScaledResolution(); 409 QualityScaler::Resolution res = quality_scaler_.GetScaledResolution();
410 init_width = res.width; 410 init_width = res.width;
411 init_height = res.height; 411 init_height = res.height;
412 ALOGD << "Scaled resolution: " << init_width << " x " << init_height; 412 ALOGD << "Scaled resolution: " << init_width << " x " << init_height;
413 } 413 }
414 414
415 return codec_thread_->Invoke<int32_t>( 415 return codec_thread_->Invoke<int32_t>(
416 RTC_FROM_HERE, 416 RTC_FROM_HERE,
417 Bind(&MediaCodecVideoEncoder::InitEncodeOnCodecThread, this, init_width, 417 Bind(&MediaCodecVideoEncoder::InitEncodeOnCodecThread, this, init_width,
418 init_height, codec_settings->startBitrate, 418 init_height, codec_settings->startBitrate,
419 codec_settings->maxFramerate, false /* use_surface */)); 419 codec_settings->maxFramerate,
420 codec_settings->expect_encode_from_texture));
420 } 421 }
421 422
422 int32_t MediaCodecVideoEncoder::Encode( 423 int32_t MediaCodecVideoEncoder::Encode(
423 const webrtc::VideoFrame& frame, 424 const webrtc::VideoFrame& frame,
424 const webrtc::CodecSpecificInfo* /* codec_specific_info */, 425 const webrtc::CodecSpecificInfo* /* codec_specific_info */,
425 const std::vector<webrtc::FrameType>* frame_types) { 426 const std::vector<webrtc::FrameType>* frame_types) {
426 return codec_thread_->Invoke<int32_t>( 427 return codec_thread_->Invoke<int32_t>(
427 RTC_FROM_HERE, Bind(&MediaCodecVideoEncoder::EncodeOnCodecThread, this, 428 RTC_FROM_HERE, Bind(&MediaCodecVideoEncoder::EncodeOnCodecThread, this,
428 frame, frame_types)); 429 frame, frame_types));
429 } 430 }
(...skipping 843 matching lines...) Expand 10 before | Expand all | Expand 10 after
1273 return supported_codecs_; 1274 return supported_codecs_;
1274 } 1275 }
1275 1276
1276 void MediaCodecVideoEncoderFactory::DestroyVideoEncoder( 1277 void MediaCodecVideoEncoderFactory::DestroyVideoEncoder(
1277 webrtc::VideoEncoder* encoder) { 1278 webrtc::VideoEncoder* encoder) {
1278 ALOGD << "Destroy video encoder."; 1279 ALOGD << "Destroy video encoder.";
1279 delete encoder; 1280 delete encoder;
1280 } 1281 }
1281 1282
1282 } // namespace webrtc_jni 1283 } // 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