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

Side by Side Diff: webrtc/modules/utility/interface/file_recorder.h

Issue 1414793020: Remove interface directories kept to avoid breaking downstream. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 5 years, 1 month 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) 2012 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_UTILITY_INCLUDE_FILE_RECORDER_H_
12 #define WEBRTC_MODULES_UTILITY_INCLUDE_FILE_RECORDER_H_
13
14 #pragma message("WARNING: utility/interface is DEPRECATED; use utility/include")
15
16 #include "webrtc/common_types.h"
17 #include "webrtc/engine_configurations.h"
18 #include "webrtc/modules/include/module_common_types.h"
19 #include "webrtc/modules/media_file/include/media_file_defines.h"
20 #include "webrtc/system_wrappers/include/tick_util.h"
21 #include "webrtc/typedefs.h"
22 #include "webrtc/video_frame.h"
23
24 namespace webrtc {
25
26 class FileRecorder
27 {
28 public:
29
30 // Note: will return NULL for unsupported formats.
31 static FileRecorder* CreateFileRecorder(const uint32_t instanceID,
32 const FileFormats fileFormat);
33
34 static void DestroyFileRecorder(FileRecorder* recorder);
35
36 virtual int32_t RegisterModuleFileCallback(
37 FileCallback* callback) = 0;
38
39 virtual FileFormats RecordingFileFormat() const = 0;
40
41 virtual int32_t StartRecordingAudioFile(
42 const char* fileName,
43 const CodecInst& codecInst,
44 uint32_t notification) = 0;
45
46 virtual int32_t StartRecordingAudioFile(
47 OutStream& destStream,
48 const CodecInst& codecInst,
49 uint32_t notification) = 0;
50
51 // Stop recording.
52 // Note: this API is for both audio and video.
53 virtual int32_t StopRecording() = 0;
54
55 // Return true if recording.
56 // Note: this API is for both audio and video.
57 virtual bool IsRecording() const = 0;
58
59 virtual int32_t codec_info(CodecInst& codecInst) const = 0;
60
61 // Write frame to file. Frame should contain 10ms of un-ecoded audio data.
62 virtual int32_t RecordAudioToFile(
63 const AudioFrame& frame,
64 const TickTime* playoutTS = NULL) = 0;
65
66 // Open/create the file specified by fileName for writing audio/video data
67 // (relative path is allowed). audioCodecInst specifies the encoding of the
68 // audio data. videoCodecInst specifies the encoding of the video data.
69 // Only video data will be recorded if videoOnly is true. amrFormat
70 // specifies the amr/amrwb storage format.
71 // Note: the file format is AVI.
72 virtual int32_t StartRecordingVideoFile(
73 const char* fileName,
74 const CodecInst& audioCodecInst,
75 const VideoCodec& videoCodecInst,
76 bool videoOnly = false) = 0;
77
78 // Record the video frame in videoFrame to AVI file.
79 virtual int32_t RecordVideoToFile(const VideoFrame& videoFrame) = 0;
80
81 protected:
82 virtual ~FileRecorder() {}
83
84 };
85 } // namespace webrtc
86 #endif // WEBRTC_MODULES_UTILITY_INCLUDE_FILE_RECORDER_H_
OLDNEW
« no previous file with comments | « webrtc/modules/utility/interface/file_player.h ('k') | webrtc/modules/utility/interface/helpers_android.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698