WebRTC: Add addReceiver() function to PeerConnectionBackendClient interface
authoradam.bergkvist@ericsson.com <adam.bergkvist@ericsson.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 24 Feb 2016 08:12:14 +0000 (08:12 +0000)
committeradam.bergkvist@ericsson.com <adam.bergkvist@ericsson.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 24 Feb 2016 08:12:14 +0000 (08:12 +0000)
https://bugs.webkit.org/show_bug.cgi?id=154583

Reviewed by Eric Carlson.

The addRecevier() notifies the PeerConnectionBackendClient that a new RTCRtpReceiver,
representing an MediaStreamTrack received from a remote peer, is added.

* Modules/mediastream/PeerConnectionBackend.h:
* Modules/mediastream/RTCPeerConnection.cpp:
(WebCore::RTCPeerConnection::addReceiver):
* Modules/mediastream/RTCPeerConnection.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@197019 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebCore/ChangeLog
Source/WebCore/Modules/mediastream/PeerConnectionBackend.h
Source/WebCore/Modules/mediastream/RTCPeerConnection.cpp
Source/WebCore/Modules/mediastream/RTCPeerConnection.h

index 06deb2e..2b16674 100644 (file)
@@ -1,3 +1,18 @@
+2016-02-24  Adam Bergkvist  <adam.bergkvist@ericsson.com>
+
+        WebRTC: Add addReceiver() function to PeerConnectionBackendClient interface
+        https://bugs.webkit.org/show_bug.cgi?id=154583
+
+        Reviewed by Eric Carlson.
+
+        The addRecevier() notifies the PeerConnectionBackendClient that a new RTCRtpReceiver,
+        representing an MediaStreamTrack received from a remote peer, is added.
+
+        * Modules/mediastream/PeerConnectionBackend.h:
+        * Modules/mediastream/RTCPeerConnection.cpp:
+        (WebCore::RTCPeerConnection::addReceiver):
+        * Modules/mediastream/RTCPeerConnection.h:
+
 2016-02-23  Olivier Blin  <olivier.blin@softathome.com>
 
         Support building LocaleICU with light ICU (UCONFIG_NO_FORMATTING)
index 898d784..42580bf 100644 (file)
@@ -46,6 +46,7 @@ class RTCAnswerOptions;
 class RTCConfiguration;
 class RTCIceCandidate;
 class RTCOfferOptions;
+class RTCRtpReceiver;
 class RTCRtpSender;
 class RTCSessionDescription;
 class RTCStatsResponse;
@@ -62,6 +63,7 @@ public:
     virtual Vector<RefPtr<RTCRtpSender>> getSenders() const = 0;
     virtual void fireEvent(Event&) = 0;
 
+    virtual void addReceiver(RTCRtpReceiver&) = 0;
     virtual void setSignalingState(PeerConnectionStates::SignalingState) = 0;
     virtual void updateIceGatheringState(PeerConnectionStates::IceGatheringState) = 0;
     virtual void updateIceConnectionState(PeerConnectionStates::IceConnectionState) = 0;
index f4f8899..4178440 100644 (file)
@@ -391,6 +391,11 @@ bool RTCPeerConnection::canSuspendForDocumentSuspension() const
     return false;
 }
 
+void RTCPeerConnection::addReceiver(RTCRtpReceiver& receiver)
+{
+    m_receiverSet.append(&receiver);
+}
+
 void RTCPeerConnection::setSignalingState(SignalingState newState)
 {
     m_signalingState = newState;
index 280a6fa..a7d91cd 100644 (file)
@@ -120,6 +120,7 @@ private:
     bool canSuspendForDocumentSuspension() const override;
 
     // PeerConnectionBackendClient
+    void addReceiver(RTCRtpReceiver&) override;
     void setSignalingState(PeerConnectionStates::SignalingState) override;
     void updateIceGatheringState(PeerConnectionStates::IceGatheringState) override;
     void updateIceConnectionState(PeerConnectionStates::IceConnectionState) override;