webrtc/modules/video_coding/include/video_error_codes_utils.cc
Philipp Hancke a49e334141 IWYU modules/video_coding
using
  find modules/video_coding/ -name "*.h" -o -name "*.cc" | grep -v android | xargs tools_webrtc/iwyu/apply-include-cleaner
followed by
  tools_webrtc/gn_check_autofix.py -C out/Default/
and git cl format

H264 changes led to link failures so were reverted.

Manual changes required:
* added I420Buffer to test/testsupport/frame_reader.h
* modules/video_coding/codecs/vp8/libvpx_vp8_encoder.cc -- added VP8 constants
* modules/video_coding/codecs/vp9/test/vp9_impl_unittest.cc -- added uncompressed header parser
* modules/video_coding/codecs/vp9/libvpx_vp9_decoder.cc -- added vpx_encoder for VPX_DL_REALTIME
* modules/video_coding/video_receiver2_unittest.cc -- added video_coding_defines.h
* modules/video_coding/generic_decoder.cc -- same
* modules/video_coding/generic_decoder_unittest.cc -- same
* modules/video_coding/deprecated/jitter_buffer_unittest.cc -- added video_coding/encoded_frame.h
* media/engine/simulcast_encoder_adapter_unittest.cc -- added video_error_codes
* modules/video_coding/codecs/vp9/libvpx_vp9_decoder.cc -- same
* modules/video_coding/video_receiver2_unittest.cc -- same
* rtc_tools/video_replay.cc -- same
* test/video_codec_tester_unittest.cc -- same
* rtc_tools/video_encoder/video_encoder.cc -- same
* modules/video_coding/codecs/vp9/vp9_frame_buffer_pool.h -- moved around includes
* rtc_tools/DEPS: allowed include from video_coding:video_codec_interface
* modules/video_coding/codecs/av1/libaom_av1_encoder.cc -- expand full aom path

Additional changes resulting from moving VP9 defines and feedback.

BUG=webrtc:42226242

Change-Id: If7040e1cab93cf587f25ee8492604a7f7af9a573
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/381860
Commit-Queue: Philipp Hancke <phancke@meta.com>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#44345}
2025-04-09 23:33:14 -07:00

49 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 <cstdint>
#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