WebKit Bugzilla
Attachment 357317 Details for
Bug 192700
: Set kVTVideoEncoderSpecification_Usage both when creating the compression session and once created
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-192700-20181214090002.patch (text/plain), 3.49 KB, created by
youenn fablet
on 2018-12-14 08:59:55 PST
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
youenn fablet
Created:
2018-12-14 08:59:55 PST
Size:
3.49 KB
patch
obsolete
>Subversion Revision: 239205 >diff --git a/Source/ThirdParty/libwebrtc/ChangeLog b/Source/ThirdParty/libwebrtc/ChangeLog >index 35fa76d938968b3953cb11ad310ad98680ae0447..75accfafdab88a038d109cc70c710fc71a5ccff1 100644 >--- a/Source/ThirdParty/libwebrtc/ChangeLog >+++ b/Source/ThirdParty/libwebrtc/ChangeLog >@@ -1,3 +1,16 @@ >+2018-12-14 Youenn Fablet <youenn@apple.com> >+ >+ Set kVTVideoEncoderSpecification_Usage both when creating the compression session and once created >+ https://bugs.webkit.org/show_bug.cgi?id=192700 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ Previously we were setting the usage value once the compression session is created. >+ We now also set it at creation time. >+ >+ * Source/webrtc/sdk/objc/components/video_codec/RTCVideoEncoderH264.mm: >+ (-[RTCSingleVideoEncoderH264 resetCompressionSessionWithPixelFormat:]): >+ > 2018-12-12 Youenn Fablet <youenn@apple.com> > > Recycling the m section should work if it was rejected remotely >diff --git a/Source/ThirdParty/libwebrtc/Source/webrtc/sdk/objc/components/video_codec/RTCVideoEncoderH264.mm b/Source/ThirdParty/libwebrtc/Source/webrtc/sdk/objc/components/video_codec/RTCVideoEncoderH264.mm >index a14357fb80cf83b39b9ff42e8c1c42dd6b568fe6..f82022604d4121c065f9fcae88476670c2351f9d 100644 >--- a/Source/ThirdParty/libwebrtc/Source/webrtc/sdk/objc/components/video_codec/RTCVideoEncoderH264.mm >+++ b/Source/ThirdParty/libwebrtc/Source/webrtc/sdk/objc/components/video_codec/RTCVideoEncoderH264.mm >@@ -608,19 +608,22 @@ - (int)resetCompressionSessionWithPixelFormat:(OSType)framePixelFormat { > CFRelease(pixelFormat); > pixelFormat = nullptr; > } >- CFDictionaryRef encoderSpecs = nullptr; >+ CFMutableDictionaryRef encoderSpecs = CFDictionaryCreateMutable(nullptr, 4, &kCFTypeDictionaryKeyCallBacks, &kCFTypeDictionaryValueCallBacks); > #if !defined(WEBRTC_IOS) > auto useHardwareEncoder = webrtc::isH264HardwareEncoderAllowed() ? kCFBooleanTrue : kCFBooleanFalse; > // Currently hw accl is supported above 360p on mac, below 360p > // the compression session will be created with hw accl disabled. >- CFTypeRef sessionKeys[] = { kVTVideoEncoderSpecification_EnableHardwareAcceleratedVideoEncoder, kVTVideoEncoderSpecification_RequireHardwareAcceleratedVideoEncoder, kVTCompressionPropertyKey_RealTime }; >- CFTypeRef sessionValues[] = { useHardwareEncoder, useHardwareEncoder, kCFBooleanTrue }; >- encoderSpecs = CFDictionaryCreate(kCFAllocatorDefault, sessionKeys, sessionValues, 3, &kCFTypeDictionaryKeyCallBacks, &kCFTypeDictionaryValueCallBacks); >-#else >- CFTypeRef sessionKeys[] = { kVTCompressionPropertyKey_RealTime }; >- CFTypeRef sessionValues[] = { kCFBooleanTrue }; >- encoderSpecs = CFDictionaryCreate(kCFAllocatorDefault, sessionKeys, sessionValues, 1, &kCFTypeDictionaryKeyCallBacks, &kCFTypeDictionaryValueCallBacks); >+ CFDictionarySetValue(encoderSpecs, kVTVideoEncoderSpecification_EnableHardwareAcceleratedVideoEncoder, useHardwareEncoder); >+ CFDictionarySetValue(encoderSpecs, kVTVideoEncoderSpecification_RequireHardwareAcceleratedVideoEncoder, useHardwareEncoder); > #endif >+ CFDictionarySetValue(encoderSpecs, kVTCompressionPropertyKey_RealTime, kCFBooleanTrue); >+ >+ if (auto key = getkVTVideoEncoderSpecification_Usage()) { >+ int usageValue = 1; >+ auto usage = CFNumberCreate(nullptr, kCFNumberIntType, &usageValue); >+ CFDictionarySetValue(encoderSpecs, (__bridge CFStringRef)key, usage); >+ CFRelease(usage); >+ } > > OSStatus status = > CompressionSessionCreate(nullptr, // use default allocator
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 192700
: 357317