Bump to WebRTC M120 release
Some API deprecation -- ExperimentalAgc and ExperimentalNs are gone. We're continuing to carry iSAC even though it's gone upstream, but maybe we'll want to drop that soon.
This commit is contained in:
@ -15,6 +15,8 @@
|
||||
#include <cstdio>
|
||||
#include <cstdlib>
|
||||
|
||||
#include "absl/strings/string_view.h"
|
||||
|
||||
#if defined(WEBRTC_ANDROID)
|
||||
#define RTC_LOG_TAG_ANDROID "rtc"
|
||||
#include <android/log.h> // NOLINT
|
||||
@ -36,6 +38,7 @@
|
||||
#include "rtc_base/checks.h"
|
||||
|
||||
namespace {
|
||||
|
||||
#if defined(__GNUC__)
|
||||
__attribute__((__format__(__printf__, 2, 3)))
|
||||
#endif
|
||||
@ -59,6 +62,30 @@ void AppendFormat(std::string* s, const char* fmt, ...) {
|
||||
namespace rtc {
|
||||
namespace webrtc_checks_impl {
|
||||
|
||||
#if !defined(WEBRTC_CHROMIUM_BUILD)
|
||||
RTC_NORETURN void WriteFatalLog(absl::string_view output) {
|
||||
#if defined(WEBRTC_ANDROID)
|
||||
std::string output_str(output);
|
||||
__android_log_print(ANDROID_LOG_ERROR, RTC_LOG_TAG_ANDROID, "%s\n",
|
||||
output_str.c_str());
|
||||
#endif
|
||||
fflush(stdout);
|
||||
fwrite(output.data(), output.size(), 1, stderr);
|
||||
fflush(stderr);
|
||||
#if defined(WEBRTC_WIN)
|
||||
DebugBreak();
|
||||
#endif
|
||||
abort();
|
||||
}
|
||||
|
||||
RTC_NORETURN void WriteFatalLog(const char* file,
|
||||
int line,
|
||||
absl::string_view output) {
|
||||
WriteFatalLog(output);
|
||||
}
|
||||
|
||||
#endif // !defined(WEBRTC_CHROMIUM_BUILD)
|
||||
|
||||
#if RTC_CHECK_MSG_ENABLED
|
||||
// Reads one argument from args, appends it to s and advances fmt.
|
||||
// Returns true iff an argument was sucessfully parsed.
|
||||
@ -149,19 +176,7 @@ RTC_NORETURN void FatalLog(const char* file,
|
||||
|
||||
va_end(args);
|
||||
|
||||
const char* output = s.c_str();
|
||||
|
||||
#if defined(WEBRTC_ANDROID)
|
||||
__android_log_print(ANDROID_LOG_ERROR, RTC_LOG_TAG_ANDROID, "%s\n", output);
|
||||
#endif
|
||||
|
||||
fflush(stdout);
|
||||
fprintf(stderr, "%s", output);
|
||||
fflush(stderr);
|
||||
#if defined(WEBRTC_WIN)
|
||||
DebugBreak();
|
||||
#endif
|
||||
abort();
|
||||
WriteFatalLog(file, line, s);
|
||||
}
|
||||
#else // RTC_CHECK_MSG_ENABLED
|
||||
RTC_NORETURN void FatalLog(const char* file, int line) {
|
||||
@ -174,22 +189,40 @@ RTC_NORETURN void FatalLog(const char* file, int line) {
|
||||
"# Check failed.\n"
|
||||
"# ",
|
||||
file, line, LAST_SYSTEM_ERROR);
|
||||
const char* output = s.c_str();
|
||||
|
||||
#if defined(WEBRTC_ANDROID)
|
||||
__android_log_print(ANDROID_LOG_ERROR, RTC_LOG_TAG_ANDROID, "%s\n", output);
|
||||
#endif
|
||||
|
||||
fflush(stdout);
|
||||
fprintf(stderr, "%s", output);
|
||||
fflush(stderr);
|
||||
#if defined(WEBRTC_WIN)
|
||||
DebugBreak();
|
||||
#endif
|
||||
abort();
|
||||
WriteFatalLog(file, line, s);
|
||||
}
|
||||
#endif // RTC_CHECK_MSG_ENABLED
|
||||
|
||||
#if RTC_DCHECK_IS_ON
|
||||
|
||||
RTC_NORETURN void UnreachableCodeReached(const char* file, int line) {
|
||||
std::string s;
|
||||
AppendFormat(&s,
|
||||
"\n\n"
|
||||
"#\n"
|
||||
"# Unreachable code reached: %s, line %d\n"
|
||||
"# last system error: %u\n"
|
||||
"# ",
|
||||
file, line, LAST_SYSTEM_ERROR);
|
||||
WriteFatalLog(file, line, s);
|
||||
}
|
||||
|
||||
#else // !RTC_DCHECK_IS_ON
|
||||
|
||||
RTC_NORETURN void UnreachableCodeReached() {
|
||||
std::string s;
|
||||
AppendFormat(&s,
|
||||
"\n\n"
|
||||
"#\n"
|
||||
"# Unreachable code reached (file and line unknown)\n"
|
||||
"# last system error: %u\n"
|
||||
"# ",
|
||||
LAST_SYSTEM_ERROR);
|
||||
WriteFatalLog(s);
|
||||
}
|
||||
|
||||
#endif // !RTC_DCHECK_IS_ON
|
||||
|
||||
} // namespace webrtc_checks_impl
|
||||
} // namespace rtc
|
||||
|
||||
|
Reference in New Issue
Block a user