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

Unified Diff: webrtc/pc/channel.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/media/base/rtputils.cc ('k') | webrtc/pc/channel.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/pc/channel.h
diff --git a/webrtc/pc/channel.h b/webrtc/pc/channel.h
index 48259e5fd9d7732b94c4deaa817265edf5b85b59..0abdaf2b2a9252eabe76c31d3728f122d7349b01 100644
--- a/webrtc/pc/channel.h
+++ b/webrtc/pc/channel.h
@@ -36,7 +36,6 @@
#include "webrtc/p2p/base/transportcontroller.h"
#include "webrtc/p2p/client/socketmonitor.h"
#include "webrtc/pc/audiomonitor.h"
-#include "webrtc/pc/bundlefilter.h"
#include "webrtc/pc/mediamonitor.h"
#include "webrtc/pc/mediasession.h"
#include "webrtc/pc/rtcpmuxfilter.h"
@@ -149,8 +148,6 @@ class BaseChannel
// For ConnectionStatsGetter, used by ConnectionMonitor
bool GetConnectionStats(ConnectionInfos* infos) override;
- BundleFilter* bundle_filter() { return &bundle_filter_; }
-
const std::vector<StreamParams>& local_streams() const {
return local_streams_;
}
@@ -198,6 +195,11 @@ class BaseChannel
// This function returns true if we require SRTP for call setup.
bool srtp_required_for_testing() const { return srtp_required_; }
+ // Public for testing.
+ // TODO(zstein): Remove this once channels register themselves with
+ // an RtpTransport in a more explicit way.
+ bool HandlesPayloadType(int payload_type) const;
+
protected:
virtual MediaChannel* media_channel() const { return media_channel_; }
@@ -248,11 +250,6 @@ class BaseChannel
// From TransportChannel
void OnWritableState(rtc::PacketTransportInternal* transport);
- virtual void OnPacketRead(rtc::PacketTransportInternal* transport,
- const char* data,
- size_t len,
- const rtc::PacketTime& packet_time,
- int flags);
void OnDtlsState(DtlsTransportInternal* transport, DtlsTransportState state);
@@ -272,9 +269,13 @@ class BaseChannel
bool WantsPacket(bool rtcp, const rtc::CopyOnWriteBuffer* packet);
void HandlePacket(bool rtcp, rtc::CopyOnWriteBuffer* packet,
const rtc::PacketTime& packet_time);
- void OnPacketReceived(bool rtcp,
- const rtc::CopyOnWriteBuffer& packet,
- const rtc::PacketTime& packet_time);
+ // TODO(zstein): packet can be const once the RtpTransport handles protection.
+ virtual void OnPacketReceived(bool rtcp,
+ rtc::CopyOnWriteBuffer& packet,
+ const rtc::PacketTime& packet_time);
+ void ProcessPacket(bool rtcp,
+ const rtc::CopyOnWriteBuffer& packet,
+ const rtc::PacketTime& packet_time);
void EnableMedia_w();
void DisableMedia_w();
@@ -357,6 +358,8 @@ class BaseChannel
return worker_thread_->Invoke<bool>(posted_from, functor);
}
+ void AddHandledPayloadType(int payload_type);
+
private:
bool InitNetwork_n(DtlsTransportInternal* rtp_dtls_transport,
DtlsTransportInternal* rtcp_dtls_transport,
@@ -394,7 +397,6 @@ class BaseChannel
std::vector<std::pair<rtc::Socket::Option, int> > rtcp_socket_options_;
SrtpFilter srtp_filter_;
RtcpMuxFilter rtcp_mux_filter_;
- BundleFilter bundle_filter_;
bool writable_ = false;
bool was_ever_writable_ = false;
bool has_received_packet_ = false;
@@ -496,11 +498,9 @@ class VoiceChannel : public BaseChannel {
private:
// overrides from BaseChannel
- void OnPacketRead(rtc::PacketTransportInternal* transport,
- const char* data,
- size_t len,
- const rtc::PacketTime& packet_time,
- int flags) override;
+ void OnPacketReceived(bool rtcp,
+ rtc::CopyOnWriteBuffer& packet,
+ const rtc::PacketTime& packet_time) override;
void UpdateMediaSendRecvState_w() override;
const ContentInfo* GetFirstContent(const SessionDescription* sdesc) override;
bool SetLocalContent_w(const MediaContentDescription* content,
« no previous file with comments | « webrtc/media/base/rtputils.cc ('k') | webrtc/pc/channel.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698