| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
#ifndef MODULES_AUDIO_PROCESSING_AEC3_FRAME_BLOCKER_H_ |
| 12 |
#define MODULES_AUDIO_PROCESSING_AEC3_FRAME_BLOCKER_H_ |
| 13 |
|
| 14 |
#include <stddef.h> |
| 15 |
|
| 16 |
#include <vector> |
| 17 |
|
| 18 |
#include "api/array_view.h" |
| 19 |
#include "modules/audio_processing/aec3/aec3_common.h" |
| 20 |
|
| 21 |
namespace webrtc { |
| 22 |
|
| 23 |
|
| 24 |
|
| 25 |
class FrameBlocker { |
| 26 |
public: |
| 27 |
FrameBlocker(size_t num_bands, size_t num_channels); |
| 28 |
~FrameBlocker(); |
| 29 |
FrameBlocker(const FrameBlocker&) = delete; |
| 30 |
FrameBlocker& operator=(const FrameBlocker&) = delete; |
| 31 |
|
| 32 |
|
| 33 |
|
| 34 |
void InsertSubFrameAndExtractBlock( |
| 35 |
const std::vector<std::vector<rtc::ArrayView<float>>>& sub_frame, |
| 36 |
std::vector<std::vector<std::vector<float>>>* block); |
| 37 |
|
| 38 |
|
| 39 |
bool IsBlockAvailable() const; |
| 40 |
|
| 41 |
void ExtractBlock(std::vector<std::vector<std::vector<float>>>* block); |
| 42 |
|
| 43 |
private: |
| 44 |
const size_t num_bands_; |
| 45 |
const size_t num_channels_; |
| 46 |
std::vector<std::vector<std::vector<float>>> buffer_; |
| 47 |
}; |
| 48 |
} |
| 49 |
|
| 50 |
#endif |