Changeset 264966 in webkit
- Timestamp:
- Jul 28, 2020 1:01:20 AM (4 years ago)
- Location:
- trunk/Source
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/ThirdParty/libwebrtc/ChangeLog
r264904 r264966 1 2020-07-28 Youenn Fablet <youenn@apple.com> 2 3 Disable low latency code path for H264 constrained baseline 4 https://bugs.webkit.org/show_bug.cgi?id=214830 5 6 Reviewed by Eric Carlson. 7 8 In case of baseline profile, use straight VTB encoder. 9 In case of high profile, use low latency code path if enabled. 10 In case of MacOS software code path, enable low latency code path as straight VTB encoder buffers frames. 11 12 * Source/webrtc/sdk/objc/components/video_codec/RTCVideoEncoderH264.mm: 13 (-[RTCVideoEncoderH264 initWithCodecInfo:]): 14 (-[RTCVideoEncoderH264 resetCompressionSessionWithPixelFormat:]): 15 1 16 2020-07-26 Michael Catanzaro <mcatanzaro@gnome.org> 2 17 -
trunk/Source/ThirdParty/libwebrtc/Source/webrtc/sdk/objc/components/video_codec/RTCVideoEncoderH264.mm
r264822 r264966 365 365 _profile_level_id = 366 366 webrtc::H264::ParseSdpProfileLevelId([codecInfo nativeSdpVideoFormat].parameters); 367 #if ENABLE_VCP_VTB_ENCODER368 367 if (_profile_level_id) { 369 368 auto profile = ExtractProfile(*_profile_level_id); … … 372 371 _useVCP = false; 373 372 } 374 #else375 _useVCP = false;376 #endif377 373 RTC_DCHECK(_profile_level_id); 378 374 RTC_LOG(LS_INFO) << "Using profile " << CFStringToString(ExtractProfile(*_profile_level_id)); … … 701 697 } 702 698 #elif HAVE_VTB_REQUIREDLOWLATENCY 703 if (webrtc::isH264LowLatencyEncoderEnabled() )699 if (webrtc::isH264LowLatencyEncoderEnabled() && _useVCP) 704 700 CFDictionarySetValue(encoderSpecs, kVTVideoEncoderSpecification_RequiredLowLatency, kCFBooleanTrue); 705 701 #endif … … 750 746 &_vcpCompressionSession); 751 747 } 752 #elif !HAVE_VTB_REQUIREDLOWLATENCY 748 #elif HAVE_VTB_REQUIREDLOWLATENCY 749 // In case VCP is disabled, we will use it anyway if using software encoder. 750 if (webrtc::isH264LowLatencyEncoderEnabled() && !_useVCP) { 751 CFBooleanRef hwaccl_enabled = nullptr; 752 if (status == noErr) { 753 status = VTSessionCopyProperty(_vtCompressionSession, 754 kVTCompressionPropertyKey_UsingHardwareAcceleratedVideoEncoder, 755 nullptr, 756 &hwaccl_enabled); 757 } 758 if (status == noErr && (CFBooleanGetValue(hwaccl_enabled))) { 759 RTC_LOG(LS_INFO) << "Compression session created with hw accl enabled"; 760 } else { 761 [self destroyCompressionSession]; 762 CFDictionarySetValue(encoderSpecs, kVTVideoEncoderSpecification_RequiredLowLatency, kCFBooleanTrue); 763 status = VTCompressionSessionCreate(nullptr, // use default allocator 764 _width, 765 _height, 766 kCMVideoCodecType_H264, 767 encoderSpecs, // use hardware accelerated encoder if available 768 sourceAttributes, 769 nullptr, // use default compressed data allocator 770 compressionOutputCallback, 771 nullptr, 772 &_vtCompressionSession); 773 } 774 } 775 #else 753 776 if (status != noErr) { 754 777 if (encoderSpecs) { -
trunk/Source/WebKit/ChangeLog
r264961 r264966 1 2020-07-28 Youenn Fablet <youenn@apple.com> 2 3 Disable low latency code path for H264 constrained baseline 4 https://bugs.webkit.org/show_bug.cgi?id=214830 5 6 Reviewed by Eric Carlson. 7 8 Enable low latency code path on iOS. 9 Manually tested. 10 11 * Shared/WebPreferences.yaml: 12 * Shared/WebPreferencesDefaultValues.cpp: 13 (WebKit::defaultWebRTCH264LowLatencyEncoderEnabled): 14 * Shared/WebPreferencesDefaultValues.h: 15 1 16 2020-07-27 Kate Cheney <katherine_cheney@apple.com> 2 17 -
trunk/Source/WebKit/Shared/WebPreferences.yaml
r264747 r264966 600 600 WebRTCH264LowLatencyEncoderEnabled: 601 601 type: bool 602 defaultValue: false602 defaultValue: defaultWebRTCH264LowLatencyEncoderEnabled() 603 603 webcoreBinding: RuntimeEnabledFeatures 604 604 condition: ENABLE(WEB_RTC) -
trunk/Source/WebKit/Shared/WebPreferencesDefaultValues.cpp
r264747 r264966 266 266 #endif 267 267 268 #if ENABLE(WEB_RTC) 269 bool defaultWebRTCH264LowLatencyEncoderEnabled() 270 { 271 #if PLATFORM(IOS_FAMILY) 272 return true; 273 #else 274 return false; 275 #endif 276 } 277 #endif 278 268 279 } // namespace WebKit -
trunk/Source/WebKit/Shared/WebPreferencesDefaultValues.h
r264747 r264966 371 371 #endif 372 372 373 #if ENABLE(WEB_RTC) 374 bool defaultWebRTCH264LowLatencyEncoderEnabled(); 375 #endif 376 373 377 } // namespace WebKit
Note: See TracChangeset
for help on using the changeset viewer.