mirror of
https://github.com/mollyim/webrtc.git
synced 2025-05-14 06:10:40 +01:00

Before this change encoder switch was triggered only if encode() returns WEBRTC_VIDEO_CODEC_ENCODER_FAILURE. Android HW encoder wrapper never return this error code. It returns WEBRTC_VIDEO_CODEC_FALLBACK_SOFTWARE [1, 2] or WEBRTC_VIDEO_CODEC_ERROR [3]. Change value of WEBRTC_VIDEO_CODEC_TARGET_BITRATE_OVERSHOOT from -14 to 5 to avoid it to be interpreted as a critical error. [1] https://source.chromium.org/chromium/chromium/src/+/main:third_party/webrtc/sdk/android/src/jni/video_encoder_wrapper.cc;drc=c05a1be5b49f5c03b6955b05bcbf47609e1b0381;l=324 [2] https://source.chromium.org/chromium/chromium/src/+/main:third_party/webrtc/sdk/android/src/jni/video_encoder_wrapper.cc;drc=c05a1be5b49f5c03b6955b05bcbf47609e1b0381;l=335 [3] https://source.chromium.org/chromium/chromium/src/+/main:third_party/webrtc/sdk/android/src/jni/video_encoder_wrapper.cc;drc=c05a1be5b49f5c03b6955b05bcbf47609e1b0381;l=331 Bug: b/243402636 Change-Id: Iaf0129f3f9d71c07bb06804fe1f92a1f84f6da26 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/274402 Reviewed-by: Philip Eliasson <philipel@webrtc.org> Commit-Queue: Sergey Silkin <ssilkin@webrtc.org> Reviewed-by: Erik Språng <sprang@webrtc.org> Cr-Commit-Position: refs/heads/main@{#38060}
30 lines
1.1 KiB
C
30 lines
1.1 KiB
C
/*
|
|
* Copyright (c) 2011 The WebRTC project authors. All Rights Reserved.
|
|
*
|
|
* Use of this source code is governed by a BSD-style license
|
|
* that can be found in the LICENSE file in the root of the source
|
|
* tree. An additional intellectual property rights grant can be found
|
|
* in the file PATENTS. All contributing project authors may
|
|
* be found in the AUTHORS file in the root of the source tree.
|
|
*/
|
|
|
|
#ifndef MODULES_VIDEO_CODING_INCLUDE_VIDEO_ERROR_CODES_H_
|
|
#define MODULES_VIDEO_CODING_INCLUDE_VIDEO_ERROR_CODES_H_
|
|
|
|
// NOTE: in sync with video_coding_module_defines.h
|
|
|
|
// Define return values
|
|
|
|
#define WEBRTC_VIDEO_CODEC_TARGET_BITRATE_OVERSHOOT 5
|
|
#define WEBRTC_VIDEO_CODEC_OK_REQUEST_KEYFRAME 4
|
|
#define WEBRTC_VIDEO_CODEC_NO_OUTPUT 1
|
|
#define WEBRTC_VIDEO_CODEC_OK 0
|
|
#define WEBRTC_VIDEO_CODEC_ERROR -1
|
|
#define WEBRTC_VIDEO_CODEC_MEMORY -3
|
|
#define WEBRTC_VIDEO_CODEC_ERR_PARAMETER -4
|
|
#define WEBRTC_VIDEO_CODEC_UNINITIALIZED -7
|
|
#define WEBRTC_VIDEO_CODEC_FALLBACK_SOFTWARE -13
|
|
#define WEBRTC_VIDEO_CODEC_ERR_SIMULCAST_PARAMETERS_NOT_SUPPORTED -15
|
|
#define WEBRTC_VIDEO_CODEC_ENCODER_FAILURE -16
|
|
|
|
#endif // MODULES_VIDEO_CODING_INCLUDE_VIDEO_ERROR_CODES_H_
|