WebrtcWrapper.cpp 521 B

12345678910111213141516171819202122232425262728293031
  1. #include "WebrtcWrapper.h"
  2. #include "webrtc.h"
  3. #ifdef __cplusplus
  4. extern "C" {
  5. #endif
  6. #ifdef AEC_DELAY
  7. void *GetInstance()
  8. {
  9. return new Webrtc();
  10. }
  11. void ReleaseInstance(void *handle)
  12. {
  13. delete static_cast<Webrtc *>(handle);
  14. }
  15. void SetFrameParam(void *handle, int rate, int step, int chans)
  16. {
  17. static_cast<Webrtc *>(handle)->SetFrameParam(rate, step, chans);
  18. }
  19. void FrameProcess(void *handle, short *data, int len)
  20. {
  21. static_cast<Webrtc *>(handle)->FrameProcess(data, len);
  22. }
  23. #endif
  24. #ifdef __cplusplus
  25. };
  26. #endif