webrtc/modules/video_coding/include/video_error_codes_utils.cc
henrika 414c94290a Reland "Extends WebRTC logs for software encoder fallback"
This is a reland of commit 050ffefd85

Original change's description:
> Extends WebRTC logs for software encoder fallback
>
> This CL extends logging related to HW->SW fallbacks on the encoder
> side in WebRTC. The goal is to make it easier to track down the
> different steps taken when setting up the video encoder and why/when
> HW encoding fails.
>
> Current logs are added on several lines which makes regexp searching
> difficult. This CL adds all related information on one line instead.
>
> Three new search tags are also added VSE (VideoStreamEncoder), VESFW
> (VideoEncoderSoftwareFallbackWrapper) and SEA (SimulcastEncoderAdapter). The idea is to allow searching for the tags to see correlated logs.
>
> It has been verified that these added logs also show up in WebRTC
> logs in Meet.
>
> Logs from the GPU process are not included due to the sandboxed
> nature which makes it much more complex to add to the native
> WebRTC log. I think that these simple logs will provide value as is.
>
> Example: https://gist.github.com/henrik-and/41946f7f0b10774241bd14d7687f770b
>
> Bug: b/322132132
> Change-Id: Iec58c9741a9dd6bab3236a88e9a6e45440f5d980
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/339260
> Commit-Queue: Henrik Andreassson <henrika@webrtc.org>
> Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
> Reviewed-by: Henrik Boström <hbos@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#41733}

NOTRY=true

Bug: b/322132132
Change-Id: I25dd34b9ba59ea8502e47b4c89cd111430636e08
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/339680
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Henrik Andreassson <henrika@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41736}
2024-02-14 17:15:29 +00:00

46 lines
1.8 KiB
C++

/*
* Copyright (c) 2024 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.
*/
#include "modules/video_coding/include/video_error_codes_utils.h"
#include "modules/video_coding/include/video_error_codes.h"
namespace webrtc {
const char* WebRtcVideoCodecErrorToString(int32_t error_code) {
switch (error_code) {
case WEBRTC_VIDEO_CODEC_TARGET_BITRATE_OVERSHOOT:
return "WEBRTC_VIDEO_CODEC_TARGET_BITRATE_OVERSHOOT";
case WEBRTC_VIDEO_CODEC_OK_REQUEST_KEYFRAME:
return "WEBRTC_VIDEO_CODEC_OK_REQUEST_KEYFRAME";
case WEBRTC_VIDEO_CODEC_NO_OUTPUT:
return "WEBRTC_VIDEO_CODEC_NO_OUTPUT";
case WEBRTC_VIDEO_CODEC_ERROR:
return "WEBRTC_VIDEO_CODEC_ERROR";
case WEBRTC_VIDEO_CODEC_MEMORY:
return "WEBRTC_VIDEO_CODEC_MEMORY";
case WEBRTC_VIDEO_CODEC_ERR_PARAMETER:
return "WEBRTC_VIDEO_CODEC_ERR_PARAMETER";
case WEBRTC_VIDEO_CODEC_TIMEOUT:
return "WEBRTC_VIDEO_CODEC_TIMEOUT";
case WEBRTC_VIDEO_CODEC_UNINITIALIZED:
return "WEBRTC_VIDEO_CODEC_UNINITIALIZED";
case WEBRTC_VIDEO_CODEC_FALLBACK_SOFTWARE:
return "WEBRTC_VIDEO_CODEC_FALLBACK_SOFTWARE";
case WEBRTC_VIDEO_CODEC_ERR_SIMULCAST_PARAMETERS_NOT_SUPPORTED:
return "WEBRTC_VIDEO_CODEC_ERR_SIMULCAST_PARAMETERS_NOT_SUPPORTED";
case WEBRTC_VIDEO_CODEC_ENCODER_FAILURE:
return "WEBRTC_VIDEO_CODEC_ENCODER_FAILURE";
default:
return "WEBRTC_VIDEO_CODEC_UNKNOWN";
}
}
} // namespace webrtc