From 4fb0d5af90819ec9666b847f6295b933f58c8301 Mon Sep 17 00:00:00 2001 From: "perkj@webrtc.org" Date: Tue, 4 Nov 2014 13:01:33 +0000 Subject: ReAdd PeerConnectionInterface::AddStream to fix Chrome build. AddStream(MediaStreamInterface* stream, const MediaConstraintsInterface* constraints); This will be removed once Chrome has been updated. R=tommi@webrtc.org Review URL: https://webrtc-codereview.appspot.com/27919004 git-svn-id: http://webrtc.googlecode.com/svn/trunk/talk@7608 4adac7df-926f-26a2-2b94-8c16560cd09d --- app/webrtc/peerconnection.cc | 5 +++++ app/webrtc/peerconnection.h | 2 ++ app/webrtc/peerconnectioninterface.h | 15 ++++++++------- app/webrtc/peerconnectionproxy.h | 2 ++ 4 files changed, 17 insertions(+), 7 deletions(-) diff --git a/app/webrtc/peerconnection.cc b/app/webrtc/peerconnection.cc index 64ddcad..b64caf7 100644 --- a/app/webrtc/peerconnection.cc +++ b/app/webrtc/peerconnection.cc @@ -420,6 +420,11 @@ bool PeerConnection::AddStream(MediaStreamInterface* local_stream) { return true; } +bool PeerConnection::AddStream(MediaStreamInterface* local_stream, + const MediaConstraintsInterface* constraints) { + return AddStream(local_stream); +} + void PeerConnection::RemoveStream(MediaStreamInterface* local_stream) { mediastream_signaling_->RemoveLocalStream(local_stream); if (IsClosed()) { diff --git a/app/webrtc/peerconnection.h b/app/webrtc/peerconnection.h index 68aa154..355211c 100644 --- a/app/webrtc/peerconnection.h +++ b/app/webrtc/peerconnection.h @@ -66,6 +66,8 @@ class PeerConnection : public PeerConnectionInterface, virtual rtc::scoped_refptr local_streams(); virtual rtc::scoped_refptr remote_streams(); virtual bool AddStream(MediaStreamInterface* local_stream); + virtual bool AddStream(MediaStreamInterface* local_stream, + const MediaConstraintsInterface* constraints); virtual void RemoveStream(MediaStreamInterface* local_stream); virtual rtc::scoped_refptr CreateDtmfSender( diff --git a/app/webrtc/peerconnectioninterface.h b/app/webrtc/peerconnectioninterface.h index edbf6e3..68b7879 100644 --- a/app/webrtc/peerconnectioninterface.h +++ b/app/webrtc/peerconnectioninterface.h @@ -252,18 +252,19 @@ class PeerConnectionInterface : public rtc::RefCountInterface { virtual rtc::scoped_refptr remote_streams() = 0; + // Add a new MediaStream to be sent on this PeerConnection. + // Note that a SessionDescription negotiation is needed before the + // remote peer can receive the stream. + // TODO(perkj): Make pure virtual once Chrome mocks have implemented. + virtual bool AddStream(MediaStreamInterface* stream) { return false;} + // Deprecated: // TODO(perkj): Remove once its not used by Chrome. virtual bool AddStream(MediaStreamInterface* stream, - const MediaConstraintsInterface* constraints) { - return AddStream(stream); + const MediaConstraintsInterface* constraints) { + return false; } - // Add a new MediaStream to be sent on this PeerConnection. - // Note that a SessionDescription negotiation is needed before the - // remote peer can receive the stream. - virtual bool AddStream(MediaStreamInterface* stream) = 0; - // Remove a MediaStream from this PeerConnection. // Note that a SessionDescription negotiation is need before the // remote peer is notified. diff --git a/app/webrtc/peerconnectionproxy.h b/app/webrtc/peerconnectionproxy.h index 852d852..571c676 100644 --- a/app/webrtc/peerconnectionproxy.h +++ b/app/webrtc/peerconnectionproxy.h @@ -40,6 +40,8 @@ BEGIN_PROXY_MAP(PeerConnection) PROXY_METHOD0(rtc::scoped_refptr, remote_streams) PROXY_METHOD1(bool, AddStream, MediaStreamInterface*) + PROXY_METHOD2(bool, AddStream, MediaStreamInterface*, + const MediaConstraintsInterface*); PROXY_METHOD1(void, RemoveStream, MediaStreamInterface*) PROXY_METHOD1(rtc::scoped_refptr, CreateDtmfSender, AudioTrackInterface*) -- cgit v1.2.3