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

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

Issue 2865113002: AecDump implementation. (Closed)
Patch Set: Removed extra build deps from dependent CL. 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/task_queue.h"
23 #include "webrtc/system_wrappers/include/file_wrapper.h"
24
25 // Files generated at build-time by the protobuf compiler.
26 RTC_PUSH_IGNORING_WUNDEF()
27 #ifdef WEBRTC_ANDROID_PLATFORM_BUILD
28 #include "external/webrtc/webrtc/modules/audio_processing/debug.pb.h"
29 #else
30 #include "webrtc/modules/audio_processing/debug.pb.h"
31 #endif
32 RTC_POP_IGNORING_WUNDEF()
33
34 namespace webrtc {
35
36 class WriteToFileTask : public rtc::QueuedTask {
37 public:
38 WriteToFileTask(webrtc::FileWrapper* debug_file,
39 int64_t* num_bytes_left_for_log);
40 ~WriteToFileTask() override;
41
42 audioproc::Event* GetEvent();
43
44 private:
45 bool IsRoomForNextEvent(size_t event_byte_size) const;
46
47 void UpdateBytesLeft(size_t event_byte_size);
48
49 bool Run() override;
50
51 webrtc::FileWrapper* debug_file_;
52 audioproc::Event event_;
53 int64_t* num_bytes_left_for_log_;
54 };
55
56 } // namespace webrtc
57
58 #endif // WEBRTC_MODULES_AUDIO_PROCESSING_AEC_DUMP_WRITE_TO_FILE_TASK_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698