Chromium Code Reviews| Index: webrtc/call/rtp_packet_receiver.h |
| diff --git a/webrtc/call/rtp_packet_receiver.h b/webrtc/call/rtp_packet_receiver.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..0561ca35002d8728751f144345e1a05822310a49 |
| --- /dev/null |
| +++ b/webrtc/call/rtp_packet_receiver.h |
| @@ -0,0 +1,49 @@ |
| +/* |
| + * Copyright (c) 2017 The WebRTC project authors. All Rights Reserved. |
| + * |
| + * Use of this source code is governed by a BSD-style license |
| + * that can be found in the LICENSE file in the root of the source |
| + * tree. An additional intellectual property rights grant can be found |
| + * in the file PATENTS. All contributing project authors may |
| + * be found in the AUTHORS file in the root of the source tree. |
| + */ |
| + |
| +#ifndef WEBRTC_CALL_RTP_PACKET_RECEIVER_H_ |
| +#define WEBRTC_CALL_RTP_PACKET_RECEIVER_H_ |
| + |
| +#include <vector> |
| + |
| +#include "webrtc/modules/rtp_rtcp/source/rtp_header_extension.h" |
| +#include "webrtc/modules/rtp_rtcp/source/rtp_packet_received.h" |
| + |
| +namespace webrtc { |
| + |
| +class RtpPacketReceiver { |
| + public: |
| + struct RtpConfig { |
| + RtpConfig() = default; // Needed by std::map |
| + RtpConfig(const std::vector<RtpExtension>& extensions, |
|
the sun
2017/02/10 12:37:45
nit: move whole impl of this ctor to .cc, then you
|
| + bool transport_cc) |
| + : extensions(extensions), |
| + use_send_side_bwe(UseSendSideBwe(extensions, transport_cc)) {} |
| + // Registered RTP header extensions for a stream. Note that RTP header |
| + // extensions are negotiated per track ("m= line") in the SDP, but we have |
| + // no notion of tracks at the Call level. We therefore store the RTP header |
| + // extensions per SSRC instead, which leads to some storage overhead. |
| + RtpHeaderExtensionMap extensions; |
| + // Set if both RTP extension the RTCP feedback message needed for |
| + // send side BWE are negotiated. |
| + bool use_send_side_bwe = false; |
| + }; |
| + virtual bool OnRtpPacket(const RtpPacketReceived& packet) = 0; |
| + virtual const RtpConfig& rtp_config() const = 0; |
| + virtual ~RtpPacketReceiver() {} |
| + |
| + private: |
| + static bool UseSendSideBwe(const std::vector<RtpExtension>& extensions, |
| + bool transport_cc); |
| +}; |
| + |
| +} // namespace webrtc |
| + |
| +#endif // WEBRTC_CALL_RTP_PACKET_RECEIVER_H_ |