WebRtcEchoTest.h 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. /*
  2. * Copyright (c) 2016-present The ZLMediaKit project authors. All Rights Reserved.
  3. *
  4. * This file is part of ZLMediaKit(https://github.com/ZLMediaKit/ZLMediaKit).
  5. *
  6. * Use of this source code is governed by MIT-like license that can be found in the
  7. * LICENSE file in the root of the source tree. All contributing project authors
  8. * may be found in the AUTHORS file in the root of the source tree.
  9. */
  10. #ifndef ZLMEDIAKIT_WEBRTCECHOTEST_H
  11. #define ZLMEDIAKIT_WEBRTCECHOTEST_H
  12. #include "WebRtcTransport.h"
  13. namespace mediakit {
  14. class WebRtcEchoTest : public WebRtcTransportImp {
  15. public:
  16. using Ptr = std::shared_ptr<WebRtcEchoTest>;
  17. static Ptr create(const EventPoller::Ptr &poller);
  18. protected:
  19. ///////WebRtcTransportImp override///////
  20. void onRtcConfigure(RtcConfigure &configure) const override;
  21. void onCheckSdp(SdpType type, RtcSession &sdp) override;
  22. void onRtp(const char *buf, size_t len, uint64_t stamp_ms) override;
  23. void onRtcp(const char *buf, size_t len) override;
  24. void onBeforeEncryptRtp(const char *buf, int &len, void *ctx) override {};
  25. void onBeforeEncryptRtcp(const char *buf, int &len, void *ctx) override {};
  26. private:
  27. WebRtcEchoTest(const EventPoller::Ptr &poller);
  28. };
  29. }// namespace mediakit
  30. #endif //ZLMEDIAKIT_WEBRTCECHOTEST_H