OLD | NEW |
---|---|
(Empty) | |
1 /* | |
2 * Copyright (c) 2016 The WebRTC project authors. All Rights Reserved. | |
3 * | |
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 | |
6 * tree. An additional intellectual property rights grant can be found | |
7 * in the file PATENTS. All contributing project authors may | |
8 * be found in the AUTHORS file in the root of the source tree. | |
9 */ | |
10 | |
11 #ifndef WEBRTC_MODULES_VIDEO_CODING_UTILITY_IVF_FILE_WRITER_H_ | |
12 #define WEBRTC_MODULES_VIDEO_CODING_UTILITY_IVF_FILE_WRITER_H_ | |
13 | |
14 #include <stdio.h> | |
15 #include <memory> | |
16 #include <string> | |
17 | |
18 #include "webrtc/base/constructormagic.h" | |
19 #include "webrtc/modules/include/module_common_types.h" | |
20 #include "webrtc/video_frame.h" | |
21 | |
22 namespace webrtc { | |
23 | |
24 class IvfFileWriter { | |
25 public: | |
26 ~IvfFileWriter(); | |
27 | |
28 static std::unique_ptr<IvfFileWriter> Open(const char* file_name, | |
29 RtpVideoCodecTypes codec_type); | |
30 bool WriteFrame(const EncodedImage& encoded_image); | |
31 bool Close(); | |
32 | |
33 private: | |
34 explicit IvfFileWriter(const char* file_name, FILE* file); | |
pbos-webrtc
2016/04/05 13:31:28
drop explicit
sprang_webrtc
2016/04/05 16:00:53
Done.
| |
35 bool SeekTo(size_t offset); | |
36 | |
37 size_t num_frames_; | |
38 const std::string file_name_; | |
39 FILE* file_; | |
40 | |
41 RTC_DISALLOW_COPY_AND_ASSIGN(IvfFileWriter); | |
42 }; | |
43 | |
44 } // namespace webrtc | |
45 | |
46 #endif // WEBRTC_MODULES_VIDEO_CODING_UTILITY_IVF_FILE_WRITER_H_ | |
OLD | NEW |