Chromium Code Reviews| OLD | NEW |
|---|---|
| (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_CAPTURE_STREAM_INFO_H_ | |
| 12 #define WEBRTC_MODULES_AUDIO_PROCESSING_AEC_DUMP_CAPTURE_STREAM_INFO_H_ | |
| 13 | |
| 14 #include <memory> | |
| 15 #include <utility> | |
| 16 #include <vector> | |
| 17 | |
| 18 #include "webrtc/base/checks.h" | |
| 19 #include "webrtc/base/ignore_wundef.h" | |
| 20 #include "webrtc/base/logging.h" | |
| 21 #include "webrtc/modules/audio_processing/aec_dump/write_to_file_task.h" | |
| 22 #include "webrtc/modules/audio_processing/include/aec_dump.h" | |
| 23 #include "webrtc/modules/include/module_common_types.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 CaptureStreamInfo { | |
| 37 public: | |
| 38 explicit CaptureStreamInfo(std::unique_ptr<WriteToFileTask> task); | |
| 39 ~CaptureStreamInfo(); | |
| 40 void AddInput(const FloatAudioFrame& src); | |
| 41 void AddOutput(const FloatAudioFrame& src); | |
| 42 | |
| 43 void AddInput(const AudioFrame& frame); | |
| 44 void AddOutput(const AudioFrame& frame); | |
| 45 | |
| 46 void AddAudioProcessingState(const AudioProcessingState& state); | |
| 47 | |
| 48 std::unique_ptr<WriteToFileTask> GetTask() { | |
| 49 RTC_DCHECK(task_); | |
| 50 return std::move(task_); | |
| 51 } | |
| 52 | |
| 53 void SetTask(std::unique_ptr<WriteToFileTask> task) { | |
| 54 RTC_DCHECK(!task_); | |
|
peah-webrtc
2017/05/16 06:30:38
You probably should add
RTC_DCHECK(task);
as well
aleloi
2017/05/16 20:10:17
Done.
| |
| 55 task_ = std::move(task); | |
| 56 } | |
| 57 | |
| 58 private: | |
| 59 std::unique_ptr<WriteToFileTask> task_; | |
| 60 }; | |
| 61 | |
| 62 } // namespace webrtc | |
| 63 | |
| 64 #endif // WEBRTC_MODULES_AUDIO_PROCESSING_AEC_DUMP_CAPTURE_STREAM_INFO_H_ | |
| OLD | NEW |