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

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

Issue 2865113002: AecDump implementation. (Closed)
Patch Set: Clean up of impl code. 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 std::unique_ptr<audioproc::Event> event,
41 int64_t* num_bytes_left_for_log);
42 ~WriteToFileTask() override;
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 std::unique_ptr<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