OLD | NEW |
---|---|
(Empty) | |
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 | |
11 #ifndef WEBRTC_CALL_RTP_PACKET_RECEIVER_H_ | |
12 #define WEBRTC_CALL_RTP_PACKET_RECEIVER_H_ | |
13 | |
14 #include <vector> | |
15 | |
16 #include "webrtc/modules/rtp_rtcp/source/rtp_header_extension.h" | |
17 #include "webrtc/modules/rtp_rtcp/source/rtp_packet_received.h" | |
18 | |
19 namespace webrtc { | |
20 | |
21 class RtpPacketReceiver { | |
Taylor Brandstetter
2017/02/09 20:20:11
How will this relate to RtpTransportReceiver?
nisse-webrtc
2017/02/10 08:09:23
RtpTransportReceiver would keep any media-independ
| |
22 public: | |
23 struct RtpConfig { | |
24 RtpConfig() = default; // Needed by std::map | |
25 RtpConfig(const std::vector<RtpExtension>& extensions, | |
26 bool transport_cc) | |
27 : extensions(extensions), | |
28 use_send_side_bwe(UseSendSideBwe(extensions, transport_cc)) {} | |
29 // Registered RTP header extensions for a stream. Note that RTP header | |
30 // extensions are negotiated per track ("m= line") in the SDP, but we have | |
31 // no notion of tracks at the Call level. We therefore store the RTP header | |
32 // extensions per SSRC instead, which leads to some storage overhead. | |
33 RtpHeaderExtensionMap extensions; | |
34 // Set if both RTP extension the RTCP feedback message needed for | |
35 // send side BWE are negotiated. | |
36 bool use_send_side_bwe = false; | |
37 }; | |
38 virtual bool OnRtpPacket(const RtpPacketReceived& packet) = 0; | |
39 virtual const RtpConfig& rtp_config() const = 0; | |
40 virtual ~RtpPacketReceiver() {} | |
41 | |
42 private: | |
43 static bool UseSendSideBwe(const std::vector<RtpExtension>& extensions, | |
44 bool transport_cc); | |
45 }; | |
46 | |
47 } // namespace webrtc | |
48 | |
49 #endif // WEBRTC_CALL_RTP_PACKET_RECEIVER_H_ | |
OLD | NEW |