Index: webrtc/pc/channel.h |
diff --git a/webrtc/pc/channel.h b/webrtc/pc/channel.h |
index 48259e5fd9d7732b94c4deaa817265edf5b85b59..5b57fd8752ddaa34903b8e3a837981bfb9a9cfd0 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,9 @@ 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. |
+ bool HandlesPayloadType(int payload_type) const; |
+ |
protected: |
virtual MediaChannel* media_channel() const { return media_channel_; } |
@@ -248,11 +248,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); |
@@ -273,8 +268,11 @@ class BaseChannel |
void HandlePacket(bool rtcp, rtc::CopyOnWriteBuffer* packet, |
const rtc::PacketTime& packet_time); |
void OnPacketReceived(bool rtcp, |
- const rtc::CopyOnWriteBuffer& packet, |
+ 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 +355,10 @@ class BaseChannel |
return worker_thread_->Invoke<bool>(posted_from, functor); |
} |
+ void AddHandledPayloadType(int payload_type); |
+ |
+ bool received_media() { return rtp_transport_.received_media(); } |
+ |
private: |
bool InitNetwork_n(DtlsTransportInternal* rtp_dtls_transport, |
DtlsTransportInternal* rtcp_dtls_transport, |
@@ -371,6 +373,8 @@ class BaseChannel |
int GetTransportOverheadPerPacket() const; |
void UpdateTransportOverhead(); |
+ void OnFirstPacketReceived(); |
+ |
rtc::Thread* const worker_thread_; |
rtc::Thread* const network_thread_; |
rtc::Thread* const signaling_thread_; |
@@ -394,7 +398,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 +499,6 @@ 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 UpdateMediaSendRecvState_w() override; |
const ContentInfo* GetFirstContent(const SessionDescription* sdesc) override; |
bool SetLocalContent_w(const MediaContentDescription* content, |
@@ -523,7 +521,6 @@ class VoiceChannel : public BaseChannel { |
static const int kEarlyMediaTimeout = 1000; |
MediaEngineInterface* media_engine_; |
- bool received_media_; |
std::unique_ptr<VoiceMediaMonitor> media_monitor_; |
std::unique_ptr<AudioMonitor> audio_monitor_; |