rtp_stream_receiver_controller_interface.h 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. /*
  2. * Copyright (c) 2017 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_RTP_STREAM_RECEIVER_CONTROLLER_INTERFACE_H_
  11. #define CALL_RTP_STREAM_RECEIVER_CONTROLLER_INTERFACE_H_
  12. #include <memory>
  13. #include "call/rtp_packet_sink_interface.h"
  14. namespace webrtc {
  15. // An RtpStreamReceiver is responsible for the rtp-specific but
  16. // media-independent state needed for receiving an RTP stream.
  17. // TODO(nisse): Currently, only owns the association between ssrc and
  18. // the stream's RtpPacketSinkInterface. Ownership of corresponding
  19. // objects from modules/rtp_rtcp/ should move to this class (or
  20. // rather, the corresponding implementation class). We should add
  21. // methods for getting rtp receive stats, and for sending RTCP
  22. // messages related to the receive stream.
  23. class RtpStreamReceiverInterface {
  24. public:
  25. virtual ~RtpStreamReceiverInterface() {}
  26. };
  27. // This class acts as a factory for RtpStreamReceiver objects.
  28. class RtpStreamReceiverControllerInterface {
  29. public:
  30. virtual ~RtpStreamReceiverControllerInterface() {}
  31. virtual std::unique_ptr<RtpStreamReceiverInterface> CreateReceiver(
  32. uint32_t ssrc,
  33. RtpPacketSinkInterface* sink) = 0;
  34. // For registering additional sinks, needed for FlexFEC.
  35. virtual bool AddSink(uint32_t ssrc, RtpPacketSinkInterface* sink) = 0;
  36. virtual size_t RemoveSink(const RtpPacketSinkInterface* sink) = 0;
  37. };
  38. } // namespace webrtc
  39. #endif // CALL_RTP_STREAM_RECEIVER_CONTROLLER_INTERFACE_H_