WebKit Bugzilla
Attachment 357270 Details for
Bug 192685
: RTCRtpTransceiver.stopped should be true when applying a remote description with the corresponding m section rejected
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-192685-20181213163326.patch (text/plain), 8.37 KB, created by
youenn fablet
on 2018-12-13 16:33:21 PST
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
youenn fablet
Created:
2018-12-13 16:33:21 PST
Size:
8.37 KB
patch
obsolete
>Subversion Revision: 239107 >diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog >index 66f433405664ea9b68655b0eb2e683d470e0eb3a..fb54093c935f3b1424c394fd44fe6f7ec62c55a9 100644 >--- a/Source/WebCore/ChangeLog >+++ b/Source/WebCore/ChangeLog >@@ -1,3 +1,25 @@ >+2018-12-13 Youenn Fablet <youenn@apple.com> >+ >+ RTCRtpTransceiver.stopped should be true when applying a remote description with the corresponding m section rejected >+ https://bugs.webkit.org/show_bug.cgi?id=192685 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ In case the remote description contains a rejected m section, >+ the corresponding transceiver should be marked as stopped. >+ Libwebrtc backend has that information so pipe it up to JS. >+ >+ Covered by updated WPT test. >+ >+ * Modules/mediastream/RTCRtpTransceiver.cpp: >+ (WebCore::RTCRtpTransceiver::stopped const): >+ * Modules/mediastream/RTCRtpTransceiver.h: >+ (WebCore::RTCRtpTransceiver::stopped const): Deleted. >+ * Modules/mediastream/RTCRtpTransceiverBackend.h: >+ * Modules/mediastream/libwebrtc/LibWebRTCRtpTransceiverBackend.cpp: >+ (WebCore::LibWebRTCRtpTransceiverBackend::stopped const): >+ * Modules/mediastream/libwebrtc/LibWebRTCRtpTransceiverBackend.h: >+ > 2018-12-13 Youenn Fablet <youenn@apple.com> > > Trying to play a media element synchronously after setting srcObject should succeed without user gesture >diff --git a/Source/WebCore/Modules/mediastream/RTCRtpTransceiver.cpp b/Source/WebCore/Modules/mediastream/RTCRtpTransceiver.cpp >index 601246e28a6ca35dbf7b19abfc2cdbc6db3b5a3e..a4015c331c48cddbe076e8e232cac42efd15c7d0 100644 >--- a/Source/WebCore/Modules/mediastream/RTCRtpTransceiver.cpp >+++ b/Source/WebCore/Modules/mediastream/RTCRtpTransceiver.cpp >@@ -114,6 +114,13 @@ void RtpTransceiverSet::append(Ref<RTCRtpTransceiver>&& transceiver) > m_transceivers.append(WTFMove(transceiver)); > } > >+bool RTCRtpTransceiver::stopped() const >+{ >+ if (m_backend) >+ return m_backend->stopped(); >+ return m_stopped; >+} >+ > } // namespace WebCore > > #endif // ENABLE(WEB_RTC) >diff --git a/Source/WebCore/Modules/mediastream/RTCRtpTransceiver.h b/Source/WebCore/Modules/mediastream/RTCRtpTransceiver.h >index b991d72a11afb8a62aadb444686c8edc8e35ad6a..7d1814ceeb586e335cdb3a3007ab0d4583be6783 100644 >--- a/Source/WebCore/Modules/mediastream/RTCRtpTransceiver.h >+++ b/Source/WebCore/Modules/mediastream/RTCRtpTransceiver.h >@@ -62,7 +62,7 @@ public: > RTCRtpSender& sender() { return m_sender.get(); } > RTCRtpReceiver& receiver() { return m_receiver.get(); } > >- bool stopped() const { return m_stopped; } >+ bool stopped() const; > void stop(); > > // FIXME: Temporary solution to keep track of ICE states for this transceiver. Later, each >diff --git a/Source/WebCore/Modules/mediastream/RTCRtpTransceiverBackend.h b/Source/WebCore/Modules/mediastream/RTCRtpTransceiverBackend.h >index f280ea40005adf31936f3bf3267e13cb1fddd8bb..670b2d8d64488f8cade1dbdece68395414661825 100644 >--- a/Source/WebCore/Modules/mediastream/RTCRtpTransceiverBackend.h >+++ b/Source/WebCore/Modules/mediastream/RTCRtpTransceiverBackend.h >@@ -40,6 +40,7 @@ public: > > virtual String mid() = 0; > virtual void stop() = 0; >+ virtual bool stopped() const = 0; > }; > > } // namespace WebCore >diff --git a/Source/WebCore/Modules/mediastream/libwebrtc/LibWebRTCRtpTransceiverBackend.cpp b/Source/WebCore/Modules/mediastream/libwebrtc/LibWebRTCRtpTransceiverBackend.cpp >index 850cfe9e401aedff13125c7a9c46ec7b7b499733..a8983404c818b2407cb9dad34c1eaeb39a548768 100644 >--- a/Source/WebCore/Modules/mediastream/libwebrtc/LibWebRTCRtpTransceiverBackend.cpp >+++ b/Source/WebCore/Modules/mediastream/libwebrtc/LibWebRTCRtpTransceiverBackend.cpp >@@ -73,6 +73,11 @@ void LibWebRTCRtpTransceiverBackend::stop() > m_rtcTransceiver->Stop(); > } > >+bool LibWebRTCRtpTransceiverBackend::stopped() const >+{ >+ return m_rtcTransceiver->stopped(); >+} >+ > } // namespace WebCore > > #endif // ENABLE(WEB_RTC) && USE(LIBWEBRTC) >diff --git a/Source/WebCore/Modules/mediastream/libwebrtc/LibWebRTCRtpTransceiverBackend.h b/Source/WebCore/Modules/mediastream/libwebrtc/LibWebRTCRtpTransceiverBackend.h >index 3a6326edc44709f09168064121eff80a8cfb6976..3112d6bb44295c20473454a0336c4dcb4ff9223f 100644 >--- a/Source/WebCore/Modules/mediastream/libwebrtc/LibWebRTCRtpTransceiverBackend.h >+++ b/Source/WebCore/Modules/mediastream/libwebrtc/LibWebRTCRtpTransceiverBackend.h >@@ -59,6 +59,7 @@ private: > void setDirection(RTCRtpTransceiverDirection) final; > String mid() final; > void stop() final; >+ bool stopped() const final; > > rtc::scoped_refptr<webrtc::RtpTransceiverInterface> m_rtcTransceiver; > }; >diff --git a/LayoutTests/imported/w3c/ChangeLog b/LayoutTests/imported/w3c/ChangeLog >index a3261c09206bde38060240055fb09f6389b8fa52..d3a9614538d98156cc087c008a221b2e21ad83de 100644 >--- a/LayoutTests/imported/w3c/ChangeLog >+++ b/LayoutTests/imported/w3c/ChangeLog >@@ -1,3 +1,13 @@ >+2018-12-13 Youenn Fablet <youenn@apple.com> >+ >+ RTCRtpTransceiver.stopped should be true when applying a remote description with the corresponding m section rejected >+ https://bugs.webkit.org/show_bug.cgi?id=192685 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * web-platform-tests/webrtc/RTCPeerConnection-setDescription-transceiver-expected.txt: >+ * web-platform-tests/webrtc/RTCPeerConnection-setDescription-transceiver.html: >+ > 2018-12-13 Youenn Fablet <youenn@apple.com> > > Change of msid information in the SDP should trigger the corresponding track events >diff --git a/LayoutTests/imported/w3c/web-platform-tests/webrtc/RTCPeerConnection-setDescription-transceiver-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/webrtc/RTCPeerConnection-setDescription-transceiver-expected.txt >index 6b88ae6bdc968ac166080b36ee84e71d6193bef5..dfaf02fa2edd7f4264a9e098229db1ae801ba18e 100644 >--- a/LayoutTests/imported/w3c/web-platform-tests/webrtc/RTCPeerConnection-setDescription-transceiver-expected.txt >+++ b/LayoutTests/imported/w3c/web-platform-tests/webrtc/RTCPeerConnection-setDescription-transceiver-expected.txt >@@ -4,4 +4,5 @@ PASS setRemoteDescription(offer) with m= section and no existing transceiver sho > FAIL setLocalDescription(rollback) should unset transceiver.mid promise_test: Unhandled rejection with value: object "InvalidStateError: Description type incompatible with current signaling state" > FAIL setLocalDescription(rollback) should only unset transceiver mids associated with current round promise_test: Unhandled rejection with value: object "InvalidStateError: Description type incompatible with current signaling state" > FAIL setRemoteDescription(rollback) should remove newly created transceiver from transceiver list promise_test: Unhandled rejection with value: object "InvalidStateError: Description type incompatible with current signaling state" >+PASS setRemoteDescription should stop the transceiver if its corresponding m section is rejected > >diff --git a/LayoutTests/imported/w3c/web-platform-tests/webrtc/RTCPeerConnection-setDescription-transceiver.html b/LayoutTests/imported/w3c/web-platform-tests/webrtc/RTCPeerConnection-setDescription-transceiver.html >index 5fc957df8fb8d93385fb09b37b388399ddef64d3..fd1b16e9f819d357dc478d70947497ae062a6fa3 100644 >--- a/LayoutTests/imported/w3c/web-platform-tests/webrtc/RTCPeerConnection-setDescription-transceiver.html >+++ b/LayoutTests/imported/w3c/web-platform-tests/webrtc/RTCPeerConnection-setDescription-transceiver.html >@@ -238,6 +238,27 @@ > }); > }, 'setRemoteDescription(rollback) should remove newly created transceiver from transceiver list'); > >+ promise_test(async t => { >+ const pc1 = new RTCPeerConnection(); >+ t.add_cleanup(() => pc1.close()); >+ const pc2 = new RTCPeerConnection(); >+ t.add_cleanup(() => pc2.close()); >+ >+ pc1.addTransceiver('audio'); >+ const offer = await pc1.createOffer(); >+ await pc1.setLocalDescription(offer); >+ >+ assert_false(pc1.getTransceivers()[0].stopped, 'Transceiver is not stopped'); >+ >+ await pc2.setRemoteDescription(offer); >+ pc2.getTransceivers()[0].stop(); >+ const answer = await pc2.createAnswer(); >+ >+ await pc1.setRemoteDescription(answer); >+ >+ assert_true(pc1.getTransceivers()[0].stopped, 'Transceiver is stopped'); >+ }, 'setRemoteDescription should stop the transceiver if its corresponding m section is rejected'); >+ > /* > TODO > - Steps for transceiver direction is added to tip of tree draft, but not yet
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 192685
: 357270