#include "rtc_tools/video_file_reader.h"
#include <cstdio>
#include <string>
#include <vector>
#include "absl/strings/match.h"
#include "absl/types/optional.h"
#include "api/make_ref_counted.h"
#include "api/video/i420_buffer.h"
#include "rtc_base/checks.h"
#include "rtc_base/logging.h"
#include "rtc_base/string_encode.h"
#include "rtc_base/string_to_number.h"
namespace webrtc {
namespace test {
namespace {
bool ReadBytes(uint8_t* dst, size_t n, FILE* file) { … }
class VideoFile : public Video { … };
}
Video::Iterator::Iterator(const rtc::scoped_refptr<const Video>& video,
size_t index)
: … { … }
Video::Iterator::Iterator(const Video::Iterator& other) = default;
Video::Iterator::Iterator(Video::Iterator&& other) = default;
Video::Iterator& Video::Iterator::operator=(Video::Iterator&&) = default;
Video::Iterator& Video::Iterator::operator=(const Video::Iterator&) = default;
Video::Iterator::~Iterator() = default;
rtc::scoped_refptr<I420BufferInterface> Video::Iterator::operator*() const { … }
bool Video::Iterator::operator==(const Video::Iterator& other) const { … }
bool Video::Iterator::operator!=(const Video::Iterator& other) const { … }
Video::Iterator Video::Iterator::operator++(int) { … }
Video::Iterator& Video::Iterator::operator++() { … }
Video::Iterator Video::begin() const { … }
Video::Iterator Video::end() const { … }
rtc::scoped_refptr<Video> OpenY4mFile(const std::string& file_name) { … }
rtc::scoped_refptr<Video> OpenYuvFile(const std::string& file_name,
int width,
int height) { … }
rtc::scoped_refptr<Video> OpenYuvOrY4mFile(const std::string& file_name,
int width,
int height) { … }
}
}