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

Unified Diff: webrtc/pc/rtptransport.h

Issue 2890263003: Move RTP/RTCP demuxing logic from BaseChannel to RtpTransport. (Closed)
Patch Set: Disconnect transport channels in method called from Deinit to prevent races during object destructi… Created 3 years, 7 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
« no previous file with comments | « webrtc/pc/rtcpmuxfilter_unittest.cc ('k') | webrtc/pc/rtptransport.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/pc/rtptransport.h
diff --git a/webrtc/pc/rtptransport.h b/webrtc/pc/rtptransport.h
index f9bee1b6cc7da03d6ad5a93680b0a70f004bf8cd..1224b4432b227b5978a72ddca87639fc32b541fd 100644
--- a/webrtc/pc/rtptransport.h
+++ b/webrtc/pc/rtptransport.h
@@ -13,11 +13,13 @@
#include "webrtc/api/ortc/rtptransportinterface.h"
#include "webrtc/base/sigslot.h"
+#include "webrtc/pc/bundlefilter.h"
namespace rtc {
class CopyOnWriteBuffer;
struct PacketOptions;
+struct PacketTime;
class PacketTransportInternal;
} // namespace rtc
@@ -64,11 +66,23 @@ class RtpTransport : public RtpTransportInterface, public sigslot::has_slots<> {
const rtc::PacketOptions& options,
int flags);
+ bool HandlesPayloadType(int payload_type) const;
+
+ void AddHandledPayloadType(int payload_type);
+
+ // TODO(zstein): Consider having two signals - RtcPacketReceived and
+ // RtcpPacketReceived.
+ // The first argument is true for RTCP packets and false for RTP packets.
+ sigslot::signal3<bool, rtc::CopyOnWriteBuffer&, const rtc::PacketTime&>
+ SignalPacketReceived;
+
protected:
// TODO(zstein): Remove this when we remove RtpTransportAdapter.
RtpTransportAdapter* GetInternal() override;
private:
+ bool HandlesPacket(const uint8_t* data, size_t len);
+
void OnReadyToSend(rtc::PacketTransportInternal* transport);
// Updates "ready to send" for an individual channel and fires
@@ -77,6 +91,14 @@ class RtpTransport : public RtpTransportInterface, public sigslot::has_slots<> {
void MaybeSignalReadyToSend();
+ void OnReadPacket(rtc::PacketTransportInternal* transport,
+ const char* data,
+ size_t len,
+ const rtc::PacketTime& packet_time,
+ int flags);
+
+ bool WantsPacket(bool rtcp, const rtc::CopyOnWriteBuffer* packet);
+
bool rtcp_mux_enabled_;
rtc::PacketTransportInternal* rtp_packet_transport_ = nullptr;
@@ -87,6 +109,8 @@ class RtpTransport : public RtpTransportInterface, public sigslot::has_slots<> {
bool rtcp_ready_to_send_ = false;
RtcpParameters rtcp_parameters_;
+
+ cricket::BundleFilter bundle_filter_;
};
} // namespace webrtc
« no previous file with comments | « webrtc/pc/rtcpmuxfilter_unittest.cc ('k') | webrtc/pc/rtptransport.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698