Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(212)

Side by Side Diff: webrtc/modules/video_coding/utility/ivf_file_writer.h

Issue 1853813002: Add support for writing raw encoder output to .ivf files. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Moved file recording to ViEEncoder Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(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_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698