Title: [259311] branches/safari-609-branch/Source/WebCore
Revision
259311
Author
[email protected]
Date
2020-03-31 14:11:11 -0700 (Tue, 31 Mar 2020)

Log Message

Cherry-pick r258326. rdar://problem/61113047

    Remove no longer used code in LibWebRTCMediaEndpoint to handle remote streams
    https://bugs.webkit.org/show_bug.cgi?id=208919

    Reviewed by Eric Carlson.

    These stream APIs are legacy now and not useful anymore.
    Stop implementing the corresponding callbacks and remove related code.
    Coverd by existing tests.

    * Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.cpp:
    (WebCore::LibWebRTCMediaEndpoint::addRemoteStream): Deleted.
    (WebCore::LibWebRTCMediaEndpoint::addRemoteTrack): Deleted.
    (WebCore::LibWebRTCMediaEndpoint::OnAddStream): Deleted.
    * Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.h:

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

Modified Paths

Diff

Modified: branches/safari-609-branch/Source/WebCore/ChangeLog (259310 => 259311)


--- branches/safari-609-branch/Source/WebCore/ChangeLog	2020-03-31 20:57:09 UTC (rev 259310)
+++ branches/safari-609-branch/Source/WebCore/ChangeLog	2020-03-31 21:11:11 UTC (rev 259311)
@@ -1,3 +1,42 @@
+2020-03-31  Russell Epstein  <[email protected]>
+
+        Cherry-pick r258326. rdar://problem/61113047
+
+    Remove no longer used code in LibWebRTCMediaEndpoint to handle remote streams
+    https://bugs.webkit.org/show_bug.cgi?id=208919
+    
+    Reviewed by Eric Carlson.
+    
+    These stream APIs are legacy now and not useful anymore.
+    Stop implementing the corresponding callbacks and remove related code.
+    Coverd by existing tests.
+    
+    * Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.cpp:
+    (WebCore::LibWebRTCMediaEndpoint::addRemoteStream): Deleted.
+    (WebCore::LibWebRTCMediaEndpoint::addRemoteTrack): Deleted.
+    (WebCore::LibWebRTCMediaEndpoint::OnAddStream): Deleted.
+    * Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.h:
+    
+    
+    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@258326 268f45cc-cd09-0410-ab3c-d52691b4dbfc
+
+    2020-03-12  youenn fablet  <[email protected]>
+
+            Remove no longer used code in LibWebRTCMediaEndpoint to handle remote streams
+            https://bugs.webkit.org/show_bug.cgi?id=208919
+
+            Reviewed by Eric Carlson.
+
+            These stream APIs are legacy now and not useful anymore.
+            Stop implementing the corresponding callbacks and remove related code.
+            Coverd by existing tests.
+
+            * Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.cpp:
+            (WebCore::LibWebRTCMediaEndpoint::addRemoteStream): Deleted.
+            (WebCore::LibWebRTCMediaEndpoint::addRemoteTrack): Deleted.
+            (WebCore::LibWebRTCMediaEndpoint::OnAddStream): Deleted.
+            * Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.h:
+
 2020-03-30  Alan Coon  <[email protected]>
 
         Cherry-pick r258837. rdar://problem/61064858

Modified: branches/safari-609-branch/Source/WebCore/Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.cpp (259310 => 259311)


--- branches/safari-609-branch/Source/WebCore/Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.cpp	2020-03-31 20:57:09 UTC (rev 259310)
+++ branches/safari-609-branch/Source/WebCore/Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.cpp	2020-03-31 21:11:11 UTC (rev 259311)
@@ -354,44 +354,6 @@
     return *mediaStream.iterator->value;
 }
 
-void LibWebRTCMediaEndpoint::addRemoteStream(webrtc::MediaStreamInterface&)
-{
-}
-
-void LibWebRTCMediaEndpoint::addRemoteTrack(rtc::scoped_refptr<webrtc::RtpReceiverInterface>&& rtcReceiver, const std::vector<rtc::scoped_refptr<webrtc::MediaStreamInterface>>& rtcStreams)
-{
-    ASSERT(rtcReceiver);
-    RefPtr<RTCRtpReceiver> receiver;
-    RefPtr<RealtimeMediaSource> remoteSource;
-
-    auto* rtcTrack = rtcReceiver->track().get();
-
-    switch (rtcReceiver->media_type()) {
-    case cricket::MEDIA_TYPE_DATA:
-        return;
-    case cricket::MEDIA_TYPE_AUDIO: {
-        rtc::scoped_refptr<webrtc::AudioTrackInterface> audioTrack = static_cast<webrtc::AudioTrackInterface*>(rtcTrack);
-        auto audioReceiver = m_peerConnectionBackend.audioReceiver(fromStdString(rtcTrack->id()));
-
-        receiver = WTFMove(audioReceiver.receiver);
-        audioReceiver.source->setSourceTrack(WTFMove(audioTrack));
-        break;
-    }
-    case cricket::MEDIA_TYPE_VIDEO: {
-        rtc::scoped_refptr<webrtc::VideoTrackInterface> videoTrack = static_cast<webrtc::VideoTrackInterface*>(rtcTrack);
-        auto videoReceiver = m_peerConnectionBackend.videoReceiver(fromStdString(rtcTrack->id()));
-
-        receiver = WTFMove(videoReceiver.receiver);
-        videoReceiver.source->setSourceTrack(WTFMove(videoTrack));
-        break;
-    }
-    }
-
-    receiver->setBackend(makeUnique<LibWebRTCRtpReceiverBackend>(WTFMove(rtcReceiver)));
-    auto& track = receiver->track();
-    addPendingTrackEvent(receiver.releaseNonNull(), track, rtcStreams, nullptr);
-}
-
 void LibWebRTCMediaEndpoint::addPendingTrackEvent(Ref<RTCRtpReceiver>&& receiver, MediaStreamTrack& track, const std::vector<rtc::scoped_refptr<webrtc::MediaStreamInterface>>& rtcStreams, RefPtr<RTCRtpTransceiver>&& transceiver)
 {
     Vector<RefPtr<MediaStream>> streams;
@@ -524,7 +486,6 @@
     return nullptr;
 }
 
-
 void LibWebRTCMediaEndpoint::removeRemoteStream(webrtc::MediaStreamInterface& rtcStream)
 {
     bool removed = m_remoteStreamsById.remove(fromStdString(rtcStream.id()));
@@ -531,16 +492,6 @@
     ASSERT_UNUSED(removed, removed);
 }
 
-void LibWebRTCMediaEndpoint::OnAddStream(rtc::scoped_refptr<webrtc::MediaStreamInterface> stream)
-{
-    callOnMainThread([protectedThis = makeRef(*this), stream = WTFMove(stream)] {
-        if (protectedThis->isStopped())
-            return;
-        ASSERT(stream);
-        protectedThis->addRemoteStream(*stream.get());
-    });
-}
-
 void LibWebRTCMediaEndpoint::OnRemoveStream(rtc::scoped_refptr<webrtc::MediaStreamInterface> stream)
 {
     callOnMainThread([protectedThis = makeRef(*this), stream = WTFMove(stream)] {

Modified: branches/safari-609-branch/Source/WebCore/Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.h (259310 => 259311)


--- branches/safari-609-branch/Source/WebCore/Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.h	2020-03-31 20:57:09 UTC (rev 259310)
+++ branches/safari-609-branch/Source/WebCore/Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.h	2020-03-31 21:11:11 UTC (rev 259311)
@@ -122,7 +122,6 @@
 
     // webrtc::PeerConnectionObserver API
     void OnSignalingChange(webrtc::PeerConnectionInterface::SignalingState) final;
-    void OnAddStream(rtc::scoped_refptr<webrtc::MediaStreamInterface>) final;
     void OnRemoveStream(rtc::scoped_refptr<webrtc::MediaStreamInterface>) final;
     void OnDataChannel(rtc::scoped_refptr<webrtc::DataChannelInterface>) final;
     void OnTrack(rtc::scoped_refptr<webrtc::RtpTransceiverInterface>) final;
@@ -140,8 +139,6 @@
     void setLocalSessionDescriptionFailed(ExceptionCode, const char*);
     void setRemoteSessionDescriptionSucceeded();
     void setRemoteSessionDescriptionFailed(ExceptionCode, const char*);
-    void addRemoteStream(webrtc::MediaStreamInterface&);
-    void addRemoteTrack(rtc::scoped_refptr<webrtc::RtpReceiverInterface>&&, const std::vector<rtc::scoped_refptr<webrtc::MediaStreamInterface>>&);
     void removeRemoteStream(webrtc::MediaStreamInterface&);
     void newTransceiver(rtc::scoped_refptr<webrtc::RtpTransceiverInterface>&&);
     void removeRemoteTrack(rtc::scoped_refptr<webrtc::RtpReceiverInterface>&&);
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to