Index: webrtc/modules/audio_processing/echo_detector/echo_detector.h |
diff --git a/webrtc/test/fuzzers/sdp_parser_fuzzer.cc b/webrtc/modules/audio_processing/echo_detector/echo_detector.h |
similarity index 51% |
copy from webrtc/test/fuzzers/sdp_parser_fuzzer.cc |
copy to webrtc/modules/audio_processing/echo_detector/echo_detector.h |
index f21c991a3e1da9983514f636400e22cf9c989c9d..46ca138d1dc0ae81ec970d50f384f5d381a52a90 100644 |
--- a/webrtc/test/fuzzers/sdp_parser_fuzzer.cc |
+++ b/webrtc/modules/audio_processing/echo_detector/echo_detector.h |
@@ -8,18 +8,25 @@ |
* be found in the AUTHORS file in the root of the source tree. |
*/ |
-#include <stddef.h> |
-#include <stdint.h> |
+#ifndef WEBRTC_MODULES_AUDIO_PROCESSING_ECHO_DETECTOR_ECHO_DETECTOR_H_ |
+#define WEBRTC_MODULES_AUDIO_PROCESSING_ECHO_DETECTOR_ECHO_DETECTOR_H_ |
-#include "webrtc/api/jsepsessiondescription.h" |
+#include <stddef.h> |
hlundin-webrtc
2016/10/13 11:45:20
Do you need stddef.h here?
ivoc
2016/10/13 13:46:15
I got an error about size_t being undefined, that'
hlundin-webrtc
2016/10/14 06:59:17
Ah, yes, size_t...
|
namespace webrtc { |
-void FuzzOneInput(const uint8_t* data, size_t size) { |
- std::string message(reinterpret_cast<const char*>(data), size); |
- webrtc::SdpParseError error; |
- std::unique_ptr<webrtc::SessionDescriptionInterface> sdp( |
- CreateSessionDescription("offer", message, &error)); |
-} |
+class EchoDetector { |
+ public: |
+ EchoDetector() {} |
+ ~EchoDetector() {} |
+ |
+ void BufferFarend(const float* farend, size_t nrOfSamples); |
hlundin-webrtc
2016/10/13 11:45:20
nr_of_samples, or num_samples.
ivoc
2016/10/13 13:46:15
Done.
|
+ |
+ void Process(const float* nearend, size_t nrOfSamples); |
hlundin-webrtc
2016/10/13 11:45:20
again
ivoc
2016/10/13 13:46:15
Done.
|
+ |
+ void Initialize(int sample_rate_hz); |
+}; |
} // namespace webrtc |
+ |
+#endif // WEBRTC_MODULES_AUDIO_PROCESSING_ECHO_DETECTOR_ECHO_DETECTOR_H_ |