rtp_stream_receiver_controller_interface.h (1625B)
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 13 #include <cstdint> 14 #include <memory> 15 16 #include "call/rtp_packet_sink_interface.h" 17 18 namespace webrtc { 19 20 // An RtpStreamReceiver is responsible for the rtp-specific but 21 // media-independent state needed for receiving an RTP stream. 22 // TODO(bugs.webrtc.org/7135): Currently, only owns the association between ssrc 23 // and the stream's RtpPacketSinkInterface. Ownership of corresponding objects 24 // from modules/rtp_rtcp/ should move to this class (or rather, the 25 // corresponding implementation class). We should add methods for getting rtp 26 // receive stats, and for sending RTCP messages related to the receive stream. 27 class RtpStreamReceiverInterface { 28 public: 29 virtual ~RtpStreamReceiverInterface() {} 30 }; 31 32 // This class acts as a factory for RtpStreamReceiver objects. 33 class RtpStreamReceiverControllerInterface { 34 public: 35 virtual ~RtpStreamReceiverControllerInterface() {} 36 37 virtual std::unique_ptr<RtpStreamReceiverInterface> CreateReceiver( 38 uint32_t ssrc, 39 RtpPacketSinkInterface* sink) = 0; 40 }; 41 42 } // namespace webrtc 43 44 #endif // CALL_RTP_STREAM_RECEIVER_CONTROLLER_INTERFACE_H_