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:
Arun Raghavan
2023-12-12 10:42:58 -05:00
parent 9a202fb8c2
commit c6abf6cd3f
479 changed files with 20900 additions and 11996 deletions

View File

@ -12,11 +12,14 @@
#define RTC_BASE_SYSTEM_FILE_WRAPPER_H_
#include <stddef.h>
#include <stdint.h>
#include <stdio.h>
#include <stdint.h>
#include <string>
#include "absl/strings/string_view.h"
// Implementation that can read (exclusive) or write from/to a file.
namespace webrtc {
@ -33,20 +36,16 @@ class FileWrapper final {
public:
// Opens a file, in read or write mode. Use the is_open() method on the
// returned object to check if the open operation was successful. On failure,
// and if |error| is non-null, the system errno value is stored at |*error|.
// and if `error` is non-null, the system errno value is stored at |*error|.
// The file is closed by the destructor.
static FileWrapper OpenReadOnly(const char* file_name_utf8);
static FileWrapper OpenReadOnly(const std::string& file_name_utf8);
static FileWrapper OpenWriteOnly(const char* file_name_utf8,
int* error = nullptr);
static FileWrapper OpenWriteOnly(const std::string& file_name_utf8,
static FileWrapper OpenReadOnly(absl::string_view file_name_utf8);
static FileWrapper OpenWriteOnly(absl::string_view file_name_utf8,
int* error = nullptr);
FileWrapper() = default;
// Takes over ownership of |file|, closing it on destruction. Calling with
// null |file| is allowed, and results in a FileWrapper with is_open() false.
// Takes over ownership of `file`, closing it on destruction. Calling with
// null `file` is allowed, and results in a FileWrapper with is_open() false.
explicit FileWrapper(FILE* file) : file_(file) {}
~FileWrapper() { Close(); }
@ -88,6 +87,11 @@ class FileWrapper final {
// Seek to given position.
bool SeekTo(int64_t position);
// Returns the file size or -1 if a size could not be determined.
// (A file size might not exists for non-seekable files or file-like
// objects, for example /dev/tty on unix.)
long FileSize();
// Returns number of bytes read. Short count indicates EOF or error.
size_t Read(void* buf, size_t length);