Changeset 227206 in webkit
- Timestamp:
- Jan 19, 2018 9:48:23 AM (6 years ago)
- Location:
- trunk/Source/ThirdParty/libwebrtc
- Files:
-
- 2 added
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/ThirdParty/libwebrtc/ChangeLog
r227156 r227206 1 2018-01-19 Youenn Fablet <youenn@apple.com> 2 3 Softlink VideoProcessing in WebKit 4 https://bugs.webkit.org/show_bug.cgi?id=181853 5 <rdar://problem/36590005> 6 7 Reviewed by Eric Carlson. 8 9 * Configurations/libwebrtc.xcconfig: 10 * Source/webrtc/sdk/objc/Framework/Classes/VideoProcessing/VideoProcessingSoftLink.cpp: Added. 11 * Source/webrtc/sdk/objc/Framework/Classes/VideoProcessing/VideoProcessingSoftLink.h: Added. 12 * Source/webrtc/sdk/objc/Framework/Classes/VideoProcessing/encoder_vcp.h: 13 * Source/webrtc/sdk/objc/Framework/Classes/VideoProcessing/encoder_vcp.mm: 14 (internal::SetVTSessionProperty): 15 (webrtc::H264VideoToolboxEncoderVCP::Encode): 16 * Source/webrtc/sdk/objc/Framework/Classes/VideoToolbox/videocodecfactory.mm: 17 (webrtc::VideoToolboxVideoEncoderFactory::VideoToolboxVideoEncoderFactory): 18 * libwebrtc.xcodeproj/project.pbxproj: 19 1 20 2018-01-18 Dan Bernstein <mitz@apple.com> 2 21 -
trunk/Source/ThirdParty/libwebrtc/Configurations/libwebrtc.xcconfig
r225761 r227206 41 41 EXCLUDED_SOURCE_FILE_NAMES[sdk=macosx*] = voice_processing_audio_unit.mm; 42 42 43 OTHER_LDFLAGS[sdk=macosx10.13*] = $(inherited) -framework VideoProcessing;44 OTHER_LDFLAGS[sdk=macosx10.14*] = $(inherited) -framework VideoProcessing;43 OTHER_LDFLAGS[sdk=macosx10.13*] = $(inherited); 44 OTHER_LDFLAGS[sdk=macosx10.14*] = $(inherited); -
trunk/Source/ThirdParty/libwebrtc/Source/webrtc/sdk/objc/Framework/Classes/VideoProcessing/encoder_vcp.h
r225761 r227206 13 13 #pragma once 14 14 15 #ifdef __APPLE__ 16 #include <Availability.h> 17 #include <AvailabilityMacros.h> 18 #include <TargetConditionals.h> 19 20 #if (defined(TARGET_OS_IPHONE) && TARGET_OS_IPHONE) || (defined(TARGET_IPHONE_SIMULATOR) && TARGET_IPHONE_SIMULATOR) 21 // FIXME: Activate VCP for iOS/iOS simulator 22 #define ENABLE_VCP_ENCODER 0 23 #elif (defined(TARGET_OS_MAC) && TARGET_OS_MAC) 24 #define ENABLE_VCP_ENCODER (__MAC_OS_X_VERSION_MAX_ALLOWED >= 101304) 25 #endif 15 #include "VideoProcessingSoftLink.h" 26 16 27 17 #if ENABLE_VCP_ENCODER … … 35 25 #include "webrtc/modules/video_coding/utility/quality_scaler.h" 36 26 37 #include <VideoProcessing/VideoProcessing.h>38 27 #include <vector> 39 28 … … 128 117 #endif // ENABLE_VCP_ENCODER 129 118 130 #endif // __APPLE__ -
trunk/Source/ThirdParty/libwebrtc/Source/webrtc/sdk/objc/Framework/Classes/VideoProcessing/encoder_vcp.mm
r225761 r227206 75 75 CFNumberRef cfNum = 76 76 CFNumberCreate(kCFAllocatorDefault, kCFNumberSInt32Type, &value); 77 OSStatus status = VCPCompressionSessionSetProperty(session, key, cfNum);77 OSStatus status = webrtc::VCPCompressionSessionSetProperty(session, key, cfNum); 78 78 CFRelease(cfNum); 79 79 if (status != noErr) { … … 91 91 CFNumberRef cfNum = 92 92 CFNumberCreate(kCFAllocatorDefault, kCFNumberSInt64Type, &value_64); 93 OSStatus status = VCPCompressionSessionSetProperty(session, key, cfNum);93 OSStatus status = webrtc::VCPCompressionSessionSetProperty(session, key, cfNum); 94 94 CFRelease(cfNum); 95 95 if (status != noErr) { … … 103 103 void SetVTSessionProperty(VCPCompressionSessionRef session, CFStringRef key, bool value) { 104 104 CFBooleanRef cf_bool = (value) ? kCFBooleanTrue : kCFBooleanFalse; 105 OSStatus status = VCPCompressionSessionSetProperty(session, key, cf_bool);105 OSStatus status = webrtc::VCPCompressionSessionSetProperty(session, key, cf_bool); 106 106 if (status != noErr) { 107 107 std::string key_string = CFStringToString(key); … … 115 115 CFStringRef key, 116 116 CFStringRef value) { 117 OSStatus status = VCPCompressionSessionSetProperty(session, key, value);117 OSStatus status = webrtc::VCPCompressionSessionSetProperty(session, key, value); 118 118 if (status != noErr) { 119 119 std::string key_string = CFStringToString(key); … … 414 414 // Get a pixel buffer from the pool and copy frame data over. 415 415 CVPixelBufferPoolRef pixel_buffer_pool = 416 VCPCompressionSessionGetPixelBufferPool(compression_session_);416 webrtc::VCPCompressionSessionGetPixelBufferPool(compression_session_); 417 417 #if defined(WEBRTC_IOS) 418 418 if (!pixel_buffer_pool) { … … 424 424 ResetCompressionSession(); 425 425 pixel_buffer_pool = 426 VCPCompressionSessionGetPixelBufferPool(compression_session_);426 webrtc::VCPCompressionSessionGetPixelBufferPool(compression_session_); 427 427 is_keyframe_required = true; 428 428 LOG(LS_INFO) << "Resetting compression session due to invalid pool."; … … 497 497 SetBitrateBps(bitrate_adjuster_.GetAdjustedBitrateBps()); 498 498 499 OSStatus status = VCPCompressionSessionEncodeFrame(499 OSStatus status = webrtc::VCPCompressionSessionEncodeFrame( 500 500 compression_session_, pixel_buffer, presentation_time_stamp, 501 501 kCMTimeInvalid, frame_properties, encode_params.release(), nullptr); … … 594 594 #endif 595 595 596 OSStatus status = VCPCompressionSessionCreate(596 OSStatus status = webrtc::VCPCompressionSessionCreate( 597 597 nullptr, // use default allocator 598 598 width, height, kVCPCodecType4CC_H264, … … 646 646 void H264VideoToolboxEncoderVCP::DestroyCompressionSession() { 647 647 if (compression_session_) { 648 VCPCompressionSessionInvalidate(compression_session_);648 webrtc::VCPCompressionSessionInvalidate(compression_session_); 649 649 CFRelease(compression_session_); 650 650 compression_session_ = nullptr; -
trunk/Source/ThirdParty/libwebrtc/Source/webrtc/sdk/objc/Framework/Classes/VideoToolbox/videocodecfactory.mm
r225761 r227206 33 33 { 34 34 #if ENABLE_VCP_ENCODER 35 VPModuleInitialize();35 webrtc::VPModuleInitialize(); 36 36 #endif 37 37 } -
trunk/Source/ThirdParty/libwebrtc/libwebrtc.xcodeproj/project.pbxproj
r225974 r227206 168 168 416D2F151FA8CCAE00097345 /* encoder_vcp.h in Headers */ = {isa = PBXBuildFile; fileRef = 416D2F131FA8CCAD00097345 /* encoder_vcp.h */; }; 169 169 416D2F161FA8CCAE00097345 /* encoder_vcp.mm in Sources */ = {isa = PBXBuildFile; fileRef = 416D2F141FA8CCAD00097345 /* encoder_vcp.mm */; }; 170 417CF799201239AF001ADF3A /* VideoProcessingSoftLink.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 417CF797201239AE001ADF3A /* VideoProcessingSoftLink.cpp */; }; 171 417CF79A201239AF001ADF3A /* VideoProcessingSoftLink.h in Headers */ = {isa = PBXBuildFile; fileRef = 417CF798201239AE001ADF3A /* VideoProcessingSoftLink.h */; }; 170 172 417DA4581EF9CD0D00E869DB /* RTCUIApplicationStatusObserver.h in Headers */ = {isa = PBXBuildFile; fileRef = 417DA4561EF9CD0A00E869DB /* RTCUIApplicationStatusObserver.h */; }; 171 173 41A391731EFC447C00C4516A /* sha1-altivec.c in Sources */ = {isa = PBXBuildFile; fileRef = 41A3914F1EFC446E00C4516A /* sha1-altivec.c */; }; … … 2938 2940 416D2F131FA8CCAD00097345 /* encoder_vcp.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = encoder_vcp.h; path = VideoProcessing/encoder_vcp.h; sourceTree = "<group>"; }; 2939 2941 416D2F141FA8CCAD00097345 /* encoder_vcp.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = encoder_vcp.mm; path = VideoProcessing/encoder_vcp.mm; sourceTree = "<group>"; }; 2942 417CF797201239AE001ADF3A /* VideoProcessingSoftLink.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = VideoProcessingSoftLink.cpp; path = VideoProcessing/VideoProcessingSoftLink.cpp; sourceTree = "<group>"; }; 2943 417CF798201239AE001ADF3A /* VideoProcessingSoftLink.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = VideoProcessingSoftLink.h; path = VideoProcessing/VideoProcessingSoftLink.h; sourceTree = "<group>"; }; 2940 2944 417DA4561EF9CD0A00E869DB /* RTCUIApplicationStatusObserver.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = RTCUIApplicationStatusObserver.h; path = Source/webrtc/sdk/objc/Framework/Classes/Common/RTCUIApplicationStatusObserver.h; sourceTree = SOURCE_ROOT; }; 2941 2945 41A391451EFC446E00C4516A /* sha1-586.pl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.perl; path = "sha1-586.pl"; sourceTree = "<group>"; }; … … 5654 5658 416D2F131FA8CCAD00097345 /* encoder_vcp.h */, 5655 5659 416D2F141FA8CCAD00097345 /* encoder_vcp.mm */, 5660 417CF797201239AE001ADF3A /* VideoProcessingSoftLink.cpp */, 5661 417CF798201239AE001ADF3A /* VideoProcessingSoftLink.h */, 5656 5662 ); 5657 5663 name = VideoProcessing; … … 10941 10947 5CD286251E6A666D0094FDC8 /* videodecodersoftwarefallbackwrapper.h in Headers */, 10942 10948 5C4B488A1E42C1BA002651C8 /* videoencodersoftwarefallbackwrapper.h in Headers */, 10949 417CF79A201239AF001ADF3A /* VideoProcessingSoftLink.h in Headers */, 10943 10950 5C4B490A1E42C1E3002651C8 /* videosinkinterface.h in Headers */, 10944 10951 5C4B490C1E42C1E3002651C8 /* videosourcebase.h in Headers */, … … 12642 12649 5CD286241E6A666D0094FDC8 /* videodecodersoftwarefallbackwrapper.cc in Sources */, 12643 12650 5C4B48891E42C1BA002651C8 /* videoencodersoftwarefallbackwrapper.cc in Sources */, 12651 417CF799201239AF001ADF3A /* VideoProcessingSoftLink.cpp in Sources */, 12644 12652 5C4B490B1E42C1E3002651C8 /* videosourcebase.cc in Sources */, 12645 12653 5CD285161E6A60570094FDC8 /* videotrack.cc in Sources */,
Note: See TracChangeset
for help on using the changeset viewer.