WebKit Bugzilla
Attachment 361508 Details for
Bug 194380
: Running RTCRtpSender.getCapabilities("video") before initial offer breaks VP8
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-194380-20190208091913.patch (text/plain), 7.67 KB, created by
youenn fablet
on 2019-02-08 09:19:14 PST
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
youenn fablet
Created:
2019-02-08 09:19:14 PST
Size:
7.67 KB
patch
obsolete
>Subversion Revision: 241123 >diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog >index 90ab4a4951a51f7cee97cfbc0a3b35e4e3039195..e303d6dcc3e9fd3517c2f3e83febab5deda06ac0 100644 >--- a/Source/WebCore/ChangeLog >+++ b/Source/WebCore/ChangeLog >@@ -1,3 +1,28 @@ >+2019-02-08 Youenn Fablet <youenn@apple.com> >+ >+ Running RTCRtpSender.getCapabilities("video") before initial offer breaks VP8 >+ https://bugs.webkit.org/show_bug.cgi?id=194380 >+ <rdar://problem/47916514> >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ Set whether VP8 is supported at creation of the page. >+ This ensures that any call creating a peer connection factory will end up supporting the runtime flag configuration. >+ >+ Add internal API to enable resetting the factory to enable proper testing. >+ >+ Covered by updated test. >+ >+ * Modules/mediastream/libwebrtc/LibWebRTCPeerConnectionBackend.cpp: >+ (WebCore::createLibWebRTCPeerConnectionBackend): >+ * page/Page.cpp: >+ (WebCore::m_applicationManifest): >+ * platform/mediastream/libwebrtc/LibWebRTCProvider.h: >+ * testing/Internals.cpp: >+ (WebCore::Internals::clearPeerConnectionFactory): >+ * testing/Internals.h: >+ * testing/Internals.idl: >+ > 2019-02-07 Youenn Fablet <youenn@apple.com> > > Make to clear sources from UserMediaCaptureManagerProxy and UserMediaCaptureManager when no longer needed >diff --git a/Source/WebCore/Modules/mediastream/libwebrtc/LibWebRTCPeerConnectionBackend.cpp b/Source/WebCore/Modules/mediastream/libwebrtc/LibWebRTCPeerConnectionBackend.cpp >index 1253c0f2c3910e4d17704a727d6c0e7459ea084e..6bc001fe2499d22d4bac2c4d32ec0a10741c6d2e 100644 >--- a/Source/WebCore/Modules/mediastream/libwebrtc/LibWebRTCPeerConnectionBackend.cpp >+++ b/Source/WebCore/Modules/mediastream/libwebrtc/LibWebRTCPeerConnectionBackend.cpp >@@ -58,9 +58,6 @@ static std::unique_ptr<PeerConnectionBackend> createLibWebRTCPeerConnectionBacke > if (!page) > return nullptr; > >-#if USE(LIBWEBRTC) >- page->libWebRTCProvider().supportsVP8(RuntimeEnabledFeatures::sharedFeatures().webRTCVP8CodecEnabled()); >-#endif > return std::make_unique<LibWebRTCPeerConnectionBackend>(peerConnection, page->libWebRTCProvider()); > } > >diff --git a/Source/WebCore/page/Page.cpp b/Source/WebCore/page/Page.cpp >index 78be183006dd7855d3ffb2b3d97aa3f22229c249..690735d4f0cb20c702b2b7b47d48bb2a322e9276 100644 >--- a/Source/WebCore/page/Page.cpp >+++ b/Source/WebCore/page/Page.cpp >@@ -310,6 +310,10 @@ Page::Page(PageConfiguration&& pageConfiguration) > #if PLATFORM(COCOA) > platformInitialize(); > #endif >+ >+#if USE(LIBWEBRTC) >+ m_libWebRTCProvider->supportsVP8(RuntimeEnabledFeatures::sharedFeatures().webRTCVP8CodecEnabled()); >+#endif > } > > Page::~Page() >diff --git a/Source/WebCore/platform/mediastream/libwebrtc/LibWebRTCProvider.h b/Source/WebCore/platform/mediastream/libwebrtc/LibWebRTCProvider.h >index a31bd6a3b4f5b20ce3ab4e85c6f97c26bcef2804..0faf6957432b7629c6a9406ab601127df668756e 100644 >--- a/Source/WebCore/platform/mediastream/libwebrtc/LibWebRTCProvider.h >+++ b/Source/WebCore/platform/mediastream/libwebrtc/LibWebRTCProvider.h >@@ -113,6 +113,8 @@ public: > Optional<RTCRtpCapabilities> receiverCapabilities(const String& kind); > Optional<RTCRtpCapabilities> senderCapabilities(const String& kind); > >+ void clearFactory() { m_factory = nullptr; } >+ > protected: > LibWebRTCProvider() = default; > >diff --git a/Source/WebCore/testing/Internals.cpp b/Source/WebCore/testing/Internals.cpp >index 63d9af0536eef5e112959a5ea3540e6ab37e0db6..ef79836b8e59f66f3abfec684953f5788651ea1d 100644 >--- a/Source/WebCore/testing/Internals.cpp >+++ b/Source/WebCore/testing/Internals.cpp >@@ -1463,6 +1463,14 @@ void Internals::stopPeerConnection(RTCPeerConnection& connection) > object.stop(); > } > >+void Internals::clearPeerConnectionFactory() >+{ >+#if USE(LIBWEBRTC) >+ if (auto* page = contextDocument()->page()) >+ page->libWebRTCProvider().clearFactory(); >+#endif >+} >+ > void Internals::applyRotationForOutgoingVideoSources(RTCPeerConnection& connection) > { > connection.applyRotationForOutgoingVideoSources(); >diff --git a/Source/WebCore/testing/Internals.h b/Source/WebCore/testing/Internals.h >index 37c5490d477ff54852a1400bb24975ffed86b429..084f4828934b51eea95c0ad16155136dcd399c73 100644 >--- a/Source/WebCore/testing/Internals.h >+++ b/Source/WebCore/testing/Internals.h >@@ -517,6 +517,7 @@ public: > void setICECandidateFiltering(bool); > void setEnumeratingAllNetworkInterfacesEnabled(bool); > void stopPeerConnection(RTCPeerConnection&); >+ void clearPeerConnectionFactory(); > void applyRotationForOutgoingVideoSources(RTCPeerConnection&); > #endif > >diff --git a/Source/WebCore/testing/Internals.idl b/Source/WebCore/testing/Internals.idl >index 0e746595da3af637cb7611324f69b8f20f33d04d..b911c2590b55104363d4efd8d5129d36732c5d52 100644 >--- a/Source/WebCore/testing/Internals.idl >+++ b/Source/WebCore/testing/Internals.idl >@@ -582,6 +582,7 @@ enum CompositingPolicy { > [Conditional=WEB_RTC] void setICECandidateFiltering(boolean enabled); > [Conditional=WEB_RTC] void setEnumeratingAllNetworkInterfacesEnabled(boolean enabled); > [Conditional=WEB_RTC] void stopPeerConnection(RTCPeerConnection connection); >+ [Conditional=WEB_RTC] void clearPeerConnectionFactory(); > > [Conditional=VIDEO] void simulateSystemSleep(); > [Conditional=VIDEO] void simulateSystemWake(); >diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog >index 58975ddb5e56a86fc400dc56bd48683ebf86e68d..678d3cd5f7776e69387e9baf5479303f6009c635 100644 >--- a/LayoutTests/ChangeLog >+++ b/LayoutTests/ChangeLog >@@ -1,3 +1,14 @@ >+2019-02-08 Youenn Fablet <youenn@apple.com> >+ >+ Running RTCRtpSender.getCapabilities("video") before initial offer breaks VP8 >+ https://bugs.webkit.org/show_bug.cgi?id=194380 >+ <rdar://problem/47916514> >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * webrtc/video-mute-vp8-expected.txt: >+ * webrtc/video-mute-vp8.html: >+ > 2019-02-07 Youenn Fablet <youenn@apple.com> > > Filter out Overconstrainederror.constraint when getUserMedia is not granted >diff --git a/LayoutTests/webrtc/video-mute-vp8-expected.txt b/LayoutTests/webrtc/video-mute-vp8-expected.txt >index 0a2587522eea53b18c183b0d3226ab59b021b9d5..6949db47445f0967c9683cd3a74d513228040689 100644 >--- a/LayoutTests/webrtc/video-mute-vp8-expected.txt >+++ b/LayoutTests/webrtc/video-mute-vp8-expected.txt >@@ -2,6 +2,7 @@ Video should be running, go to black and running. > Following, should be a snapshot of the video, a black frame and a snapshot of the video. > > >+PASS Verify VP8 activation > PASS Setting video exchange > PASS Ensuring connection state is connected > PASS Track is enabled, video should not be black >diff --git a/LayoutTests/webrtc/video-mute-vp8.html b/LayoutTests/webrtc/video-mute-vp8.html >index d5604a088b8a5c5f5a6de201ffc0b0c9c52c671a..d6141937063a122babc29e3ea2577793ef7b9b22 100644 >--- a/LayoutTests/webrtc/video-mute-vp8.html >+++ b/LayoutTests/webrtc/video-mute-vp8.html >@@ -15,6 +15,20 @@ > <canvas id="canvas3" width="320" height="240"></canvas> > <script src ="routines.js"></script> > <script> >+promise_test(async (test) => { >+ if (window.internals) >+ window.internals.clearPeerConnectionFactory(); >+ >+ const codecs = RTCRtpSender.getCapabilities("video").codecs; >+ assert_true(codecs.some((codec) => { return codec.mimeType.indexOf("VP8") }), "VP8 is listed as a codec"); >+ >+ const pc = new RTCPeerConnection(); >+ pc.addTransceiver("video"); >+ const description = await pc.createOffer(); >+ pc.close(); >+ assert_true(description.sdp.indexOf("VP8") !== -1, "VP8 codec is in the SDP"); >+}, "Verify VP8 activation") >+ > var track; > var remoteTrack; > var receivingConnection;
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 194380
: 361508