Delete deprecated PeerConnection methods, and corresponding using declarations.
BUG=None Review-Url: https://codereview.webrtc.org/2632203003 Cr-Commit-Position: refs/heads/master@{#17120}
This commit is contained in:
parent
cbbd8c76e8
commit
7f067663ac
@ -518,9 +518,6 @@ class PeerConnectionInterface : public rtc::RefCountInterface {
|
||||
// remote peer is notified.
|
||||
virtual void RemoveStream(MediaStreamInterface* stream) = 0;
|
||||
|
||||
// TODO(deadbeef): Make the following two methods pure virtual once
|
||||
// implemented by all subclasses of PeerConnectionInterface.
|
||||
|
||||
// Add a new MediaStreamTrack to be sent on this PeerConnection, and return
|
||||
// the newly created RtpSender.
|
||||
//
|
||||
@ -528,15 +525,11 @@ class PeerConnectionInterface : public rtc::RefCountInterface {
|
||||
// with.
|
||||
virtual rtc::scoped_refptr<RtpSenderInterface> AddTrack(
|
||||
MediaStreamTrackInterface* track,
|
||||
std::vector<MediaStreamInterface*> streams) {
|
||||
return nullptr;
|
||||
}
|
||||
std::vector<MediaStreamInterface*> streams) = 0;
|
||||
|
||||
// Remove an RtpSender from this PeerConnection.
|
||||
// Returns true on success.
|
||||
virtual bool RemoveTrack(RtpSenderInterface* sender) {
|
||||
return false;
|
||||
}
|
||||
virtual bool RemoveTrack(RtpSenderInterface* sender) = 0;
|
||||
|
||||
// Returns pointer to a DtmfSender on success. Otherwise returns null.
|
||||
//
|
||||
@ -780,21 +773,15 @@ class PeerConnectionObserver {
|
||||
// pointer version.
|
||||
|
||||
// Triggered when media is received on a new stream from remote peer.
|
||||
virtual void OnAddStream(rtc::scoped_refptr<MediaStreamInterface> stream) {}
|
||||
// Deprecated; please use the version that uses a scoped_refptr.
|
||||
virtual void OnAddStream(MediaStreamInterface* stream) {}
|
||||
virtual void OnAddStream(rtc::scoped_refptr<MediaStreamInterface> stream) = 0;
|
||||
|
||||
// Triggered when a remote peer close a stream.
|
||||
virtual void OnRemoveStream(rtc::scoped_refptr<MediaStreamInterface> stream) {
|
||||
}
|
||||
// Deprecated; please use the version that uses a scoped_refptr.
|
||||
virtual void OnRemoveStream(MediaStreamInterface* stream) {}
|
||||
virtual void OnRemoveStream(
|
||||
rtc::scoped_refptr<MediaStreamInterface> stream) = 0;
|
||||
|
||||
// Triggered when a remote peer opens a data channel.
|
||||
virtual void OnDataChannel(
|
||||
rtc::scoped_refptr<DataChannelInterface> data_channel) {}
|
||||
// Deprecated; please use the version that uses a scoped_refptr.
|
||||
virtual void OnDataChannel(DataChannelInterface* data_channel) {}
|
||||
rtc::scoped_refptr<DataChannelInterface> data_channel) = 0;
|
||||
|
||||
// Triggered when renegotiation is needed. For example, an ICE restart
|
||||
// has begun.
|
||||
|
||||
@ -1363,9 +1363,6 @@ void PeerConnection::SetRemoteDescription(
|
||||
for (size_t i = 0; i < new_streams->count(); ++i) {
|
||||
MediaStreamInterface* new_stream = new_streams->at(i);
|
||||
stats_->AddStream(new_stream);
|
||||
// Call both the raw pointer and scoped_refptr versions of the method
|
||||
// for compatibility.
|
||||
observer_->OnAddStream(new_stream);
|
||||
observer_->OnAddStream(
|
||||
rtc::scoped_refptr<MediaStreamInterface>(new_stream));
|
||||
}
|
||||
@ -2080,9 +2077,6 @@ void PeerConnection::UpdateEndedRemoteMediaStreams() {
|
||||
|
||||
for (auto& stream : streams_to_remove) {
|
||||
remote_streams_->RemoveStream(stream);
|
||||
// Call both the raw pointer and scoped_refptr versions of the method
|
||||
// for compatibility.
|
||||
observer_->OnRemoveStream(stream.get());
|
||||
observer_->OnRemoveStream(std::move(stream));
|
||||
}
|
||||
}
|
||||
@ -2257,9 +2251,6 @@ void PeerConnection::CreateRemoteRtpDataChannel(const std::string& label,
|
||||
channel->SetReceiveSsrc(remote_ssrc);
|
||||
rtc::scoped_refptr<DataChannelInterface> proxy_channel =
|
||||
DataChannelProxy::Create(signaling_thread(), channel);
|
||||
// Call both the raw pointer and scoped_refptr versions of the method
|
||||
// for compatibility.
|
||||
observer_->OnDataChannel(proxy_channel.get());
|
||||
observer_->OnDataChannel(std::move(proxy_channel));
|
||||
}
|
||||
|
||||
@ -2416,9 +2407,6 @@ void PeerConnection::OnDataChannelOpenMessage(
|
||||
|
||||
rtc::scoped_refptr<DataChannelInterface> proxy_channel =
|
||||
DataChannelProxy::Create(signaling_thread(), channel);
|
||||
// Call both the raw pointer and scoped_refptr versions of the method
|
||||
// for compatibility.
|
||||
observer_->OnDataChannel(proxy_channel.get());
|
||||
observer_->OnDataChannel(std::move(proxy_channel));
|
||||
}
|
||||
|
||||
|
||||
@ -183,13 +183,6 @@ class PeerConnectionTestClient : public webrtc::PeerConnectionObserver,
|
||||
public ObserverInterface,
|
||||
public rtc::MessageHandler {
|
||||
public:
|
||||
// We need these using declarations because there are two versions of each of
|
||||
// the below methods and we only override one of them.
|
||||
// TODO(deadbeef): Remove once there's only one version of the methods.
|
||||
using PeerConnectionObserver::OnAddStream;
|
||||
using PeerConnectionObserver::OnRemoveStream;
|
||||
using PeerConnectionObserver::OnDataChannel;
|
||||
|
||||
// If |config| is not provided, uses a default constructed RTCConfiguration.
|
||||
static PeerConnectionTestClient* CreateClientWithDtlsIdentityStore(
|
||||
const std::string& id,
|
||||
|
||||
@ -63,13 +63,6 @@ static const char kTurnIceServerWithIPv6Address[] =
|
||||
|
||||
class NullPeerConnectionObserver : public PeerConnectionObserver {
|
||||
public:
|
||||
// We need these using declarations because there are two versions of each of
|
||||
// the below methods and we only override one of them.
|
||||
// TODO(deadbeef): Remove once there's only one version of the methods.
|
||||
using PeerConnectionObserver::OnAddStream;
|
||||
using PeerConnectionObserver::OnRemoveStream;
|
||||
using PeerConnectionObserver::OnDataChannel;
|
||||
|
||||
virtual ~NullPeerConnectionObserver() = default;
|
||||
void OnSignalingChange(
|
||||
PeerConnectionInterface::SignalingState new_state) override {}
|
||||
|
||||
@ -526,13 +526,6 @@ class MockTrackObserver : public ObserverInterface {
|
||||
|
||||
class MockPeerConnectionObserver : public PeerConnectionObserver {
|
||||
public:
|
||||
// We need these using declarations because there are two versions of each of
|
||||
// the below methods and we only override one of them.
|
||||
// TODO(deadbeef): Remove once there's only one version of the methods.
|
||||
using PeerConnectionObserver::OnAddStream;
|
||||
using PeerConnectionObserver::OnRemoveStream;
|
||||
using PeerConnectionObserver::OnDataChannel;
|
||||
|
||||
MockPeerConnectionObserver() : remote_streams_(StreamCollection::Create()) {}
|
||||
virtual ~MockPeerConnectionObserver() {
|
||||
}
|
||||
|
||||
@ -24,13 +24,6 @@ class PeerConnectionTestWrapper
|
||||
public webrtc::CreateSessionDescriptionObserver,
|
||||
public sigslot::has_slots<> {
|
||||
public:
|
||||
// We need these using declarations because there are two versions of each of
|
||||
// the below methods and we only override one of them.
|
||||
// TODO(deadbeef): Remove once there's only one version of the methods.
|
||||
using PeerConnectionObserver::OnAddStream;
|
||||
using PeerConnectionObserver::OnRemoveStream;
|
||||
using PeerConnectionObserver::OnDataChannel;
|
||||
|
||||
static void Connect(PeerConnectionTestWrapper* caller,
|
||||
PeerConnectionTestWrapper* callee);
|
||||
|
||||
|
||||
@ -206,13 +206,6 @@ class ConstraintsWrapper;
|
||||
// and dispatches C++ callbacks to Java.
|
||||
class PCOJava : public PeerConnectionObserver {
|
||||
public:
|
||||
// We need these using declarations because there are two versions of each of
|
||||
// the below methods and we only override one of them.
|
||||
// TODO(deadbeef): Remove once there's only one version of the methods.
|
||||
using PeerConnectionObserver::OnAddStream;
|
||||
using PeerConnectionObserver::OnRemoveStream;
|
||||
using PeerConnectionObserver::OnDataChannel;
|
||||
|
||||
PCOJava(JNIEnv* jni, jobject j_observer)
|
||||
: j_observer_global_(jni, j_observer),
|
||||
j_observer_class_(jni, GetObjectClass(jni, *j_observer_global_)),
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user