Changeset 270256 in webkit
- Timestamp:
- Nov 30, 2020 11:36:55 AM (20 months ago)
- Location:
- trunk
- Files:
-
- 24 edited
-
LayoutTests/ChangeLog (modified) (1 diff)
-
LayoutTests/webrtc/vp9-expected.txt (modified) (1 diff)
-
LayoutTests/webrtc/vp9-vtb.html (modified) (1 diff)
-
LayoutTests/webrtc/vp9.html (modified) (1 diff)
-
Source/ThirdParty/libwebrtc/ChangeLog (modified) (1 diff)
-
Source/ThirdParty/libwebrtc/Source/webrtc/sdk/WebKit/WebKitDecoder.mm (modified) (1 diff)
-
Source/ThirdParty/libwebrtc/Source/webrtc/sdk/WebKit/WebKitEncoder.mm (modified) (1 diff)
-
Source/ThirdParty/libwebrtc/Source/webrtc/sdk/WebKit/WebKitUtilities.h (modified) (1 diff)
-
Source/ThirdParty/libwebrtc/Source/webrtc/sdk/objc/components/video_codec/RTCDefaultVideoDecoderFactory.h (modified) (1 diff)
-
Source/ThirdParty/libwebrtc/Source/webrtc/sdk/objc/components/video_codec/RTCDefaultVideoDecoderFactory.m (modified) (2 diffs)
-
Source/ThirdParty/libwebrtc/Source/webrtc/sdk/objc/components/video_codec/RTCDefaultVideoEncoderFactory.h (modified) (1 diff)
-
Source/ThirdParty/libwebrtc/Source/webrtc/sdk/objc/components/video_codec/RTCDefaultVideoEncoderFactory.m (modified) (4 diffs)
-
Source/WTF/ChangeLog (modified) (1 diff)
-
Source/WTF/Scripts/Preferences/WebPreferencesExperimental.yaml (modified) (1 diff)
-
Source/WebCore/ChangeLog (modified) (1 diff)
-
Source/WebCore/page/Page.cpp (modified) (1 diff)
-
Source/WebCore/page/RuntimeEnabledFeatures.h (modified) (2 diffs)
-
Source/WebCore/platform/mediastream/libwebrtc/LibWebRTCProvider.h (modified) (3 diffs)
-
Source/WebCore/platform/mediastream/libwebrtc/LibWebRTCProviderCocoa.cpp (modified) (2 diffs)
-
Source/WebCore/testing/Internals.cpp (modified) (1 diff)
-
Source/WebCore/testing/Internals.h (modified) (1 diff)
-
Source/WebCore/testing/Internals.idl (modified) (1 diff)
-
Source/WebKit/ChangeLog (modified) (1 diff)
-
Source/WebKit/WebProcess/WebPage/WebPage.cpp (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r270255 r270256 1 2020-11-30 Youenn Fablet <youenn@apple.com> 2 3 Introduce an experimental flag specific to VP9 profile 2 4 https://bugs.webkit.org/show_bug.cgi?id=219350 5 6 Reviewed by Eric Carlson. 7 8 * webrtc/vp9-expected.txt: 9 * webrtc/vp9-vtb.html: 10 * webrtc/vp9.html: 11 1 12 2020-11-30 Youenn Fablet <youenn@apple.com> 2 13 -
trunk/LayoutTests/webrtc/vp9-expected.txt
r267644 r270256 1 1 2 2 3 PASS VP9 in getCapabilities 3 PASS VP9 in sender getCapabilities 4 PASS VP9 in receiver getCapabilities 4 5 PASS Verify VP9 activation 5 6 PASS Setting video exchange -
trunk/LayoutTests/webrtc/vp9-vtb.html
r268805 r270256 17 17 test(() => { 18 18 if (window.internals) { 19 window.internals.setWebRTCVP9Support(true );19 window.internals.setWebRTCVP9Support(true, true); 20 20 window.internals.setWebRTCVP9VTBSupport(true); 21 21 } -
trunk/LayoutTests/webrtc/vp9.html
r263820 r270256 14 14 <script src ="routines.js"></script> 15 15 <script> 16 let hasVP9 ;16 let hasVP9 = false; 17 17 test(() => { 18 18 if (window.internals) 19 window.internals.setWebRTCVP9Support(false );19 window.internals.setWebRTCVP9Support(false, false); 20 20 21 21 let codecs = RTCRtpSender.getCapabilities("video").codecs; 22 hasVP9 = codecs.some((codec) => { return codec.mimeType == "video/VP9"; });23 assert_ false(hasVP9);22 vp9Codecs = codecs.filter(codec => codec.mimeType === "video/VP9"); 23 assert_equals(vp9Codecs.length, 0, "no vp9 codec"); 24 24 25 25 if (window.internals) 26 window.internals.setWebRTCVP9Support(true );26 window.internals.setWebRTCVP9Support(true, false); 27 27 28 28 codecs = RTCRtpSender.getCapabilities("video").codecs; 29 hasVP9 = codecs.some((codec) => { return codec.mimeType == "video/VP9"; }); 30 assert_true(hasVP9); 31 }, "VP9 in getCapabilities"); 29 vp9Codecs = codecs.filter(codec => codec.mimeType === "video/VP9"); 30 assert_equals(vp9Codecs.length, 1, "One vp9 codec"); 31 assert_equals(vp9Codecs[0].sdpFmtpLine, "profile-id=0", "profile 0"); 32 33 if (window.internals) 34 window.internals.setWebRTCVP9Support(true, true); 35 36 codecs = RTCRtpSender.getCapabilities("video").codecs; 37 vp9Codecs = codecs.filter(codec => codec.mimeType === "video/VP9"); 38 assert_equals(vp9Codecs[0].sdpFmtpLine, "profile-id=0", "first codec"); 39 assert_equals(vp9Codecs[1].sdpFmtpLine, "profile-id=2", "second codec"); 40 41 hasVP9 = true; 42 }, "VP9 in sender getCapabilities"); 43 44 test(() => { 45 if (window.internals) 46 window.internals.setWebRTCVP9Support(false, false); 47 48 let codecs = RTCRtpReceiver.getCapabilities("video").codecs; 49 vp9Codecs = codecs.filter(codec => codec.mimeType === "video/VP9"); 50 assert_equals(vp9Codecs.length, 0, "no vp9 codec"); 51 52 if (window.internals) 53 window.internals.setWebRTCVP9Support(true, false); 54 55 codecs = RTCRtpReceiver.getCapabilities("video").codecs; 56 vp9Codecs = codecs.filter(codec => codec.mimeType === "video/VP9"); 57 assert_equals(vp9Codecs.length, 1, "One vp9 codec"); 58 assert_equals(vp9Codecs[0].sdpFmtpLine, "profile-id=0", "profile 0"); 59 60 if (window.internals) 61 window.internals.setWebRTCVP9Support(true, true); 62 63 codecs = RTCRtpReceiver.getCapabilities("video").codecs; 64 vp9Codecs = codecs.filter(codec => codec.mimeType === "video/VP9"); 65 assert_equals(vp9Codecs[0].sdpFmtpLine, "profile-id=0", "first codec"); 66 assert_equals(vp9Codecs[1].sdpFmtpLine, "profile-id=2", "second codec"); 67 }, "VP9 in receiver getCapabilities"); 32 68 33 69 if (hasVP9) { -
trunk/Source/ThirdParty/libwebrtc/ChangeLog
r270181 r270256 1 2020-11-30 Youenn Fablet <youenn@apple.com> 2 3 Introduce an experimental flag specific to VP9 profile 2 4 https://bugs.webkit.org/show_bug.cgi?id=219350 5 6 Reviewed by Eric Carlson. 7 8 Allow to enable profile 0 but not profile 2 for VP9 encoder and decoder. 9 10 * Source/webrtc/sdk/WebKit/WebKitDecoder.mm: 11 (webrtc::createWebKitDecoderFactory): 12 * Source/webrtc/sdk/WebKit/WebKitEncoder.mm: 13 (webrtc::createWebKitEncoderFactory): 14 * Source/webrtc/sdk/WebKit/WebKitUtilities.h: 15 * Source/webrtc/sdk/objc/components/video_codec/RTCDefaultVideoDecoderFactory.h: 16 * Source/webrtc/sdk/objc/components/video_codec/RTCDefaultVideoDecoderFactory.m: 17 (-[RTCDefaultVideoDecoderFactory initWithH265:vp9Profile0:vp9Profile2:vp9VTB:]): 18 (-[RTCDefaultVideoDecoderFactory supportedCodecs]): 19 (-[RTCDefaultVideoDecoderFactory initWithH265:vp9:vp9VTB:]): Deleted. 20 * Source/webrtc/sdk/objc/components/video_codec/RTCDefaultVideoEncoderFactory.h: 21 * Source/webrtc/sdk/objc/components/video_codec/RTCDefaultVideoEncoderFactory.m: 22 (-[RTCDefaultVideoEncoderFactory initWithH265:vp9Profile0:vp9Profile2:lowLatencyH264:]): 23 (+[RTCDefaultVideoEncoderFactory supportedCodecs]): 24 (+[RTCDefaultVideoEncoderFactory supportedCodecsWithH265:vp9Profile0:vp9Profile2:]): 25 (-[RTCDefaultVideoEncoderFactory supportedCodecs]): 26 (-[RTCDefaultVideoEncoderFactory initWithH265:vp9:lowLatencyH264:]): Deleted. 27 (+[RTCDefaultVideoEncoderFactory supportedCodecsWithH265:vp9:]): Deleted. 28 1 29 2020-11-27 Youenn Fablet <youenn@apple.com> 2 30 -
trunk/Source/ThirdParty/libwebrtc/Source/webrtc/sdk/WebKit/WebKitDecoder.mm
r269306 r270256 226 226 std::unique_ptr<webrtc::VideoDecoderFactory> createWebKitDecoderFactory(WebKitH265 supportsH265, WebKitVP9 supportsVP9, WebKitVP9VTB supportsVP9VTB) 227 227 { 228 auto internalFactory = ObjCToNativeVideoDecoderFactory([[RTCDefaultVideoDecoderFactory alloc] initWithH265: supportsH265 == WebKitH265::On vp9 : supportsVP9 == WebKitVP9::Onvp9VTB: supportsVP9VTB == WebKitVP9VTB::On]);228 auto internalFactory = ObjCToNativeVideoDecoderFactory([[RTCDefaultVideoDecoderFactory alloc] initWithH265: supportsH265 == WebKitH265::On vp9Profile0:supportsVP9 > WebKitVP9::Off vp9Profile2:supportsVP9 == WebKitVP9::Profile0And2 vp9VTB: supportsVP9VTB == WebKitVP9VTB::On]); 229 229 if (videoDecoderCallbacks().createCallback) 230 230 return std::make_unique<RemoteVideoDecoderFactory>(std::move(internalFactory)); -
trunk/Source/ThirdParty/libwebrtc/Source/webrtc/sdk/WebKit/WebKitEncoder.mm
r269782 r270256 221 221 #endif 222 222 223 auto internalFactory = ObjCToNativeVideoEncoderFactory([[RTCDefaultVideoEncoderFactory alloc] initWithH265: supportsH265 == WebKitH265::On vp9 :supportsVP9 == WebKitVP9::OnlowLatencyH264:useH264LowLatency == WebKitH264LowLatency::On]);223 auto internalFactory = ObjCToNativeVideoEncoderFactory([[RTCDefaultVideoEncoderFactory alloc] initWithH265: supportsH265 == WebKitH265::On vp9Profile0:supportsVP9 > WebKitVP9::Off vp9Profile2:supportsVP9 == WebKitVP9::Profile0And2 lowLatencyH264:useH264LowLatency == WebKitH264LowLatency::On]); 224 224 225 225 if (videoEncoderCallbacks().createCallback) -
trunk/Source/ThirdParty/libwebrtc/Source/webrtc/sdk/WebKit/WebKitUtilities.h
r269293 r270256 37 37 38 38 enum class WebKitH265 { Off, On }; 39 enum class WebKitVP9 { Off, On};39 enum class WebKitVP9 { Off, Profile0, Profile0And2 }; 40 40 enum class WebKitVP9VTB { Off, On }; 41 41 enum class WebKitH264LowLatency { Off, On }; -
trunk/Source/ThirdParty/libwebrtc/Source/webrtc/sdk/objc/components/video_codec/RTCDefaultVideoDecoderFactory.h
r268805 r270256 22 22 __attribute__((objc_runtime_name("WK_RTCDefaultVideoDecoderFactory"))) 23 23 @interface RTCDefaultVideoDecoderFactory : NSObject <RTCVideoDecoderFactory> 24 - (id)initWithH265:(bool)supportH265 vp9 :(bool)supportsVP9vp9VTB:(bool)supportsVP9VTB;24 - (id)initWithH265:(bool)supportH265 vp9Profile0:(bool)supportsVP9Profile0 vp9Profile2:(bool)supportsVP9Profile2 vp9VTB:(bool)supportsVP9VTB; 25 25 @end 26 26 -
trunk/Source/ThirdParty/libwebrtc/Source/webrtc/sdk/objc/components/video_codec/RTCDefaultVideoDecoderFactory.m
r269642 r270256 29 29 @implementation RTCDefaultVideoDecoderFactory { 30 30 bool _supportsH265; 31 bool _supportsVP9; 31 bool _supportsVP9Profile0; 32 bool _supportsVP9Profile2; 32 33 bool _supportsVP9VTB; 33 34 } 34 35 35 - (id)initWithH265:(bool)supportsH265 vp9 :(bool)supportsVP9vp9VTB:(bool)supportsVP9VTB36 - (id)initWithH265:(bool)supportsH265 vp9Profile0:(bool)supportsVP9Profile0 vp9Profile2:(bool)supportsVP9Profile2 vp9VTB:(bool)supportsVP9VTB 36 37 { 37 38 self = [super init]; 38 39 if (self) { 39 40 _supportsH265 = supportsH265; 40 _supportsVP9 = supportsVP9; 41 _supportsVP9Profile0 = supportsVP9Profile0; 42 _supportsVP9Profile2 = supportsVP9Profile2; 41 43 // Use kCMVideoCodecType_VP9 once added to CMFormatDescription.h 42 _supportsVP9VTB = supportsVP9&& (supportsVP9VTB || VTIsHardwareDecodeSupported('vp09'));44 _supportsVP9VTB = (supportsVP9Profile0 || supportsVP9Profile2) && (supportsVP9VTB || VTIsHardwareDecodeSupported('vp09')); 43 45 ; 44 46 } … … 81 83 82 84 #if defined(RTC_ENABLE_VP9) 83 if (_supportsVP9 ) {85 if (_supportsVP9Profile0) { 84 86 [codecs addObject:[[RTCVideoCodecInfo alloc] initWithName:kRTCVideoCodecVp9Name parameters: @{ 85 87 @"profile-id" : @"0", 86 88 }]]; 87 89 } 90 if (_supportsVP9Profile2) { 88 91 [codecs addObject:[[RTCVideoCodecInfo alloc] initWithName:kRTCVideoCodecVp9Name parameters: @{ 89 92 @"profile-id" : @"2", -
trunk/Source/ThirdParty/libwebrtc/Source/webrtc/sdk/objc/components/video_codec/RTCDefaultVideoEncoderFactory.h
r269293 r270256 23 23 @interface RTCDefaultVideoEncoderFactory : NSObject <RTCVideoEncoderFactory> 24 24 25 - (id)initWithH265:(bool)supportH265 vp9 :(bool)supportsVP9lowLatencyH264:(bool)useLowLatencyH264;25 - (id)initWithH265:(bool)supportH265 vp9Profile0:(bool)supportsVP9Profile0 vp9Profile2:(bool)supportsVP9Profile2 lowLatencyH264:(bool)useLowLatencyH264; 26 26 + (NSArray<RTCVideoCodecInfo *> *)supportedCodecs; 27 + (NSArray<RTCVideoCodecInfo *> *)supportedCodecsWithH265:(bool)supportsH265 vp9 :(bool)supportsVP9;27 + (NSArray<RTCVideoCodecInfo *> *)supportedCodecsWithH265:(bool)supportsH265 vp9Profile0:(bool)supportsVP9Profile0 vp9Profile2:(bool)supportsVP9Profile2; 28 28 29 29 @end -
trunk/Source/ThirdParty/libwebrtc/Source/webrtc/sdk/objc/components/video_codec/RTCDefaultVideoEncoderFactory.m
r269642 r270256 26 26 @implementation RTCDefaultVideoEncoderFactory { 27 27 bool _supportsH265; 28 bool _supportsVP9; 28 bool _supportsVP9Profile0; 29 bool _supportsVP9Profile2; 29 30 bool _useLowLatencyH264; 30 31 } 31 32 32 - (id)initWithH265:(bool)supportsH265 vp9 :(bool)supportsVP9lowLatencyH264:(bool)useLowLatencyH26433 - (id)initWithH265:(bool)supportsH265 vp9Profile0:(bool)supportsVP9Profile0 vp9Profile2:(bool)supportsVP9Profile2 lowLatencyH264:(bool)useLowLatencyH264 33 34 { 34 35 self = [super init]; 35 36 if (self) { 36 _supportsH265 = supportsH265; 37 _supportsVP9 = supportsVP9; 38 _useLowLatencyH264 = useLowLatencyH264; 37 _supportsH265 = supportsH265; 38 _supportsVP9Profile0 = supportsVP9Profile0; 39 _supportsVP9Profile2 = supportsVP9Profile2; 40 _useLowLatencyH264 = useLowLatencyH264; 39 41 } 40 42 return self; … … 42 44 43 45 + (NSArray<RTCVideoCodecInfo *> *)supportedCodecs { 44 return [self supportedCodecsWithH265:true vp9 :true];46 return [self supportedCodecsWithH265:true vp9Profile0:true vp9Profile2:true]; 45 47 } 46 48 47 + (NSArray<RTCVideoCodecInfo *> *)supportedCodecsWithH265:(bool)supportsH265 vp9 :(bool)supportsVP9{49 + (NSArray<RTCVideoCodecInfo *> *)supportedCodecsWithH265:(bool)supportsH265 vp9Profile0:(bool)supportsVP9Profile0 vp9Profile2:(bool)supportsVP9Profile2 { 48 50 49 51 NSMutableArray<RTCVideoCodecInfo *> *codecs = [[NSMutableArray alloc] initWithCapacity:8]; … … 81 83 82 84 #if defined(RTC_ENABLE_VP9) 83 if (supportsVP9 ) {85 if (supportsVP9Profile0) { 84 86 [codecs addObject:[[RTCVideoCodecInfo alloc] initWithName:kRTCVideoCodecVp9Name parameters: @{ 85 87 @"profile-id" : @"0", 86 88 }]]; 87 89 } 90 if (supportsVP9Profile2) { 88 91 [codecs addObject:[[RTCVideoCodecInfo alloc] initWithName:kRTCVideoCodecVp9Name parameters: @{ 89 92 @"profile-id" : @"2", … … 118 121 119 122 - (NSArray<RTCVideoCodecInfo *> *)supportedCodecs { 120 return [[self class] supportedCodecsWithH265:_supportsH265 vp9 : _supportsVP9];123 return [[self class] supportedCodecsWithH265:_supportsH265 vp9Profile0:_supportsVP9Profile0 vp9Profile2: _supportsVP9Profile2]; 121 124 } 122 125 -
trunk/Source/WTF/ChangeLog
r270219 r270256 1 2020-11-30 Youenn Fablet <youenn@apple.com> 2 3 Introduce an experimental flag specific to VP9 profile 2 4 https://bugs.webkit.org/show_bug.cgi?id=219350 5 6 Reviewed by Eric Carlson. 7 8 * Scripts/Preferences/WebPreferencesExperimental.yaml: 9 1 10 2020-11-28 Per Arne Vollan <pvollan@apple.com> 2 11 -
trunk/Source/WTF/Scripts/Preferences/WebPreferencesExperimental.yaml
r270152 r270256 1038 1038 default: WebKit::defaultWebRTCCodecsInGPUProcess() 1039 1039 1040 # FIXME: Is this implemented for WebKitLegacy? If not, this should be excluded from WebKitLegacy entirely. 1041 WebRTCVP9CodecEnabled: 1042 type: bool 1043 humanReadableName: "WebRTC VP9 codec" 1044 humanReadableDescription: "Enable WebRTC VP9 codec" 1040 WebRTCVP9Profile0CodecEnabled: 1041 type: bool 1042 humanReadableName: "WebRTC VP9 profile 0 codec" 1043 humanReadableDescription: "Enable WebRTC VP9 profile 0 codec" 1044 webcoreBinding: RuntimeEnabledFeatures 1045 condition: ENABLE(WEB_RTC) 1046 defaultValue: 1047 WebKitLegacy: 1048 default: false 1049 WebKit: 1050 default: false 1051 1052 WebRTCVP9Profile2CodecEnabled: 1053 type: bool 1054 humanReadableName: "WebRTC VP9 profile 2 codec" 1055 humanReadableDescription: "Enable WebRTC VP9 profile 2 codec" 1045 1056 webcoreBinding: RuntimeEnabledFeatures 1046 1057 condition: ENABLE(WEB_RTC) -
trunk/Source/WebCore/ChangeLog
r270255 r270256 1 2020-11-30 Youenn Fablet <youenn@apple.com> 2 3 Introduce an experimental flag specific to VP9 profile 2 4 https://bugs.webkit.org/show_bug.cgi?id=219350 5 6 Reviewed by Eric Carlson. 7 8 Introduce an experimental flag for VP9 profile 2. 9 Pass it to libwebrtc backend when creating codec factories. 10 Profile 2 support is only enabled if profile 0 support is also enabled. 11 Covered by updated test. 12 13 * page/Page.cpp: 14 (WebCore::m_shouldRelaxThirdPartyCookieBlocking): 15 * page/RuntimeEnabledFeatures.h: 16 (WebCore::RuntimeEnabledFeatures::webRTCVP9Profile0CodecEnabled const): 17 (WebCore::RuntimeEnabledFeatures::setWebRTCVP9Profile0CodecEnabled): 18 (WebCore::RuntimeEnabledFeatures::webRTCVP9Profile2CodecEnabled const): 19 (WebCore::RuntimeEnabledFeatures::setWebRTCVP9Profile2CodecEnabled): 20 (WebCore::RuntimeEnabledFeatures::webRTCVP9CodecEnabled const): Deleted. 21 (WebCore::RuntimeEnabledFeatures::setWebRTCVP9CodecEnabled): Deleted. 22 * platform/mediastream/libwebrtc/LibWebRTCProvider.h: 23 (WebCore::LibWebRTCProvider::setVP9Support): 24 * platform/mediastream/libwebrtc/LibWebRTCProviderCocoa.cpp: 25 (WebCore::LibWebRTCProviderCocoa::createDecoderFactory): 26 (WebCore::LibWebRTCProviderCocoa::createEncoderFactory): 27 * testing/Internals.cpp: 28 (WebCore::Internals::setWebRTCVP9Support): 29 * testing/Internals.h: 30 * testing/Internals.idl: 31 1 32 2020-11-30 Youenn Fablet <youenn@apple.com> 2 33 -
trunk/Source/WebCore/page/Page.cpp
r269888 r270256 340 340 #if USE(LIBWEBRTC) 341 341 m_libWebRTCProvider->setH265Support(RuntimeEnabledFeatures::sharedFeatures().webRTCH265CodecEnabled()); 342 m_libWebRTCProvider->setVP9Support(RuntimeEnabledFeatures::sharedFeatures().webRTCVP9 CodecEnabled());342 m_libWebRTCProvider->setVP9Support(RuntimeEnabledFeatures::sharedFeatures().webRTCVP9Profile0CodecEnabled(), RuntimeEnabledFeatures::sharedFeatures().webRTCVP9Profile2CodecEnabled()); 343 343 #endif 344 344 -
trunk/Source/WebCore/page/RuntimeEnabledFeatures.h
r269712 r270256 152 152 bool webRTCH265CodecEnabled() const { return m_isWebRTCH265CodecEnabled; } 153 153 void setWebRTCH265CodecEnabled(bool isEnabled) { m_isWebRTCH265CodecEnabled = isEnabled; } 154 bool webRTCVP9CodecEnabled() const { return m_isWebRTCVP9CodecEnabled; } 155 void setWebRTCVP9CodecEnabled(bool isEnabled) { m_isWebRTCVP9CodecEnabled = isEnabled; } 154 bool webRTCVP9Profile0CodecEnabled() const { return m_isWebRTCVP9Profile0CodecEnabled; } 155 void setWebRTCVP9Profile0CodecEnabled(bool isEnabled) { m_isWebRTCVP9Profile0CodecEnabled = isEnabled; } 156 bool webRTCVP9Profile2CodecEnabled() const { return m_isWebRTCVP9Profile2CodecEnabled; } 157 void setWebRTCVP9Profile2CodecEnabled(bool isEnabled) { m_isWebRTCVP9Profile2CodecEnabled = isEnabled; } 156 158 bool webRTCH264LowLatencyEncoderEnabled() const { return m_isWebRTCH264LowLatencyEncoderEnabled; } 157 159 void setWebRTCH264LowLatencyEncoderEnabled(bool isEnabled) { m_isWebRTCH264LowLatencyEncoderEnabled = isEnabled; } … … 313 315 bool m_isWebRTCPlatformCodecsInGPUProcessEnabled { false }; 314 316 bool m_isWebRTCH265CodecEnabled { false }; 315 bool m_isWebRTCVP9CodecEnabled { false }; 317 bool m_isWebRTCVP9Profile0CodecEnabled { false }; 318 bool m_isWebRTCVP9Profile2CodecEnabled { false }; 316 319 bool m_isWebRTCH264LowLatencyEncoderEnabled { false }; 317 320 #endif -
trunk/Source/WebCore/platform/mediastream/libwebrtc/LibWebRTCProvider.h
r268805 r270256 108 108 109 109 void setH265Support(bool value) { m_supportsH265 = value; } 110 void setVP9Support(bool value) { m_supportsVP9 = value; }110 void setVP9Support(bool supportsVP9Profile0, bool supportsVP9Profile2); 111 111 void setVP9VTBSupport(bool value) { m_supportsVP9VTB = value; } 112 112 bool isSupportingH265() const { return m_supportsH265; } 113 bool isSupportingVP9() const { return m_supportsVP9; } 113 bool isSupportingVP9Profile0() const { return m_supportsVP9Profile0; } 114 bool isSupportingVP9Profile2() const { return m_supportsVP9Profile2; } 114 115 bool isSupportingVP9VTB() const { return m_supportsVP9VTB; } 115 116 virtual void disableNonLocalhostConnections() { m_disableNonLocalhostConnections = true; } … … 155 156 bool m_disableNonLocalhostConnections { false }; 156 157 bool m_supportsH265 { false }; 157 bool m_supportsVP9 { false }; 158 bool m_supportsVP9Profile0 { false }; 159 bool m_supportsVP9Profile2 { false }; 158 160 bool m_supportsVP9VTB { false }; 159 161 bool m_enableLogging { true }; … … 161 163 #endif 162 164 }; 165 166 #if USE(LIBWEBRTC) 167 inline void LibWebRTCProvider::setVP9Support(bool supportsVP9Profile0, bool supportsVP9Profile2) 168 { 169 m_supportsVP9Profile0 = supportsVP9Profile0; 170 m_supportsVP9Profile2 = supportsVP9Profile2; 171 } 172 #endif 163 173 164 174 } // namespace WebCore -
trunk/Source/WebCore/platform/mediastream/libwebrtc/LibWebRTCProviderCocoa.cpp
r269293 r270256 65 65 return nullptr; 66 66 67 return webrtc::createWebKitDecoderFactory(isSupportingH265() ? webrtc::WebKitH265::On : webrtc::WebKitH265::Off, isSupportingVP9() ? webrtc::WebKitVP9::On : webrtc::WebKitVP9::Off, isSupportingVP9VTB() ? webrtc::WebKitVP9VTB::On : webrtc::WebKitVP9VTB::Off); 67 auto vp9Support = isSupportingVP9Profile2() ? webrtc::WebKitVP9::Profile0And2 : isSupportingVP9Profile0() ? webrtc::WebKitVP9::Profile0 : webrtc::WebKitVP9::Off; 68 return webrtc::createWebKitDecoderFactory(isSupportingH265() ? webrtc::WebKitH265::On : webrtc::WebKitH265::Off, vp9Support, isSupportingVP9VTB() ? webrtc::WebKitVP9VTB::On : webrtc::WebKitVP9VTB::Off); 68 69 } 69 70 … … 75 76 return nullptr; 76 77 77 return webrtc::createWebKitEncoderFactory(isSupportingH265() ? webrtc::WebKitH265::On : webrtc::WebKitH265::Off, isSupportingVP9() ? webrtc::WebKitVP9::On : webrtc::WebKitVP9::Off, RuntimeEnabledFeatures::sharedFeatures().webRTCH264LowLatencyEncoderEnabled() ? webrtc::WebKitH264LowLatency::On : webrtc::WebKitH264LowLatency::Off); 78 auto vp9Support = isSupportingVP9Profile2() ? webrtc::WebKitVP9::Profile0And2 : isSupportingVP9Profile0() ? webrtc::WebKitVP9::Profile0 : webrtc::WebKitVP9::Off; 79 return webrtc::createWebKitEncoderFactory(isSupportingH265() ? webrtc::WebKitH265::On : webrtc::WebKitH265::Off, vp9Support, RuntimeEnabledFeatures::sharedFeatures().webRTCH264LowLatencyEncoderEnabled() ? webrtc::WebKitH264LowLatency::On : webrtc::WebKitH264LowLatency::Off); 78 80 } 79 81 -
trunk/Source/WebCore/testing/Internals.cpp
r270107 r270256 1557 1557 } 1558 1558 1559 void Internals::setWebRTCVP9Support(bool value)1559 void Internals::setWebRTCVP9Support(bool supportVP9Profile0, bool supportVP9Profile2) 1560 1560 { 1561 1561 #if USE(LIBWEBRTC) 1562 1562 if (auto* page = contextDocument()->page()) { 1563 page->libWebRTCProvider().setVP9Support( value);1563 page->libWebRTCProvider().setVP9Support(supportVP9Profile0, supportVP9Profile2); 1564 1564 page->libWebRTCProvider().clearFactory(); 1565 1565 } -
trunk/Source/WebCore/testing/Internals.h
r270107 r270256 608 608 void applyRotationForOutgoingVideoSources(RTCPeerConnection&); 609 609 void setWebRTCH265Support(bool); 610 void setWebRTCVP9Support(bool );610 void setWebRTCVP9Support(bool supportVP9Profile0, bool supportVP9Profile2); 611 611 void setWebRTCVP9VTBSupport(bool); 612 612 uint64_t sframeCounter(const RTCRtpSFrameTransform&); -
trunk/Source/WebCore/testing/Internals.idl
r270107 r270256 801 801 [Conditional=WEB_RTC] undefined applyRotationForOutgoingVideoSources(RTCPeerConnection connection); 802 802 [Conditional=WEB_RTC] undefined setWebRTCH265Support(boolean allowed); 803 [Conditional=WEB_RTC] undefined setWebRTCVP9Support(boolean allowed);803 [Conditional=WEB_RTC] undefined setWebRTCVP9Support(boolean supportVP9Profile0, boolean supportVP9Profile2); 804 804 [Conditional=WEB_RTC] undefined setWebRTCVP9VTBSupport(boolean allowed); 805 805 [Conditional=WEB_RTC] unsigned long long sframeCounter(RTCRtpSFrameTransform transform); -
trunk/Source/WebKit/ChangeLog
r270249 r270256 1 2020-11-30 Youenn Fablet <youenn@apple.com> 2 3 Introduce an experimental flag specific to VP9 profile 2 4 https://bugs.webkit.org/show_bug.cgi?id=219350 5 6 Reviewed by Eric Carlson. 7 8 * WebProcess/WebPage/WebPage.cpp: 9 (WebKit::WebPage::updatePreferences): 10 1 11 2020-11-30 Antti Koivisto <antti@apple.com> 2 12 -
trunk/Source/WebKit/WebProcess/WebPage/WebPage.cpp
r270216 r270256 3783 3783 #if USE(LIBWEBRTC) 3784 3784 m_page->libWebRTCProvider().setH265Support(RuntimeEnabledFeatures::sharedFeatures().webRTCH265CodecEnabled()); 3785 m_page->libWebRTCProvider().setVP9Support(RuntimeEnabledFeatures::sharedFeatures().webRTCVP9 CodecEnabled());3785 m_page->libWebRTCProvider().setVP9Support(RuntimeEnabledFeatures::sharedFeatures().webRTCVP9Profile0CodecEnabled(), RuntimeEnabledFeatures::sharedFeatures().webRTCVP9Profile2CodecEnabled()); 3786 3786 LibWebRTCProvider::setH264HardwareEncoderAllowed(store.getBoolValueForKey(WebPreferencesKey::webRTCH264HardwareEncoderEnabledKey())); 3787 3787 #endif
Note: See TracChangeset
for help on using the changeset viewer.