Revert "Replace BundleFilter with RtpDemuxer in RtpTransport."

This reverts commit ea8b62a3e74fe91cd6bf66304839cd5677880a4e.

Reason for revert: Broke chromium tests.
Original change's description:
> Replace BundleFilter with RtpDemuxer in RtpTransport.
> 
> BundleFilter is replaced by RtpDemuxer in RtpTransport for payload
> type-based demuxing. RtpTransport will support MID-based demuxing later.
> 
> Each BaseChannel has its own RTP demuxing criteria and when connecting
> to the RtpTransport, BaseChannel will register itself as a demuxer sink.
> 
> The inheritance model is changed. New inheritance chain:
> DtlsSrtpTransport->SrtpTransport->RtpTranpsort
> 
> NOTE:
> When RTCP packets are received, Call::DeliverRtcp will be called for
> multiple times (webrtc:9035) which is an existing issue. With this CL,
> it will become more of a problem and should be fixed.
> 
> Bug: webrtc:8587
> Change-Id: I1d8a00443bd4bcbacc56e5e19b7294205cdc38f0
> Reviewed-on: https://webrtc-review.googlesource.com/61360
> Commit-Queue: Zhi Huang <zhihuang@webrtc.org>
> Reviewed-by: Steve Anton <steveanton@webrtc.org>
> Reviewed-by: Taylor Brandstetter <deadbeef@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#22613}

TBR=steveanton@webrtc.org,deadbeef@webrtc.org,zhihuang@webrtc.org

Change-Id: If245da9d1ce970ac8dab7f45015e9b268a5dbcbd
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: webrtc:8587
Reviewed-on: https://webrtc-review.googlesource.com/64860
Reviewed-by: Zhi Huang <zhihuang@webrtc.org>
Commit-Queue: Zhi Huang <zhihuang@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22614}
This commit is contained in:
Zhi Huang
2018-03-27 00:09:01 +00:00
committed by Commit Bot
parent ea8b62a3e7
commit 97d5e5b32c
28 changed files with 713 additions and 591 deletions

View File

@ -23,7 +23,6 @@
#include "api/rtpreceiverinterface.h"
#include "api/videosinkinterface.h"
#include "api/videosourceinterface.h"
#include "call/rtp_packet_sink_interface.h"
#include "media/base/mediachannel.h"
#include "media/base/mediaengine.h"
#include "media/base/streamparams.h"
@ -70,10 +69,9 @@ class MediaContentDescription;
// vtable, and the media channel's thread using BaseChannel as the
// NetworkInterface.
class BaseChannel : public rtc::MessageHandler,
public sigslot::has_slots<>,
public MediaChannel::NetworkInterface,
public webrtc::RtpPacketSinkInterface {
class BaseChannel
: public rtc::MessageHandler, public sigslot::has_slots<>,
public MediaChannel::NetworkInterface {
public:
// If |srtp_required| is true, the channel will not send or receive any
// RTP/RTCP packets without using SRTP (either using SDES or DTLS-SRTP).
@ -195,8 +193,10 @@ class BaseChannel : public rtc::MessageHandler,
virtual cricket::MediaType media_type() = 0;
// RtpPacketSinkInterface overrides.
void OnRtpPacket(const webrtc::RtpPacketReceived& packet) override;
// 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;
// Used by the RTCStatsCollector tests to set the transport name without
// creating RtpTransports.
@ -264,10 +264,12 @@ class BaseChannel : public rtc::MessageHandler,
rtc::CopyOnWriteBuffer* packet,
const rtc::PacketOptions& options);
void OnRtcpPacketReceived(rtc::CopyOnWriteBuffer* packet,
const rtc::PacketTime& packet_time);
bool WantsPacket(bool rtcp, const rtc::CopyOnWriteBuffer* packet);
void HandlePacket(bool rtcp, rtc::CopyOnWriteBuffer* packet,
const rtc::PacketTime& packet_time);
// TODO(zstein): packet can be const once the RtpTransport handles protection.
void OnPacketReceived(bool rtcp,
const rtc::CopyOnWriteBuffer& packet,
rtc::CopyOnWriteBuffer* packet,
const rtc::PacketTime& packet_time);
void ProcessPacket(bool rtcp,
const rtc::CopyOnWriteBuffer& packet,
@ -358,11 +360,6 @@ class BaseChannel : public rtc::MessageHandler,
void AddHandledPayloadType(int payload_type);
void UpdateRtpHeaderExtensionMap(
const RtpHeaderExtensions& header_extensions);
bool RegisterRtpDemuxerSink();
private:
void ConnectToRtpTransport();
void DisconnectFromRtpTransport();
@ -442,9 +439,6 @@ class BaseChannel : public rtc::MessageHandler,
// The cached encrypted header extension IDs.
rtc::Optional<std::vector<int>> cached_send_extension_ids_;
rtc::Optional<std::vector<int>> cached_recv_extension_ids_;
bool encryption_disabled_ = false;
webrtc::RtpDemuxerCriteria demuxer_criteria_;
};
// VoiceChannel is a specialization that adds support for early media, DTMF,