WebKit Bugzilla
Attachment 357878 Details for
Bug 192885
: Use kVTCompressionPropertyKey_Usage instead of kVTVideoEncoderSpecification_Usage
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-192885-20181220151741.patch (text/plain), 4.30 KB, created by
youenn fablet
on 2018-12-20 15:17:41 PST
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
youenn fablet
Created:
2018-12-20 15:17:41 PST
Size:
4.30 KB
patch
obsolete
>Subversion Revision: 239384 >diff --git a/Source/ThirdParty/libwebrtc/ChangeLog b/Source/ThirdParty/libwebrtc/ChangeLog >index 6e710860cc2b77f91f1f91553de8941abfa0d474..fbf261b989e54112d144a75d6934c2e8dd1a1d95 100644 >--- a/Source/ThirdParty/libwebrtc/ChangeLog >+++ b/Source/ThirdParty/libwebrtc/ChangeLog >@@ -1,3 +1,18 @@ >+2018-12-20 Youenn Fablet <youenn@apple.com> >+ >+ Use kVTCompressionPropertyKey_Usage instead of kVTVideoEncoderSpecification_Usage >+ https://bugs.webkit.org/show_bug.cgi?id=192885 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ When VCP is enabled, use kVTCompressionPropertyKey_Usage as this is >+ kVTVideoEncoderSpecification_Usage no longer works to activate VCP on iOS. >+ Tested manually. >+ >+ * Source/webrtc/sdk/objc/components/video_codec/RTCVideoEncoderH264.mm: >+ (-[RTCSingleVideoEncoderH264 resetCompressionSessionWithPixelFormat:]): >+ (-[RTCSingleVideoEncoderH264 configureCompressionSession]): >+ > 2018-12-15 Youenn Fablet <youenn@apple.com> > > Make RTCRtpSender.setParameters to activate specific encodings >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 baec714a2963a11bddd48b0b87927d6682fbd1a8..543f4fb5a4ba2e68764e54bd3a905b336aa1a571 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 >@@ -37,8 +37,8 @@ > #import <dlfcn.h> > #import <objc/runtime.h> > >-SOFT_LINK_FRAMEWORK_OPTIONAL(VideoToolBox) >-SOFT_LINK_POINTER_OPTIONAL(VideoToolBox, kVTVideoEncoderSpecification_Usage, NSString *) >+VT_EXPORT const CFStringRef kVTVideoEncoderSpecification_Usage; >+VT_EXPORT const CFStringRef kVTCompressionPropertyKey_Usage; > > #if !ENABLE_VCP_ENCODER && !defined(WEBRTC_IOS) > static inline bool isStandardFrameSize(int32_t width, int32_t height) >@@ -619,10 +619,9 @@ - (int)resetCompressionSessionWithPixelFormat:(OSType)framePixelFormat { > CFDictionarySetValue(encoderSpecs, kVTCompressionPropertyKey_RealTime, kCFBooleanTrue); > > #if ENABLE_VCP_ENCODER >- auto key = getkVTVideoEncoderSpecification_Usage(); > int usageValue = 1; > auto usage = CFNumberCreate(nullptr, kCFNumberIntType, &usageValue); >- CFDictionarySetValue(encoderSpecs, (__bridge CFStringRef)key, usage); >+ CFDictionarySetValue(encoderSpecs, kVTCompressionPropertyKey_Usage, usage); > CFRelease(usage); > #endif > OSStatus status = >@@ -671,12 +670,6 @@ - (int)resetCompressionSessionWithPixelFormat:(OSType)framePixelFormat { > return WEBRTC_VIDEO_CODEC_ERROR; > } > >- if (!getkVTVideoEncoderSpecification_Usage()) { >- _disableEncoding = true; >- RTC_LOG(LS_ERROR) << "RTCSingleVideoEncoderH264 cannot create a H264 software encoder"; >- return WEBRTC_VIDEO_CODEC_ERROR; >- } >- > CFDictionaryRef ioSurfaceValue = CreateCFTypeDictionary(nullptr, nullptr, 0); > int64_t pixelFormatType = framePixelFormat; > CFNumberRef pixelFormat = CFNumberCreate(nullptr, kCFNumberLongType, &pixelFormatType); >@@ -706,7 +699,7 @@ - (int)resetCompressionSessionWithPixelFormat:(OSType)framePixelFormat { > CFDictionarySetValue(encoderSpecs, kVTVideoEncoderSpecification_EnableHardwareAcceleratedVideoEncoder, kCFBooleanFalse); > int usageValue = 1; > CFNumberRef usage = CFNumberCreate(nullptr, kCFNumberIntType, &usageValue); >- CFDictionarySetValue(encoderSpecs, (__bridge CFStringRef)getkVTVideoEncoderSpecification_Usage(), usage); >+ CFDictionarySetValue(encoderSpecs, kVTVideoEncoderSpecification_Usage, usage); > > if (usage) { > CFRelease(usage); >@@ -756,8 +749,7 @@ - (void)configureCompressionSession { > SetVTSessionProperty(_compressionSession, kVTCompressionPropertyKey_ProfileLevel, _profile); > SetVTSessionProperty(_compressionSession, kVTCompressionPropertyKey_AllowFrameReordering, false); > #if ENABLE_VCP_ENCODER >- if (auto key = getkVTVideoEncoderSpecification_Usage()) >- SetVTSessionProperty(_compressionSession, (__bridge CFStringRef)key, 1); >+ SetVTSessionProperty(_compressionSession, kVTCompressionPropertyKey_Usage, 1); > #endif > [self setEncoderBitrateBps:_targetBitrateBps]; > // TODO(tkchin): Look at entropy mode and colorspace matrices.
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 192885
:
357743
|
357766
| 357878