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

Unified Diff: webrtc/pc/rtcpmuxfilter.cc

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.h ('k') | webrtc/pc/rtcpmuxfilter_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/pc/rtcpmuxfilter.cc
diff --git a/webrtc/pc/rtcpmuxfilter.cc b/webrtc/pc/rtcpmuxfilter.cc
index 715e1e77984ac2fa2b3c1cee280578e2ecce1410..f3ae4680b9f972664d1da73efd86c1225b9ff3c9 100644
--- a/webrtc/pc/rtcpmuxfilter.cc
+++ b/webrtc/pc/rtcpmuxfilter.cc
@@ -108,26 +108,6 @@ bool RtcpMuxFilter::SetAnswer(bool answer_enable, ContentSource src) {
return true;
}
-// Check the RTP payload type. If 63 < payload type < 96, it's RTCP.
-// For additional details, see http://tools.ietf.org/html/rfc5761.
-bool IsRtcp(const char* data, int len) {
- if (len < 2) {
- return false;
- }
- char pt = data[1] & 0x7F;
- return (63 < pt) && (pt < 96);
-}
-
-bool RtcpMuxFilter::DemuxRtcp(const char* data, int len) {
- // If we're muxing RTP/RTCP, we must inspect each packet delivered
- // and determine whether it is RTP or RTCP. We do so by looking at
- // the RTP payload type (see IsRtcp). Note that if we offer RTCP
- // mux, we may receive muxed RTCP before we receive the answer, so
- // we operate in that state too.
- bool offered_mux = ((state_ == ST_SENTOFFER) && offer_enable_);
- return (IsActive() || offered_mux) && IsRtcp(data, len);
-}
-
bool RtcpMuxFilter::ExpectOffer(bool offer_enable, ContentSource source) {
return ((state_ == ST_INIT) ||
(state_ == ST_ACTIVE && offer_enable == offer_enable_) ||
« no previous file with comments | « webrtc/pc/rtcpmuxfilter.h ('k') | webrtc/pc/rtcpmuxfilter_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698