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

Side by Side Diff: webrtc/modules/audio_processing/aec_dump/write_to_file_task.h

Issue 2838133003: Implementation of new AecDump interface. (Closed)
Patch Set: Changed CaptureStreamInfo behaviour. Created 3 years, 7 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) 2017 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_AUDIO_PROCESSING_AEC_DUMP_WRITE_TO_FILE_TASK_H_
12 #define WEBRTC_MODULES_AUDIO_PROCESSING_AEC_DUMP_WRITE_TO_FILE_TASK_H_
13
14 #include <memory>
15 #include <string>
16 #include <utility>
17
18 #include "webrtc/base/checks.h"
19 #include "webrtc/base/event.h"
20 #include "webrtc/base/ignore_wundef.h"
21 #include "webrtc/base/platform_file.h"
22 #include "webrtc/base/protobuf_utils.h"
23 #include "webrtc/base/task_queue.h"
24 #include "webrtc/system_wrappers/include/file_wrapper.h"
25
26 // Files generated at build-time by the protobuf compiler.
27 RTC_PUSH_IGNORING_WUNDEF()
28 #ifdef WEBRTC_ANDROID_PLATFORM_BUILD
29 #include "external/webrtc/webrtc/modules/audio_processing/debug.pb.h"
30 #else
31 #include "webrtc/modules/audio_processing/debug.pb.h"
32 #endif
33 RTC_POP_IGNORING_WUNDEF()
34
35 namespace webrtc {
36
37 class WriteToFileTask : public rtc::QueuedTask {
38 public:
39 WriteToFileTask(webrtc::FileWrapper* debug_file,
40 int64_t* num_bytes_left_for_log);
41 ~WriteToFileTask() override;
42
43 audioproc::Event* GetEvent();
44
45 private:
46 bool IsRoomForNextEvent(size_t event_byte_size) const;
47
48 void UpdateBytesLeft(size_t event_byte_size);
49
50 bool Run() override;
51
52 webrtc::FileWrapper* debug_file_;
53 audioproc::Event event_;
54 int64_t* num_bytes_left_for_log_;
55 };
56
57 } // namespace webrtc
58
59 #endif // WEBRTC_MODULES_AUDIO_PROCESSING_AEC_DUMP_WRITE_TO_FILE_TASK_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698