Delete rtc::File, usage replaced with FileWrapper
Bug: webrtc:6463 Change-Id: Ia0767a2e6bbacc43e63c30ed3bd3edb10ff6e645 Reviewed-on: https://webrtc-review.googlesource.com/c/121943 Commit-Queue: Niels Moller <nisse@webrtc.org> Reviewed-by: Karl Wiberg <kwiberg@webrtc.org> Cr-Commit-Position: refs/heads/master@{#26613}
This commit is contained in:
@ -18,7 +18,7 @@
|
||||
#include "api/video/encoded_image.h"
|
||||
#include "common_types.h" // NOLINT(build/include)
|
||||
#include "rtc_base/constructor_magic.h"
|
||||
#include "rtc_base/file.h"
|
||||
#include "rtc_base/system/file_wrapper.h"
|
||||
#include "rtc_base/time_utils.h"
|
||||
|
||||
namespace webrtc {
|
||||
@ -29,14 +29,15 @@ class IvfFileWriter {
|
||||
// Close or ~IvfFileWriter. If writing a frame would take the file above the
|
||||
// |byte_limit| the file will be closed, the write (and all future writes)
|
||||
// will fail. A |byte_limit| of 0 is equivalent to no limit.
|
||||
static std::unique_ptr<IvfFileWriter> Wrap(rtc::File file, size_t byte_limit);
|
||||
static std::unique_ptr<IvfFileWriter> Wrap(FileWrapper file,
|
||||
size_t byte_limit);
|
||||
~IvfFileWriter();
|
||||
|
||||
bool WriteFrame(const EncodedImage& encoded_image, VideoCodecType codec_type);
|
||||
bool Close();
|
||||
|
||||
private:
|
||||
explicit IvfFileWriter(rtc::File file, size_t byte_limit);
|
||||
explicit IvfFileWriter(FileWrapper file, size_t byte_limit);
|
||||
|
||||
bool WriteHeader();
|
||||
bool InitFromFirstFrame(const EncodedImage& encoded_image,
|
||||
@ -51,7 +52,7 @@ class IvfFileWriter {
|
||||
int64_t last_timestamp_;
|
||||
bool using_capture_timestamps_;
|
||||
rtc::TimestampWrapAroundHandler wrap_handler_;
|
||||
rtc::File file_;
|
||||
FileWrapper file_;
|
||||
|
||||
RTC_DISALLOW_COPY_AND_ASSIGN(IvfFileWriter);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user