Chromium Code Reviews| Index: webrtc/modules/video_coding/utility/ivf_file_writer.h |
| diff --git a/webrtc/modules/video_coding/utility/ivf_file_writer.h b/webrtc/modules/video_coding/utility/ivf_file_writer.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..ef2e1e70339fe825ca9b73111691c586817d3a32 |
| --- /dev/null |
| +++ b/webrtc/modules/video_coding/utility/ivf_file_writer.h |
| @@ -0,0 +1,46 @@ |
| +/* |
| + * Copyright (c) 2016 The WebRTC project authors. All Rights Reserved. |
| + * |
| + * Use of this source code is governed by a BSD-style license |
| + * that can be found in the LICENSE file in the root of the source |
| + * tree. An additional intellectual property rights grant can be found |
| + * in the file PATENTS. All contributing project authors may |
| + * be found in the AUTHORS file in the root of the source tree. |
| + */ |
| + |
| +#ifndef WEBRTC_MODULES_VIDEO_CODING_UTILITY_IVF_FILE_WRITER_H_ |
| +#define WEBRTC_MODULES_VIDEO_CODING_UTILITY_IVF_FILE_WRITER_H_ |
| + |
| +#include <stdio.h> |
| +#include <memory> |
| +#include <string> |
| + |
| +#include "webrtc/base/constructormagic.h" |
| +#include "webrtc/modules/include/module_common_types.h" |
| +#include "webrtc/video_frame.h" |
| + |
| +namespace webrtc { |
| + |
| +class IvfFileWriter { |
| + public: |
| + ~IvfFileWriter(); |
| + |
| + static std::unique_ptr<IvfFileWriter> Open(const char* file_name, |
| + RtpVideoCodecTypes codec_type); |
| + bool WriteFrame(const EncodedImage& encoded_image); |
| + bool Close(); |
| + |
| + private: |
| + 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.
|
| + bool SeekTo(size_t offset); |
| + |
| + size_t num_frames_; |
| + const std::string file_name_; |
| + FILE* file_; |
| + |
| + RTC_DISALLOW_COPY_AND_ASSIGN(IvfFileWriter); |
| +}; |
| + |
| +} // namespace webrtc |
| + |
| +#endif // WEBRTC_MODULES_VIDEO_CODING_UTILITY_IVF_FILE_WRITER_H_ |