flexfec_receive_stream_impl.h 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. /*
  2. * Copyright (c) 2016 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 CALL_FLEXFEC_RECEIVE_STREAM_IMPL_H_
  11. #define CALL_FLEXFEC_RECEIVE_STREAM_IMPL_H_
  12. #include <memory>
  13. #include "call/flexfec_receive_stream.h"
  14. #include "call/rtp_packet_sink_interface.h"
  15. #include "modules/rtp_rtcp/source/rtp_rtcp_impl2.h"
  16. #include "system_wrappers/include/clock.h"
  17. namespace webrtc {
  18. class FlexfecReceiver;
  19. class ProcessThread;
  20. class ReceiveStatistics;
  21. class RecoveredPacketReceiver;
  22. class RtcpRttStats;
  23. class RtpPacketReceived;
  24. class RtpRtcp;
  25. class RtpStreamReceiverControllerInterface;
  26. class RtpStreamReceiverInterface;
  27. class FlexfecReceiveStreamImpl : public FlexfecReceiveStream {
  28. public:
  29. FlexfecReceiveStreamImpl(
  30. Clock* clock,
  31. RtpStreamReceiverControllerInterface* receiver_controller,
  32. const Config& config,
  33. RecoveredPacketReceiver* recovered_packet_receiver,
  34. RtcpRttStats* rtt_stats,
  35. ProcessThread* process_thread);
  36. ~FlexfecReceiveStreamImpl() override;
  37. // RtpPacketSinkInterface.
  38. void OnRtpPacket(const RtpPacketReceived& packet) override;
  39. Stats GetStats() const override;
  40. const Config& GetConfig() const override;
  41. private:
  42. // Config.
  43. const Config config_;
  44. // Erasure code interfacing.
  45. const std::unique_ptr<FlexfecReceiver> receiver_;
  46. // RTCP reporting.
  47. const std::unique_ptr<ReceiveStatistics> rtp_receive_statistics_;
  48. const std::unique_ptr<ModuleRtpRtcpImpl2> rtp_rtcp_;
  49. ProcessThread* process_thread_;
  50. std::unique_ptr<RtpStreamReceiverInterface> rtp_stream_receiver_;
  51. };
  52. } // namespace webrtc
  53. #endif // CALL_FLEXFEC_RECEIVE_STREAM_IMPL_H_