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

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

Issue 2838133003: Implementation of new AecDump interface. (Closed)
Patch Set: Complete and tested AecDump implementation. 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_CAPTURE_STREAM_INFO_IMPL_H_
12 #define WEBRTC_MODULES_AUDIO_PROCESSING_AEC_DUMP_CAPTURE_STREAM_INFO_IMPL_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/include/aec_dump.h"
22 #include "webrtc/modules/include/module_common_types.h"
23
24 // Files generated at build-time by the protobuf compiler.
25 RTC_PUSH_IGNORING_WUNDEF()
26 #ifdef WEBRTC_ANDROID_PLATFORM_BUILD
27 #include "external/webrtc/webrtc/modules/audio_processing/debug.pb.h"
28 #else
29 #include "webrtc/modules/audio_processing/debug.pb.h"
30 #endif
31 RTC_POP_IGNORING_WUNDEF()
32
33 namespace webrtc {
34
35 // Optionally inherit from TaskQueue task.
36 class CaptureStreamInfoImpl final : public AecDump::CaptureStreamInfo {
37 public:
38 explicit CaptureStreamInfoImpl(std::unique_ptr<audioproc::Event> event);
39 ~CaptureStreamInfoImpl() override;
40 void AddInput(FloatAudioFrame src) override;
41 void AddOutput(FloatAudioFrame src) override;
42
43 void AddInput(const AudioFrame& frame) override;
44 void AddOutput(const AudioFrame& frame) override;
45
46 void set_delay(int delay) override;
47 void set_drift(int drift) override;
48 void set_level(int level) override;
49 void set_keypress(bool keypress) override;
50
51 std::unique_ptr<audioproc::Event> GetEventMsg() {
52 return std::unique_ptr<audioproc::Event>(event_.release());
53 }
54
55 private:
56 std::unique_ptr<audioproc::Event> event_;
57 };
58
59 } // namespace webrtc
60
61 #endif // WEBRTC_MODULES_AUDIO_PROCESSING_AEC_DUMP_CAPTURE_STREAM_INFO_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698