Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(30)

Unified Diff: webrtc/call/rtp_packet_receiver.h

Issue 2688473004: RtpPacketReceiver base class and OnRtpPacket, with a pre-parsed RTP packet. (Closed)
Patch Set: Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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 {
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
+ public:
+ struct RtpConfig {
+ RtpConfig() = default; // Needed by std::map
+ RtpConfig(const std::vector<RtpExtension>& extensions,
+ 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_

Powered by Google App Engine
This is Rietveld 408576698