Changeset 243811 in webkit
- Timestamp:
- Apr 3, 2019, 10:37:55 AM (7 years ago)
- Location:
- trunk/Source
- Files:
-
- 7 edited
-
ThirdParty/libwebrtc/ChangeLog (modified) (1 diff)
-
ThirdParty/libwebrtc/Source/webrtc/sdk/WebKit/VideoProcessingSoftLink.cpp (modified) (3 diffs)
-
ThirdParty/libwebrtc/Source/webrtc/sdk/WebKit/VideoProcessingSoftLink.h (modified) (4 diffs)
-
ThirdParty/libwebrtc/Source/webrtc/sdk/WebKit/WebKitUtilities.mm (modified) (1 diff)
-
ThirdParty/libwebrtc/Source/webrtc/sdk/objc/components/video_codec/RTCVideoEncoderH264.mm (modified) (4 diffs)
-
WebCore/ChangeLog (modified) (1 diff)
-
WebCore/testing/Internals.cpp (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/ThirdParty/libwebrtc/ChangeLog
r243741 r243811 1 2019-04-03 Youenn Fablet <youenn@apple.com> 2 3 Adopt new VCP SPI 4 https://bugs.webkit.org/show_bug.cgi?id=193357 5 <rdar://problem/43656651> 6 7 Reviewed by Eric Carlson. 8 9 Enable VCP through VTB API with specific encoder id. 10 11 * Source/webrtc/sdk/WebKit/VideoProcessingSoftLink.cpp: 12 * Source/webrtc/sdk/WebKit/VideoProcessingSoftLink.h: 13 * Source/webrtc/sdk/WebKit/WebKitUtilities.mm: 14 (webrtc::setApplicationStatus): 15 * Source/webrtc/sdk/objc/components/video_codec/RTCVideoEncoderH264.mm: 16 (-[RTCSingleVideoEncoderH264 resetCompressionSessionWithPixelFormat:]): 17 1 18 2019-04-02 Thibault Saunier <tsaunier@igalia.com> 2 19 -
trunk/Source/ThirdParty/libwebrtc/Source/webrtc/sdk/WebKit/VideoProcessingSoftLink.cpp
r240728 r243811 26 26 #include "VideoProcessingSoftLink.h" 27 27 28 #if ENABLE_VCP_ENCODER 28 #if ENABLE_VCP_ENCODER || ENABLE_VCP_VTB_ENCODER 29 29 30 30 #include "rtc_base/logging.h" … … 68 68 69 69 SOFT_LINK_PRIVATE_FRAMEWORK_FOR_SOURCE(webrtc, VideoProcessing) 70 SOFT_LINK_FUNCTION_FOR_SOURCE(webrtc, VideoProcessing, VPModuleInitialize, void, (), ()) 71 72 #endif 73 74 #if ENABLE_VCP_ENCODER 70 75 71 76 SOFT_LINK_FUNCTION_FOR_SOURCE(webrtc, VideoProcessing, VCPCompressionSessionSetProperty, OSStatus, (VCPCompressionSessionRef session, CFStringRef key, CFTypeRef value), (session, key, value)) … … 74 79 SOFT_LINK_FUNCTION_FOR_SOURCE(webrtc, VideoProcessing, VCPCompressionSessionCreate, OSStatus, (CFAllocatorRef allocator1, int32_t value1 , int32_t value2, CMVideoCodecType type, CFDictionaryRef dictionary1, CFDictionaryRef dictionary2, CFAllocatorRef allocator3, VTCompressionOutputCallback callback, void* data, VCPCompressionSessionRef* session), (allocator1, value1, value2, type, dictionary1, dictionary2, allocator3, callback, data, session)) 75 80 SOFT_LINK_FUNCTION_FOR_SOURCE(webrtc, VideoProcessing, VCPCompressionSessionInvalidate, void, (VCPCompressionSessionRef session), (session)) 76 SOFT_LINK_FUNCTION_FOR_SOURCE(webrtc, VideoProcessing, VPModuleInitialize, void, (), ())77 81 78 82 #endif // ENABLE_VCP_ENCODER -
trunk/Source/ThirdParty/libwebrtc/Source/webrtc/sdk/WebKit/VideoProcessingSoftLink.h
r240728 r243811 36 36 #if (defined(TARGET_IPHONE_SIMULATOR) && TARGET_IPHONE_SIMULATOR) 37 37 #define ENABLE_VCP_ENCODER 0 38 #define ENABLE_VCP_VTB_ENCODER 0 38 39 #elif (defined(TARGET_OS_IPHONE) && TARGET_OS_IPHONE) 39 #define ENABLE_VCP_ENCODER 1 40 #define ENABLE_VCP_ENCODER __MAC_OS_X_VERSION_MAX_ALLOWED < 101500 41 #define ENABLE_VCP_VTB_ENCODER __MAC_OS_X_VERSION_MIN_REQUIRED >= 101500 40 42 #elif (defined(TARGET_OS_MAC) && TARGET_OS_MAC) 41 #define ENABLE_VCP_ENCODER (__MAC_OS_X_VERSION_MIN_REQUIRED >= 101300 && __MAC_OS_X_VERSION_MAX_ALLOWED >= 101304) 43 #define ENABLE_VCP_ENCODER (__MAC_OS_X_VERSION_MIN_REQUIRED >= 101300 && __MAC_OS_X_VERSION_MAX_ALLOWED < 101500) 44 #define ENABLE_VCP_VTB_ENCODER __MAC_OS_X_VERSION_MIN_REQUIRED >= 101500 42 45 #endif 43 46 … … 46 49 #if !defined(ENABLE_VCP_ENCODER) 47 50 #define ENABLE_VCP_ENCODER 0 51 #endif 52 #if !defined(ENABLE_VCP_VTB_ENCODER) 53 #define ENABLE_VCP_VTB_ENCODER 0 48 54 #endif 49 55 … … 112 118 } 113 119 114 #if ENABLE_VCP_ENCODER 120 #if ENABLE_VCP_ENCODER || ENABLE_VCP_VTB_ENCODER 115 121 116 122 #include <VideoProcessing/VideoProcessing.h> 117 123 118 124 SOFT_LINK_FRAMEWORK_FOR_HEADER(webrtc, VideoProcessing) 125 126 SOFT_LINK_FUNCTION_FOR_HEADER(webrtc, VideoProcessing, VPModuleInitialize, void, (), ()) 127 #define VPModuleInitialize softLink_VideoProcessing_VPModuleInitialize 128 129 #endif 130 131 #if ENABLE_VCP_ENCODER 119 132 120 133 SOFT_LINK_FUNCTION_FOR_HEADER(webrtc, VideoProcessing, VCPCompressionSessionSetProperty, OSStatus, (VCPCompressionSessionRef session, CFStringRef key, CFTypeRef value), (session, key, value)) … … 133 146 #define VCPCompressionSessionInvalidate softLink_VideoProcessing_VCPCompressionSessionInvalidate 134 147 135 SOFT_LINK_FUNCTION_FOR_HEADER(webrtc, VideoProcessing, VPModuleInitialize, void, (), ())136 #define VPModuleInitialize softLink_VideoProcessing_VPModuleInitialize137 138 148 #endif // ENABLE_VCP_ENCODER 139 149 -
trunk/Source/ThirdParty/libwebrtc/Source/webrtc/sdk/WebKit/WebKitUtilities.mm
r240728 r243811 106 106 std::unique_ptr<webrtc::VideoEncoderFactory> createWebKitEncoderFactory(WebKitCodecSupport codecSupport) 107 107 { 108 #if ENABLE_VCP_ENCODER 108 #if ENABLE_VCP_ENCODER || ENABLE_VCP_VTB_ENCODER 109 109 static std::once_flag onceFlag; 110 110 std::call_once(onceFlag, [] { -
trunk/Source/ThirdParty/libwebrtc/Source/webrtc/sdk/objc/components/video_codec/RTCVideoEncoderH264.mm
r240728 r243811 41 41 VT_EXPORT const CFStringRef kVTCompressionPropertyKey_Usage; 42 42 43 #if !ENABLE_VCP_ENCODER && !defined(WEBRTC_IOS) 43 #if !ENABLE_VCP_ENCODER && !defined(WEBRTC_IOS) && !ENABLE_VCP_VTB_ENCODER 44 44 static inline bool isStandardFrameSize(int32_t width, int32_t height) 45 45 { … … 609 609 pixelFormat = nullptr; 610 610 } 611 CFMutableDictionaryRef encoderSpecs = CFDictionaryCreateMutable(nullptr, 4, &kCFTypeDictionaryKeyCallBacks, &kCFTypeDictionaryValueCallBacks);611 CFMutableDictionaryRef encoderSpecs = CFDictionaryCreateMutable(nullptr, 5, &kCFTypeDictionaryKeyCallBacks, &kCFTypeDictionaryValueCallBacks); 612 612 #if !defined(WEBRTC_IOS) 613 613 auto useHardwareEncoder = webrtc::isH264HardwareEncoderAllowed() ? kCFBooleanTrue : kCFBooleanFalse; … … 619 619 CFDictionarySetValue(encoderSpecs, kVTCompressionPropertyKey_RealTime, kCFBooleanTrue); 620 620 621 #if ENABLE_VCP_ENCODER 621 #if ENABLE_VCP_ENCODER || ENABLE_VCP_VTB_ENCODER 622 622 int usageValue = 1; 623 623 auto usage = CFNumberCreate(nullptr, kCFNumberIntType, &usageValue); 624 624 CFDictionarySetValue(encoderSpecs, kVTCompressionPropertyKey_Usage, usage); 625 625 CFRelease(usage); 626 #endif 627 #if ENABLE_VCP_VTB_ENCODER 628 CFDictionarySetValue(encoderSpecs, kVTVideoEncoderList_EncoderID, CFSTR("com.apple.videotoolbox.videoencoder.h264.rtvc")); 626 629 #endif 627 630 OSStatus status = … … 664 667 RTC_LOG(LS_INFO) << "Compression session created with hw accl disabled"; 665 668 666 #if !ENABLE_VCP_ENCODER && ! defined(WEBRTC_IOS)669 #if !ENABLE_VCP_ENCODER && !ENABLE_VCP_VTB_ENCODER && !defined(WEBRTC_IOS) 667 670 if (!isStandardFrameSize(_width, _height)) { 668 671 _disableEncoding = true; -
trunk/Source/WebCore/ChangeLog
r243810 r243811 1 2019-04-03 Youenn Fablet <youenn@apple.com> 2 3 Adopt new VCP SPI 4 https://bugs.webkit.org/show_bug.cgi?id=193357 5 <rdar://problem/43656651> 6 7 Reviewed by Eric Carlson. 8 9 Covered by existing tests. 10 11 * testing/Internals.cpp: 12 (WebCore::Internals::supportsVCPEncoder): 13 1 14 2019-04-03 Chris Dumez <cdumez@apple.com> 2 15 -
trunk/Source/WebCore/testing/Internals.cpp
r243804 r243811 4934 4934 { 4935 4935 #if defined(ENABLE_VCP_ENCODER) 4936 return ENABLE_VCP_ENCODER ;4936 return ENABLE_VCP_ENCODER || ENABLE_VCP_VTB_ENCODER; 4937 4937 #else 4938 4938 return false;
Note:
See TracChangeset
for help on using the changeset viewer.