| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (c) 2016 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2016 The WebRTC project authors. All Rights Reserved. |
| 3 * | 3 * |
| 4 * Use of this source code is governed by a BSD-style license | 4 * Use of this source code is governed by a BSD-style license |
| 5 * that can be found in the LICENSE file in the root of the source | 5 * that can be found in the LICENSE file in the root of the source |
| 6 * tree. An additional intellectual property rights grant can be found | 6 * tree. An additional intellectual property rights grant can be found |
| 7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
| 8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
| 9 */ | 9 */ |
| 10 | 10 |
| 11 #ifndef WEBRTC_MODULES_VIDEO_CODING_UTILITY_IVF_FILE_WRITER_H_ | 11 #ifndef WEBRTC_MODULES_VIDEO_CODING_UTILITY_IVF_FILE_WRITER_H_ |
| 12 #define WEBRTC_MODULES_VIDEO_CODING_UTILITY_IVF_FILE_WRITER_H_ | 12 #define WEBRTC_MODULES_VIDEO_CODING_UTILITY_IVF_FILE_WRITER_H_ |
| 13 | 13 |
| 14 #include <memory> | 14 #include <memory> |
| 15 #include <string> | 15 #include <string> |
| 16 | 16 |
| 17 #include "webrtc/base/constructormagic.h" | |
| 18 #include "webrtc/base/file.h" | |
| 19 #include "webrtc/base/timeutils.h" | |
| 20 #include "webrtc/common_video/include/video_frame.h" | 17 #include "webrtc/common_video/include/video_frame.h" |
| 21 #include "webrtc/modules/include/module_common_types.h" | 18 #include "webrtc/modules/include/module_common_types.h" |
| 19 #include "webrtc/rtc_base/constructormagic.h" |
| 20 #include "webrtc/rtc_base/file.h" |
| 21 #include "webrtc/rtc_base/timeutils.h" |
| 22 | 22 |
| 23 namespace webrtc { | 23 namespace webrtc { |
| 24 | 24 |
| 25 class IvfFileWriter { | 25 class IvfFileWriter { |
| 26 public: | 26 public: |
| 27 // Takes ownership of the file, which will be closed either through | 27 // Takes ownership of the file, which will be closed either through |
| 28 // Close or ~IvfFileWriter. If writing a frame would take the file above the | 28 // Close or ~IvfFileWriter. If writing a frame would take the file above the |
| 29 // |byte_limit| the file will be closed, the write (and all future writes) | 29 // |byte_limit| the file will be closed, the write (and all future writes) |
| 30 // will fail. A |byte_limit| of 0 is equivalent to no limit. | 30 // will fail. A |byte_limit| of 0 is equivalent to no limit. |
| 31 static std::unique_ptr<IvfFileWriter> Wrap(rtc::File file, size_t byte_limit); | 31 static std::unique_ptr<IvfFileWriter> Wrap(rtc::File file, size_t byte_limit); |
| (...skipping 19 matching lines...) Expand all Loading... |
| 51 bool using_capture_timestamps_; | 51 bool using_capture_timestamps_; |
| 52 rtc::TimestampWrapAroundHandler wrap_handler_; | 52 rtc::TimestampWrapAroundHandler wrap_handler_; |
| 53 rtc::File file_; | 53 rtc::File file_; |
| 54 | 54 |
| 55 RTC_DISALLOW_COPY_AND_ASSIGN(IvfFileWriter); | 55 RTC_DISALLOW_COPY_AND_ASSIGN(IvfFileWriter); |
| 56 }; | 56 }; |
| 57 | 57 |
| 58 } // namespace webrtc | 58 } // namespace webrtc |
| 59 | 59 |
| 60 #endif // WEBRTC_MODULES_VIDEO_CODING_UTILITY_IVF_FILE_WRITER_H_ | 60 #endif // WEBRTC_MODULES_VIDEO_CODING_UTILITY_IVF_FILE_WRITER_H_ |
| OLD | NEW |