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

Unified Diff: webrtc/sdk/android/api/org/webrtc/MediaCodecVideoEncoder.java

Issue 2894643003: Force keyframe for Qualcomm HW VP8 Encoder on Android L as well, reduce forced keyframe interval on… (Closed)
Patch Set: set forced keyframe update time to 20s for M Created 3 years, 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/sdk/android/api/org/webrtc/MediaCodecVideoEncoder.java
diff --git a/webrtc/sdk/android/api/org/webrtc/MediaCodecVideoEncoder.java b/webrtc/sdk/android/api/org/webrtc/MediaCodecVideoEncoder.java
index b726860e8ec7f6337e5b2bbb55b574328c310863..dd7e9340d47ba99e5f92a9a266cf7a67be0a85e3 100644
--- a/webrtc/sdk/android/api/org/webrtc/MediaCodecVideoEncoder.java
+++ b/webrtc/sdk/android/api/org/webrtc/MediaCodecVideoEncoder.java
@@ -54,7 +54,8 @@ public class MediaCodecVideoEncoder {
// Amount of correction steps to reach correction maximum scale.
private static final int BITRATE_CORRECTION_STEPS = 20;
// Forced key frame interval - used to reduce color distortions on Qualcomm platform.
- private static final long QCOM_VP8_KEY_FRAME_INTERVAL_ANDROID_M_MS = 25000;
+ private static final long QCOM_VP8_KEY_FRAME_INTERVAL_ANDROID_L_MS = 15000;
+ private static final long QCOM_VP8_KEY_FRAME_INTERVAL_ANDROID_M_MS = 20000;
private static final long QCOM_VP8_KEY_FRAME_INTERVAL_ANDROID_N_MS = 15000;
// Active running encoder instance. Set in initEncode() (called from native code)
@@ -425,7 +426,10 @@ public class MediaCodecVideoEncoder {
lastKeyFrameMs = -1;
if (type == VideoCodecType.VIDEO_CODEC_VP8
&& properties.codecName.startsWith(qcomVp8HwProperties.codecPrefix)) {
- if (Build.VERSION.SDK_INT == Build.VERSION_CODES.M) {
+ if (Build.VERSION.SDK_INT == Build.VERSION_CODES.LOLLIPOP
+ || Build.VERSION.SDK_INT == Build.VERSION_CODES.LOLLIPOP_MR1) {
+ forcedKeyFrameMs = QCOM_VP8_KEY_FRAME_INTERVAL_ANDROID_L_MS;
+ } else if (Build.VERSION.SDK_INT == Build.VERSION_CODES.M) {
forcedKeyFrameMs = QCOM_VP8_KEY_FRAME_INTERVAL_ANDROID_M_MS;
} else if (Build.VERSION.SDK_INT > Build.VERSION_CODES.M) {
forcedKeyFrameMs = QCOM_VP8_KEY_FRAME_INTERVAL_ANDROID_N_MS;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698