audio_decoder_fuzzer.h 1.0 KB

123456789101112131415161718192021222324252627282930313233343536
  1. /*
  2. * Copyright (c) 2015 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. #ifndef TEST_FUZZERS_AUDIO_DECODER_FUZZER_H_
  11. #define TEST_FUZZERS_AUDIO_DECODER_FUZZER_H_
  12. #include <stddef.h>
  13. #include <stdint.h>
  14. namespace webrtc {
  15. class AudioDecoder;
  16. enum class DecoderFunctionType {
  17. kNormalDecode,
  18. kRedundantDecode,
  19. };
  20. void FuzzAudioDecoder(DecoderFunctionType decode_type,
  21. const uint8_t* data,
  22. size_t size,
  23. AudioDecoder* decoder,
  24. int sample_rate_hz,
  25. size_t max_decoded_bytes,
  26. int16_t* decoded);
  27. } // namespace webrtc
  28. #endif // TEST_FUZZERS_AUDIO_DECODER_FUZZER_H_