diff --git a/FrameWork/LFLiveKit.xcodeproj/project.pbxproj b/FrameWork/LFLiveKit.xcodeproj/project.pbxproj index a51a3391..4d46bc22 100644 --- a/FrameWork/LFLiveKit.xcodeproj/project.pbxproj +++ b/FrameWork/LFLiveKit.xcodeproj/project.pbxproj @@ -7,7 +7,54 @@ objects = { /* Begin PBXBuildFile section */ - 1F3858C76FA5230BD4B34FEF /* libPods-LFLiveKit.a in Frameworks */ = {isa = PBXBuildFile; fileRef = D9E53AEC8F2938295308B625 /* libPods-LFLiveKit.a */; }; + 8495F66F1DB8F14600542124 /* LFLiveKitFramework.h in Headers */ = {isa = PBXBuildFile; fileRef = 8495F66D1DB8F14600542124 /* LFLiveKitFramework.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 8495F6731DB8F1EE00542124 /* LFAudioCapture.h in Headers */ = {isa = PBXBuildFile; fileRef = 84D8B5851D768B6E00752B56 /* LFAudioCapture.h */; }; + 8495F6741DB8F1EE00542124 /* LFVideoCapture.h in Headers */ = {isa = PBXBuildFile; fileRef = 84D8B5871D768B6E00752B56 /* LFVideoCapture.h */; }; + 8495F6751DB8F1EE00542124 /* LFAVEncoder.h in Headers */ = {isa = PBXBuildFile; fileRef = 84D8B58B1D768B6E00752B56 /* LFAVEncoder.h */; }; + 8495F6761DB8F1EE00542124 /* LFMP4Atom.h in Headers */ = {isa = PBXBuildFile; fileRef = 84D8B58D1D768B6E00752B56 /* LFMP4Atom.h */; }; + 8495F6771DB8F1EE00542124 /* LFNALUnit.h in Headers */ = {isa = PBXBuildFile; fileRef = 84D8B5901D768B6E00752B56 /* LFNALUnit.h */; }; + 8495F6781DB8F1EE00542124 /* LFVideoEncoder.h in Headers */ = {isa = PBXBuildFile; fileRef = 84D8B5911D768B6E00752B56 /* LFVideoEncoder.h */; }; + 8495F6791DB8F1EE00542124 /* LFAudioEncoding.h in Headers */ = {isa = PBXBuildFile; fileRef = 84D8B5931D768B6E00752B56 /* LFAudioEncoding.h */; }; + 8495F67A1DB8F1EE00542124 /* LFH264VideoEncoder.h in Headers */ = {isa = PBXBuildFile; fileRef = 84D8B5941D768B6E00752B56 /* LFH264VideoEncoder.h */; }; + 8495F67B1DB8F1EE00542124 /* LFHardwareAudioEncoder.h in Headers */ = {isa = PBXBuildFile; fileRef = 84D8B5961D768B6E00752B56 /* LFHardwareAudioEncoder.h */; }; + 8495F67C1DB8F1EE00542124 /* LFHardwareVideoEncoder.h in Headers */ = {isa = PBXBuildFile; fileRef = 84D8B5981D768B6E00752B56 /* LFHardwareVideoEncoder.h */; }; + 8495F67D1DB8F1EE00542124 /* LFVideoEncoding.h in Headers */ = {isa = PBXBuildFile; fileRef = 84D8B59A1D768B6E00752B56 /* LFVideoEncoding.h */; }; + 8495F67E1DB8F1EE00542124 /* LFLiveAudioConfiguration.h in Headers */ = {isa = PBXBuildFile; fileRef = 84D8B59C1D768B6E00752B56 /* LFLiveAudioConfiguration.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 8495F67F1DB8F1EE00542124 /* LFLiveVideoConfiguration.h in Headers */ = {isa = PBXBuildFile; fileRef = 84D8B59E1D768B6E00752B56 /* LFLiveVideoConfiguration.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 8495F6801DB8F1EE00542124 /* LFGPUImageBeautyFilter.h in Headers */ = {isa = PBXBuildFile; fileRef = 84D8B5A11D768B6E00752B56 /* LFGPUImageBeautyFilter.h */; }; + 8495F6811DB8F1EE00542124 /* LFGPUImageEmptyFilter.h in Headers */ = {isa = PBXBuildFile; fileRef = 84D8B5A31D768B6E00752B56 /* LFGPUImageEmptyFilter.h */; }; + 8495F6831DB8F1EE00542124 /* LFLiveSession.h in Headers */ = {isa = PBXBuildFile; fileRef = 84D8B5A61D768B6E00752B56 /* LFLiveSession.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 8495F6841DB8F1EE00542124 /* LFAudioFrame.h in Headers */ = {isa = PBXBuildFile; fileRef = 84D8B5A91D768B6E00752B56 /* LFAudioFrame.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 8495F6851DB8F1EE00542124 /* LFFrame.h in Headers */ = {isa = PBXBuildFile; fileRef = 84D8B5AB1D768B6E00752B56 /* LFFrame.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 8495F6861DB8F1EE00542124 /* LFLiveDebug.h in Headers */ = {isa = PBXBuildFile; fileRef = 84D8B5AD1D768B6E00752B56 /* LFLiveDebug.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 8495F6871DB8F1EE00542124 /* LFLiveStreamInfo.h in Headers */ = {isa = PBXBuildFile; fileRef = 84D8B5AF1D768B6E00752B56 /* LFLiveStreamInfo.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 8495F6881DB8F1EE00542124 /* LFVideoFrame.h in Headers */ = {isa = PBXBuildFile; fileRef = 84D8B5B11D768B6E00752B56 /* LFVideoFrame.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 8495F6891DB8F1EE00542124 /* LFStreamingBuffer.h in Headers */ = {isa = PBXBuildFile; fileRef = 84D8B5B41D768B6E00752B56 /* LFStreamingBuffer.h */; }; + 8495F68A1DB8F1EE00542124 /* LFStreamRTMPSocket.h in Headers */ = {isa = PBXBuildFile; fileRef = 84D8B5B61D768B6E00752B56 /* LFStreamRTMPSocket.h */; }; + 8495F68B1DB8F1EE00542124 /* LFStreamSocket.h in Headers */ = {isa = PBXBuildFile; fileRef = 84D8B5B81D768B6E00752B56 /* LFStreamSocket.h */; }; + 8495F68C1DB8F1EE00542124 /* NSMutableArray+LFAdd.h in Headers */ = {isa = PBXBuildFile; fileRef = 84D8B5B91D768B6E00752B56 /* NSMutableArray+LFAdd.h */; }; + 8495F68D1DB8F27000542124 /* LFAudioCapture.m in Sources */ = {isa = PBXBuildFile; fileRef = 84D8B5861D768B6E00752B56 /* LFAudioCapture.m */; }; + 8495F68E1DB8F27000542124 /* LFVideoCapture.m in Sources */ = {isa = PBXBuildFile; fileRef = 84D8B5881D768B6E00752B56 /* LFVideoCapture.m */; }; + 8495F68F1DB8F27000542124 /* LFAVEncoder.mm in Sources */ = {isa = PBXBuildFile; fileRef = 84D8B58C1D768B6E00752B56 /* LFAVEncoder.mm */; }; + 8495F6901DB8F27000542124 /* LFMP4Atom.m in Sources */ = {isa = PBXBuildFile; fileRef = 84D8B58E1D768B6E00752B56 /* LFMP4Atom.m */; }; + 8495F6911DB8F27000542124 /* LFVideoEncoder.m in Sources */ = {isa = PBXBuildFile; fileRef = 84D8B5921D768B6E00752B56 /* LFVideoEncoder.m */; }; + 8495F6921DB8F27000542124 /* LFH264VideoEncoder.mm in Sources */ = {isa = PBXBuildFile; fileRef = 84D8B5951D768B6E00752B56 /* LFH264VideoEncoder.mm */; }; + 8495F6931DB8F27000542124 /* LFHardwareAudioEncoder.m in Sources */ = {isa = PBXBuildFile; fileRef = 84D8B5971D768B6E00752B56 /* LFHardwareAudioEncoder.m */; }; + 8495F6941DB8F27000542124 /* LFHardwareVideoEncoder.m in Sources */ = {isa = PBXBuildFile; fileRef = 84D8B5991D768B6E00752B56 /* LFHardwareVideoEncoder.m */; }; + 8495F6951DB8F27000542124 /* LFLiveAudioConfiguration.m in Sources */ = {isa = PBXBuildFile; fileRef = 84D8B59D1D768B6E00752B56 /* LFLiveAudioConfiguration.m */; }; + 8495F6961DB8F27000542124 /* LFLiveVideoConfiguration.m in Sources */ = {isa = PBXBuildFile; fileRef = 84D8B59F1D768B6E00752B56 /* LFLiveVideoConfiguration.m */; }; + 8495F6971DB8F27000542124 /* LFGPUImageBeautyFilter.m in Sources */ = {isa = PBXBuildFile; fileRef = 84D8B5A21D768B6E00752B56 /* LFGPUImageBeautyFilter.m */; }; + 8495F6981DB8F27000542124 /* LFGPUImageEmptyFilter.m in Sources */ = {isa = PBXBuildFile; fileRef = 84D8B5A41D768B6E00752B56 /* LFGPUImageEmptyFilter.m */; }; + 8495F6991DB8F27000542124 /* LFLiveSession.m in Sources */ = {isa = PBXBuildFile; fileRef = 84D8B5A71D768B6E00752B56 /* LFLiveSession.m */; }; + 8495F69A1DB8F27000542124 /* LFAudioFrame.m in Sources */ = {isa = PBXBuildFile; fileRef = 84D8B5AA1D768B6E00752B56 /* LFAudioFrame.m */; }; + 8495F69B1DB8F27000542124 /* LFFrame.m in Sources */ = {isa = PBXBuildFile; fileRef = 84D8B5AC1D768B6E00752B56 /* LFFrame.m */; }; + 8495F69C1DB8F27000542124 /* LFLiveDebug.m in Sources */ = {isa = PBXBuildFile; fileRef = 84D8B5AE1D768B6E00752B56 /* LFLiveDebug.m */; }; + 8495F69D1DB8F27000542124 /* LFLiveStreamInfo.m in Sources */ = {isa = PBXBuildFile; fileRef = 84D8B5B01D768B6E00752B56 /* LFLiveStreamInfo.m */; }; + 8495F69E1DB8F27000542124 /* LFVideoFrame.m in Sources */ = {isa = PBXBuildFile; fileRef = 84D8B5B21D768B6E00752B56 /* LFVideoFrame.m */; }; + 8495F69F1DB8F27000542124 /* LFStreamingBuffer.m in Sources */ = {isa = PBXBuildFile; fileRef = 84D8B5B51D768B6E00752B56 /* LFStreamingBuffer.m */; }; + 8495F6A01DB8F27000542124 /* LFStreamRtmpSocket.m in Sources */ = {isa = PBXBuildFile; fileRef = 84D8B5B71D768B6E00752B56 /* LFStreamRtmpSocket.m */; }; + 8495F6A11DB8F27000542124 /* NSMutableArray+LFAdd.m in Sources */ = {isa = PBXBuildFile; fileRef = 84D8B5BA1D768B6E00752B56 /* NSMutableArray+LFAdd.m */; }; + 84D0036F1DB8F88F00560583 /* LFNALUnit.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 84D8B58F1D768B6E00752B56 /* LFNALUnit.cpp */; }; 84D8B4BF1D757EB800752B56 /* VideoToolbox.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 84D8B4BE1D757EB800752B56 /* VideoToolbox.framework */; }; 84D8B4C11D757EBE00752B56 /* AudioToolbox.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 84D8B4C01D757EBE00752B56 /* AudioToolbox.framework */; }; 84D8B4C31D757EC400752B56 /* AVFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 84D8B4C21D757EC400752B56 /* AVFoundation.framework */; }; @@ -64,7 +111,9 @@ /* End PBXBuildFile section */ /* Begin PBXFileReference section */ - 7F7E051931BABE0B14FE6A57 /* Pods-LFLiveKit.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-LFLiveKit.debug.xcconfig"; path = "Pods/Target Support Files/Pods-LFLiveKit/Pods-LFLiveKit.debug.xcconfig"; sourceTree = ""; }; + 8495F66B1DB8F14600542124 /* LFLiveKit.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = LFLiveKit.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + 8495F66D1DB8F14600542124 /* LFLiveKitFramework.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = LFLiveKitFramework.h; sourceTree = ""; }; + 8495F66E1DB8F14600542124 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 84D8B3901D7574D600752B56 /* LFLiveKit.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = LFLiveKit.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 84D8B4BE1D757EB800752B56 /* VideoToolbox.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = VideoToolbox.framework; path = System/Library/Frameworks/VideoToolbox.framework; sourceTree = SDKROOT; }; 84D8B4C01D757EBE00752B56 /* AudioToolbox.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AudioToolbox.framework; path = System/Library/Frameworks/AudioToolbox.framework; sourceTree = SDKROOT; }; @@ -121,11 +170,16 @@ 84D8B5B81D768B6E00752B56 /* LFStreamSocket.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LFStreamSocket.h; sourceTree = ""; }; 84D8B5B91D768B6E00752B56 /* NSMutableArray+LFAdd.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSMutableArray+LFAdd.h"; sourceTree = ""; }; 84D8B5BA1D768B6E00752B56 /* NSMutableArray+LFAdd.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSMutableArray+LFAdd.m"; sourceTree = ""; }; - BF1D108D206BBD2267CDB4FB /* Pods-LFLiveKit.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-LFLiveKit.release.xcconfig"; path = "Pods/Target Support Files/Pods-LFLiveKit/Pods-LFLiveKit.release.xcconfig"; sourceTree = ""; }; - D9E53AEC8F2938295308B625 /* libPods-LFLiveKit.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-LFLiveKit.a"; sourceTree = BUILT_PRODUCTS_DIR; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ + 8495F6671DB8F14600542124 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; 84D8B38C1D7574D600752B56 /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; @@ -135,13 +189,21 @@ 84D8B4C31D757EC400752B56 /* AVFoundation.framework in Frameworks */, 84D8B4C11D757EBE00752B56 /* AudioToolbox.framework in Frameworks */, 84D8B4BF1D757EB800752B56 /* VideoToolbox.framework in Frameworks */, - 1F3858C76FA5230BD4B34FEF /* libPods-LFLiveKit.a in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXFrameworksBuildPhase section */ /* Begin PBXGroup section */ + 8495F66C1DB8F14600542124 /* LFLiveKitFramework */ = { + isa = PBXGroup; + children = ( + 8495F66D1DB8F14600542124 /* LFLiveKitFramework.h */, + 8495F66E1DB8F14600542124 /* Info.plist */, + ); + path = LFLiveKitFramework; + sourceTree = ""; + }; 84D8B3861D7574D600752B56 = { isa = PBXGroup; children = ( @@ -153,8 +215,8 @@ 84D8B4C21D757EC400752B56 /* AVFoundation.framework */, 84D8B4C01D757EBE00752B56 /* AudioToolbox.framework */, 84D8B4BE1D757EB800752B56 /* VideoToolbox.framework */, + 8495F66C1DB8F14600542124 /* LFLiveKitFramework */, 84D8B3911D7574D600752B56 /* Products */, - D77470616157694EC6FD0A0D /* Pods */, 9ABACAFFC334034AA0115426 /* Frameworks */, ); sourceTree = ""; @@ -163,6 +225,7 @@ isa = PBXGroup; children = ( 84D8B3901D7574D600752B56 /* LFLiveKit.framework */, + 8495F66B1DB8F14600542124 /* LFLiveKit.framework */, ); name = Products; sourceTree = ""; @@ -282,23 +345,46 @@ 9ABACAFFC334034AA0115426 /* Frameworks */ = { isa = PBXGroup; children = ( - D9E53AEC8F2938295308B625 /* libPods-LFLiveKit.a */, ); name = Frameworks; sourceTree = ""; }; - D77470616157694EC6FD0A0D /* Pods */ = { - isa = PBXGroup; - children = ( - 7F7E051931BABE0B14FE6A57 /* Pods-LFLiveKit.debug.xcconfig */, - BF1D108D206BBD2267CDB4FB /* Pods-LFLiveKit.release.xcconfig */, - ); - name = Pods; - sourceTree = ""; - }; /* End PBXGroup section */ /* Begin PBXHeadersBuildPhase section */ + 8495F6681DB8F14600542124 /* Headers */ = { + isa = PBXHeadersBuildPhase; + buildActionMask = 2147483647; + files = ( + 8495F6861DB8F1EE00542124 /* LFLiveDebug.h in Headers */, + 8495F6881DB8F1EE00542124 /* LFVideoFrame.h in Headers */, + 8495F6871DB8F1EE00542124 /* LFLiveStreamInfo.h in Headers */, + 8495F6851DB8F1EE00542124 /* LFFrame.h in Headers */, + 8495F6841DB8F1EE00542124 /* LFAudioFrame.h in Headers */, + 8495F67F1DB8F1EE00542124 /* LFLiveVideoConfiguration.h in Headers */, + 8495F67E1DB8F1EE00542124 /* LFLiveAudioConfiguration.h in Headers */, + 8495F6831DB8F1EE00542124 /* LFLiveSession.h in Headers */, + 8495F66F1DB8F14600542124 /* LFLiveKitFramework.h in Headers */, + 8495F6731DB8F1EE00542124 /* LFAudioCapture.h in Headers */, + 8495F6741DB8F1EE00542124 /* LFVideoCapture.h in Headers */, + 8495F6751DB8F1EE00542124 /* LFAVEncoder.h in Headers */, + 8495F6761DB8F1EE00542124 /* LFMP4Atom.h in Headers */, + 8495F6771DB8F1EE00542124 /* LFNALUnit.h in Headers */, + 8495F6781DB8F1EE00542124 /* LFVideoEncoder.h in Headers */, + 8495F6791DB8F1EE00542124 /* LFAudioEncoding.h in Headers */, + 8495F67A1DB8F1EE00542124 /* LFH264VideoEncoder.h in Headers */, + 8495F67B1DB8F1EE00542124 /* LFHardwareAudioEncoder.h in Headers */, + 8495F67C1DB8F1EE00542124 /* LFHardwareVideoEncoder.h in Headers */, + 8495F67D1DB8F1EE00542124 /* LFVideoEncoding.h in Headers */, + 8495F6801DB8F1EE00542124 /* LFGPUImageBeautyFilter.h in Headers */, + 8495F6811DB8F1EE00542124 /* LFGPUImageEmptyFilter.h in Headers */, + 8495F6891DB8F1EE00542124 /* LFStreamingBuffer.h in Headers */, + 8495F68A1DB8F1EE00542124 /* LFStreamRTMPSocket.h in Headers */, + 8495F68B1DB8F1EE00542124 /* LFStreamSocket.h in Headers */, + 8495F68C1DB8F1EE00542124 /* NSMutableArray+LFAdd.h in Headers */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; 84D8B38D1D7574D600752B56 /* Headers */ = { isa = PBXHeadersBuildPhase; buildActionMask = 2147483647; @@ -335,16 +421,31 @@ /* End PBXHeadersBuildPhase section */ /* Begin PBXNativeTarget section */ + 8495F66A1DB8F14600542124 /* LFLiveKitFramework */ = { + isa = PBXNativeTarget; + buildConfigurationList = 8495F6701DB8F14600542124 /* Build configuration list for PBXNativeTarget "LFLiveKitFramework" */; + buildPhases = ( + 8495F6661DB8F14600542124 /* Sources */, + 8495F6671DB8F14600542124 /* Frameworks */, + 8495F6681DB8F14600542124 /* Headers */, + 8495F6691DB8F14600542124 /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = LFLiveKitFramework; + productName = LFLiveKitFramework; + productReference = 8495F66B1DB8F14600542124 /* LFLiveKit.framework */; + productType = "com.apple.product-type.framework"; + }; 84D8B38F1D7574D600752B56 /* LFLiveKit */ = { isa = PBXNativeTarget; buildConfigurationList = 84D8B3981D7574D600752B56 /* Build configuration list for PBXNativeTarget "LFLiveKit" */; buildPhases = ( - 2833F857062C89FFF3975A1B /* 📦 Check Pods Manifest.lock */, 84D8B38B1D7574D600752B56 /* Sources */, 84D8B38C1D7574D600752B56 /* Frameworks */, 84D8B38D1D7574D600752B56 /* Headers */, - 84D8B38E1D7574D600752B56 /* Resources */, - D64BB080ABC44A32A8D6E2CF /* 📦 Copy Pods Resources */, ); buildRules = ( ); @@ -364,6 +465,10 @@ LastUpgradeCheck = 0730; ORGANIZATIONNAME = admin; TargetAttributes = { + 8495F66A1DB8F14600542124 = { + CreatedOnToolsVersion = 8.0; + ProvisioningStyle = Automatic; + }; 84D8B38F1D7574D600752B56 = { CreatedOnToolsVersion = 7.3.1; }; @@ -382,12 +487,13 @@ projectRoot = ""; targets = ( 84D8B38F1D7574D600752B56 /* LFLiveKit */, + 8495F66A1DB8F14600542124 /* LFLiveKitFramework */, ); }; /* End PBXProject section */ /* Begin PBXResourcesBuildPhase section */ - 84D8B38E1D7574D600752B56 /* Resources */ = { + 8495F6691DB8F14600542124 /* Resources */ = { isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; files = ( @@ -396,40 +502,36 @@ }; /* End PBXResourcesBuildPhase section */ -/* Begin PBXShellScriptBuildPhase section */ - 2833F857062C89FFF3975A1B /* 📦 Check Pods Manifest.lock */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - ); - name = "📦 Check Pods Manifest.lock"; - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "diff \"${PODS_ROOT}/../Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [[ $? != 0 ]] ; then\n cat << EOM\nerror: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\nEOM\n exit 1\nfi\n"; - showEnvVarsInLog = 0; - }; - D64BB080ABC44A32A8D6E2CF /* 📦 Copy Pods Resources */ = { - isa = PBXShellScriptBuildPhase; +/* Begin PBXSourcesBuildPhase section */ + 8495F6661DB8F14600542124 /* Sources */ = { + isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( - ); - inputPaths = ( - ); - name = "📦 Copy Pods Resources"; - outputPaths = ( + 84D0036F1DB8F88F00560583 /* LFNALUnit.cpp in Sources */, + 8495F68D1DB8F27000542124 /* LFAudioCapture.m in Sources */, + 8495F68E1DB8F27000542124 /* LFVideoCapture.m in Sources */, + 8495F68F1DB8F27000542124 /* LFAVEncoder.mm in Sources */, + 8495F6901DB8F27000542124 /* LFMP4Atom.m in Sources */, + 8495F6911DB8F27000542124 /* LFVideoEncoder.m in Sources */, + 8495F6921DB8F27000542124 /* LFH264VideoEncoder.mm in Sources */, + 8495F6931DB8F27000542124 /* LFHardwareAudioEncoder.m in Sources */, + 8495F6941DB8F27000542124 /* LFHardwareVideoEncoder.m in Sources */, + 8495F6951DB8F27000542124 /* LFLiveAudioConfiguration.m in Sources */, + 8495F6961DB8F27000542124 /* LFLiveVideoConfiguration.m in Sources */, + 8495F6971DB8F27000542124 /* LFGPUImageBeautyFilter.m in Sources */, + 8495F6981DB8F27000542124 /* LFGPUImageEmptyFilter.m in Sources */, + 8495F6991DB8F27000542124 /* LFLiveSession.m in Sources */, + 8495F69A1DB8F27000542124 /* LFAudioFrame.m in Sources */, + 8495F69B1DB8F27000542124 /* LFFrame.m in Sources */, + 8495F69C1DB8F27000542124 /* LFLiveDebug.m in Sources */, + 8495F69D1DB8F27000542124 /* LFLiveStreamInfo.m in Sources */, + 8495F69E1DB8F27000542124 /* LFVideoFrame.m in Sources */, + 8495F69F1DB8F27000542124 /* LFStreamingBuffer.m in Sources */, + 8495F6A01DB8F27000542124 /* LFStreamRtmpSocket.m in Sources */, + 8495F6A11DB8F27000542124 /* NSMutableArray+LFAdd.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-LFLiveKit/Pods-LFLiveKit-resources.sh\"\n"; - showEnvVarsInLog = 0; }; -/* End PBXShellScriptBuildPhase section */ - -/* Begin PBXSourcesBuildPhase section */ 84D8B38B1D7574D600752B56 /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; @@ -462,6 +564,66 @@ /* End PBXSourcesBuildPhase section */ /* Begin XCBuildConfiguration section */ + 8495F6711DB8F14600542124 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_SUSPICIOUS_MOVES = YES; + CODE_SIGN_IDENTITY = ""; + DEFINES_MODULE = YES; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + FRAMEWORK_SEARCH_PATHS = ( + "\"$(SRCROOT)/../samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework\"", + "\"$(SRCROOT)/../samples/LFLiveKitFrameworkDemo/vendors/pili-librtmp.framework\"", + ); + HEADER_SEARCH_PATHS = ( + "\"$(SRCROOT)/../samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers\"", + "\"$(SRCROOT)/../samples/LFLiveKitFrameworkDemo/vendors/pili-librtmp.framework/Headers\"", + ); + INFOPLIST_FILE = LFLiveKitFramework/Info.plist; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + IPHONEOS_DEPLOYMENT_TARGET = 8.0; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + MACH_O_TYPE = staticlib; + PRODUCT_BUNDLE_IDENTIFIER = com.youku.LFLiveKit; + PRODUCT_NAME = LFLiveKit; + SKIP_INSTALL = YES; + }; + name = Debug; + }; + 8495F6721DB8F14600542124 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_SUSPICIOUS_MOVES = YES; + CODE_SIGN_IDENTITY = ""; + DEFINES_MODULE = YES; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + FRAMEWORK_SEARCH_PATHS = ( + "\"$(SRCROOT)/../samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework\"", + "\"$(SRCROOT)/../samples/LFLiveKitFrameworkDemo/vendors/pili-librtmp.framework\"", + ); + HEADER_SEARCH_PATHS = ( + "\"$(SRCROOT)/../samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers\"", + "\"$(SRCROOT)/../samples/LFLiveKitFrameworkDemo/vendors/pili-librtmp.framework/Headers\"", + ); + INFOPLIST_FILE = LFLiveKitFramework/Info.plist; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + IPHONEOS_DEPLOYMENT_TARGET = 8.0; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + MACH_O_TYPE = staticlib; + PRODUCT_BUNDLE_IDENTIFIER = com.youku.LFLiveKit; + PRODUCT_NAME = LFLiveKit; + SKIP_INSTALL = YES; + }; + name = Release; + }; 84D8B3961D7574D600752B56 /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { @@ -554,13 +716,15 @@ }; 84D8B3991D7574D600752B56 /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 7F7E051931BABE0B14FE6A57 /* Pods-LFLiveKit.debug.xcconfig */; buildSettings = { DEFINES_MODULE = YES; DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; DYLIB_INSTALL_NAME_BASE = "@rpath"; - HEADER_SEARCH_PATHS = "$(inherited)"; + HEADER_SEARCH_PATHS = ( + "$(inherited)", + "\"$(SRCROOT)/../LFLiveKitDemo/Pods\"/**", + ); INFOPLIST_FILE = Info.plist; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; IPHONEOS_DEPLOYMENT_TARGET = 7.0; @@ -576,13 +740,15 @@ }; 84D8B39A1D7574D600752B56 /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = BF1D108D206BBD2267CDB4FB /* Pods-LFLiveKit.release.xcconfig */; buildSettings = { DEFINES_MODULE = YES; DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; DYLIB_INSTALL_NAME_BASE = "@rpath"; - HEADER_SEARCH_PATHS = "$(inherited)"; + HEADER_SEARCH_PATHS = ( + "$(inherited)", + "\"$(SRCROOT)/../LFLiveKitDemo/Pods\"/**", + ); INFOPLIST_FILE = Info.plist; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; IPHONEOS_DEPLOYMENT_TARGET = 7.0; @@ -599,6 +765,15 @@ /* End XCBuildConfiguration section */ /* Begin XCConfigurationList section */ + 8495F6701DB8F14600542124 /* Build configuration list for PBXNativeTarget "LFLiveKitFramework" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 8495F6711DB8F14600542124 /* Debug */, + 8495F6721DB8F14600542124 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; 84D8B38A1D7574D600752B56 /* Build configuration list for PBXProject "LFLiveKit" */ = { isa = XCConfigurationList; buildConfigurations = ( diff --git a/FrameWork/LFLiveKitFramework/Info.plist b/FrameWork/LFLiveKitFramework/Info.plist new file mode 100644 index 00000000..fbe1e6b3 --- /dev/null +++ b/FrameWork/LFLiveKitFramework/Info.plist @@ -0,0 +1,24 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + FMWK + CFBundleShortVersionString + 1.0 + CFBundleVersion + $(CURRENT_PROJECT_VERSION) + NSPrincipalClass + + + diff --git a/FrameWork/LFLiveKitFramework/LFLiveKitFramework.h b/FrameWork/LFLiveKitFramework/LFLiveKitFramework.h new file mode 100644 index 00000000..da6bc789 --- /dev/null +++ b/FrameWork/LFLiveKitFramework/LFLiveKitFramework.h @@ -0,0 +1,26 @@ +// +// LFLiveKitFramework.h +// LFLiveKitFramework +// +// Created by admin on 2016/10/20. +// Copyright © 2016年 admin. All rights reserved. +// + +#import + +//! Project version number for LFLiveKitFramework. +FOUNDATION_EXPORT double LFLiveKitFrameworkVersionNumber; + +//! Project version string for LFLiveKitFramework. +FOUNDATION_EXPORT const unsigned char LFLiveKitFrameworkVersionString[]; + +// In this header, you should import all the public headers of your framework using statements like #import + +#import +#import +#import +#import +#import +#import +#import +#import diff --git a/FrameWork/Podfile b/FrameWork/Podfile deleted file mode 100644 index 1e41c470..00000000 --- a/FrameWork/Podfile +++ /dev/null @@ -1,7 +0,0 @@ -source 'https://github.com/CocoaPods/Specs.git' -platform :ios,'7.0' - -target “LFLiveKit” do - pod 'pili-librtmp', '~> 1.0.3.1' - pod 'LMGPUImage' -end diff --git a/LFLiveKit/LFLiveKit.h b/LFLiveKit/LFLiveKit.h index b3f21814..7f288b7a 100644 --- a/LFLiveKit/LFLiveKit.h +++ b/LFLiveKit/LFLiveKit.h @@ -6,16 +6,9 @@ // Copyright © 2016年 LaiFeng All rights reserved. // -#if __has_include() -#import -#import -#import -#import -#import -#import -#import -#import -#else +#ifndef LFLiveKit_h +#define LFLiveKit_h + #import "LFLiveSession.h" #import "LFLiveAudioConfiguration.h" #import "LFLiveVideoConfiguration.h" @@ -24,5 +17,6 @@ #import "LFLiveStreamInfo.h" #import "LFVideoFrame.h" #import "LFLiveDebug.h" + #endif diff --git a/LFLiveKit/LFLiveSession.h b/LFLiveKit/LFLiveSession.h index 37d79e61..95985e42 100755 --- a/LFLiveKit/LFLiveSession.h +++ b/LFLiveKit/LFLiveSession.h @@ -9,14 +9,6 @@ #import #import -#if __has_include() -#import -#import -#import -#import -#import -#import -#else #import "LFLiveStreamInfo.h" #import "LFAudioFrame.h" #import "LFVideoFrame.h" @@ -24,8 +16,6 @@ #import "LFLiveVideoConfiguration.h" #import "LFLiveDebug.h" -#endif - typedef NS_ENUM(NSInteger,LFLiveCaptureType) { diff --git a/LFLiveKit/capture/LFAudioCapture.h b/LFLiveKit/capture/LFAudioCapture.h index 904fef0f..00b30774 100755 --- a/LFLiveKit/capture/LFAudioCapture.h +++ b/LFLiveKit/capture/LFAudioCapture.h @@ -8,12 +8,7 @@ #import #import - -#if __has_include() -#import -#else #import "LFLiveAudioConfiguration.h" -#endif #pragma mark -- AudioCaptureNotification /** compoentFialed will post the notification */ diff --git a/LFLiveKit/capture/LFVideoCapture.h b/LFLiveKit/capture/LFVideoCapture.h index b950e0cc..4e719c0e 100755 --- a/LFLiveKit/capture/LFVideoCapture.h +++ b/LFLiveKit/capture/LFVideoCapture.h @@ -8,12 +8,7 @@ #import #import - -#if __has_include() -#import -#else #import "LFLiveVideoConfiguration.h" -#endif @class LFVideoCapture; /** LFVideoCapture callback videoData */ diff --git a/LFLiveKit/coder/H264/LFAVEncoder.h b/LFLiveKit/coder/H264/LFAVEncoder.h index 8867fa84..9e06e370 100755 --- a/LFLiveKit/coder/H264/LFAVEncoder.h +++ b/LFLiveKit/coder/H264/LFAVEncoder.h @@ -13,13 +13,8 @@ #import #import -#if __has_include() -#import -#import -#else #import "LFVideoEncoder.h" #import "LFMP4Atom.h" -#endif diff --git a/LFLiveKit/coder/LFAudioEncoding.h b/LFLiveKit/coder/LFAudioEncoding.h index ff43ea83..d050f438 100755 --- a/LFLiveKit/coder/LFAudioEncoding.h +++ b/LFLiveKit/coder/LFAudioEncoding.h @@ -8,13 +8,8 @@ #import #import -#if __has_include() -#import -#import -#else #import "LFAudioFrame.h" #import "LFLiveAudioConfiguration.h" -#endif diff --git a/LFLiveKit/coder/LFH264VideoEncoder.h b/LFLiveKit/coder/LFH264VideoEncoder.h index b62f891a..f3cf1ac9 100644 --- a/LFLiveKit/coder/LFH264VideoEncoder.h +++ b/LFLiveKit/coder/LFH264VideoEncoder.h @@ -6,11 +6,7 @@ // Copyright © 2016年 LaiFeng All rights reserved. // -#if __has_include() -#import -#else #import "LFVideoEncoding.h" -#endif @interface LFH264VideoEncoder : NSObject { diff --git a/LFLiveKit/coder/LFHardwareAudioEncoder.h b/LFLiveKit/coder/LFHardwareAudioEncoder.h index b82fc9f8..cb028e45 100755 --- a/LFLiveKit/coder/LFHardwareAudioEncoder.h +++ b/LFLiveKit/coder/LFHardwareAudioEncoder.h @@ -6,11 +6,7 @@ // Copyright © 2016年 LaiFeng All rights reserved. // -#if __has_include() -#import -#else #import "LFAudioEncoding.h" -#endif @interface LFHardwareAudioEncoder : NSObject diff --git a/LFLiveKit/coder/LFHardwareAudioEncoder.m b/LFLiveKit/coder/LFHardwareAudioEncoder.m index 5d487467..64f97225 100755 --- a/LFLiveKit/coder/LFHardwareAudioEncoder.m +++ b/LFLiveKit/coder/LFHardwareAudioEncoder.m @@ -176,17 +176,12 @@ - (BOOL)createAudioConvert { //根据输入样本初始化一个编码转换器 OSStatus result = AudioConverterNewSpecific(&inputFormat, &outputFormat, 2, requestedCodecs, &m_converter);; UInt32 outputBitrate = _configuration.audioBitrate; UInt32 propSize = sizeof(outputBitrate); - // UInt32 outputPacketSize = 0; if(result == noErr) { result = AudioConverterSetProperty(m_converter, kAudioConverterEncodeBitRate, propSize, &outputBitrate); } - // if(result == noErr) { - // AudioConverterGetProperty(m_converter, kAudioConverterPropertyMaximumOutputPacketSize, &propSize, &outputPacketSize); - // } - return YES; } diff --git a/LFLiveKit/coder/LFHardwareVideoEncoder.h b/LFLiveKit/coder/LFHardwareVideoEncoder.h index 696f9a8b..41c6e002 100755 --- a/LFLiveKit/coder/LFHardwareVideoEncoder.h +++ b/LFLiveKit/coder/LFHardwareVideoEncoder.h @@ -6,11 +6,7 @@ // Copyright © 2016年 LaiFeng All rights reserved. // -#if __has_include() -#import -#else #import "LFVideoEncoding.h" -#endif @interface LFHardwareVideoEncoder : NSObject diff --git a/LFLiveKit/coder/LFHardwareVideoEncoder.m b/LFLiveKit/coder/LFHardwareVideoEncoder.m index 0f95c8d9..6c3d20fe 100755 --- a/LFLiveKit/coder/LFHardwareVideoEncoder.m +++ b/LFLiveKit/coder/LFHardwareVideoEncoder.m @@ -59,7 +59,7 @@ - (void)resetCompressionSession { _currentVideoBitRate = _configuration.videoBitRate; VTSessionSetProperty(compressionSession, kVTCompressionPropertyKey_MaxKeyFrameInterval, (__bridge CFTypeRef)@(_configuration.videoMaxKeyframeInterval)); - VTSessionSetProperty(compressionSession, kVTCompressionPropertyKey_MaxKeyFrameIntervalDuration, (__bridge CFTypeRef)@(_configuration.videoMaxKeyframeInterval)); + VTSessionSetProperty(compressionSession, kVTCompressionPropertyKey_MaxKeyFrameIntervalDuration, (__bridge CFTypeRef)@(_configuration.videoMaxKeyframeInterval/_configuration.videoFrameRate)); VTSessionSetProperty(compressionSession, kVTCompressionPropertyKey_ExpectedFrameRate, (__bridge CFTypeRef)@(_configuration.videoFrameRate)); VTSessionSetProperty(compressionSession, kVTCompressionPropertyKey_AverageBitRate, (__bridge CFTypeRef)@(_configuration.videoBitRate)); NSArray *limit = @[@(_configuration.videoBitRate * 1.5/8), @(1)]; diff --git a/LFLiveKit/coder/LFVideoEncoding.h b/LFLiveKit/coder/LFVideoEncoding.h index ccdd085a..252b2a14 100755 --- a/LFLiveKit/coder/LFVideoEncoding.h +++ b/LFLiveKit/coder/LFVideoEncoding.h @@ -7,15 +7,8 @@ // #import - -#if __has_include() -#import -#import -#else #import "LFVideoFrame.h" #import "LFLiveVideoConfiguration.h" -#endif - @protocol LFVideoEncoding; /// 编码器编码后回调 diff --git a/LFLiveKit/filter/LFGPUImageBeautyFilter.h b/LFLiveKit/filter/LFGPUImageBeautyFilter.h index d7a9363a..03211585 100755 --- a/LFLiveKit/filter/LFGPUImageBeautyFilter.h +++ b/LFLiveKit/filter/LFGPUImageBeautyFilter.h @@ -1,10 +1,9 @@ -#if __has_include() -#import -#elif __has_include() +#if __has_include() #import #else #import "GPUImage.h" #endif + @interface LFGPUImageBeautyFilter : GPUImageFilter { } diff --git a/LFLiveKit/filter/LFGPUImageEmptyFilter.h b/LFLiveKit/filter/LFGPUImageEmptyFilter.h index 99721507..5aad12d6 100755 --- a/LFLiveKit/filter/LFGPUImageEmptyFilter.h +++ b/LFLiveKit/filter/LFGPUImageEmptyFilter.h @@ -1,7 +1,5 @@ -#if __has_include() -#import -#elif __has_include("GPUImage/GPUImage.h") -#import "GPUImage/GPUImage.h" +#if __has_include() +#import #else #import "GPUImage.h" #endif diff --git a/LFLiveKit/objects/LFAudioFrame.h b/LFLiveKit/objects/LFAudioFrame.h index cb464ce3..8d355e4a 100755 --- a/LFLiveKit/objects/LFAudioFrame.h +++ b/LFLiveKit/objects/LFAudioFrame.h @@ -6,11 +6,7 @@ // Copyright © 2016年 LaiFeng All rights reserved. // -#if __has_include() -#import -#else #import "LFFrame.h" -#endif @interface LFAudioFrame : LFFrame diff --git a/LFLiveKit/objects/LFLiveStreamInfo.h b/LFLiveKit/objects/LFLiveStreamInfo.h index 862c040e..114e1b09 100755 --- a/LFLiveKit/objects/LFLiveStreamInfo.h +++ b/LFLiveKit/objects/LFLiveStreamInfo.h @@ -7,14 +7,8 @@ // #import - -#if __has_include() -#import -#import -#else #import "LFLiveAudioConfiguration.h" #import "LFLiveVideoConfiguration.h" -#endif diff --git a/LFLiveKit/objects/LFVideoFrame.h b/LFLiveKit/objects/LFVideoFrame.h index e2c089b0..97e42612 100755 --- a/LFLiveKit/objects/LFVideoFrame.h +++ b/LFLiveKit/objects/LFVideoFrame.h @@ -6,11 +6,7 @@ // Copyright © 2016年 LaiFeng All rights reserved. // -#if __has_include() -#import -#else #import "LFFrame.h" -#endif @interface LFVideoFrame : LFFrame diff --git a/LFLiveKit/publish/LFStreamRTMPSocket.h b/LFLiveKit/publish/LFStreamRTMPSocket.h index edbabda5..c613ff9f 100644 --- a/LFLiveKit/publish/LFStreamRTMPSocket.h +++ b/LFLiveKit/publish/LFStreamRTMPSocket.h @@ -6,11 +6,7 @@ // Copyright © 2016年 LaiFeng All rights reserved. // -#if __has_include() -#import -#else #import "LFStreamSocket.h" -#endif @interface LFStreamRTMPSocket : NSObject diff --git a/LFLiveKit/publish/LFStreamRtmpSocket.m b/LFLiveKit/publish/LFStreamRtmpSocket.m index 54211175..89118046 100644 --- a/LFLiveKit/publish/LFStreamRtmpSocket.m +++ b/LFLiveKit/publish/LFStreamRtmpSocket.m @@ -10,8 +10,6 @@ #if __has_include() #import -#elif __has_include("pili-librtmp/rtmp.h") -#import "pili-librtmp/rtmp.h" #else #import "rtmp.h" #endif @@ -541,7 +539,6 @@ void RTMPErrorCallback(RTMPError *error, void *userData) { } void ConnectionTimeCallback(PILI_CONNECTION_TIME *conn_time, void *userData) { - LFStreamRTMPSocket *socket = (__bridge LFStreamRTMPSocket*)userData; } #pragma mark -- LFStreamingBufferDelegate diff --git a/LFLiveKit/publish/LFStreamSocket.h b/LFLiveKit/publish/LFStreamSocket.h index 8855e3da..fcf79ee8 100644 --- a/LFLiveKit/publish/LFStreamSocket.h +++ b/LFLiveKit/publish/LFStreamSocket.h @@ -7,16 +7,9 @@ // #import - -#if __has_include() -#import -#import -#import -#else #import "LFLiveStreamInfo.h" #import "LFStreamingBuffer.h" #import "LFLiveDebug.h" -#endif diff --git a/LFLiveKit/publish/LFStreamingBuffer.h b/LFLiveKit/publish/LFStreamingBuffer.h index 77c1ef8f..aa868b93 100755 --- a/LFLiveKit/publish/LFStreamingBuffer.h +++ b/LFLiveKit/publish/LFStreamingBuffer.h @@ -7,14 +7,8 @@ // #import - -#if __has_include() -#import -#import -#else #import "LFAudioFrame.h" #import "LFVideoFrame.h" -#endif /** current buffer status */ diff --git a/LFLiveKitDemo/LFLiveKitDemo.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/LFLiveKitDemo/LFLiveKitDemo.xcodeproj/project.xcworkspace/contents.xcworkspacedata deleted file mode 100644 index 122805a2..00000000 --- a/LFLiveKitDemo/LFLiveKitDemo.xcodeproj/project.xcworkspace/contents.xcworkspacedata +++ /dev/null @@ -1,7 +0,0 @@ - - - - - diff --git a/LFLiveKitDemo/LFLiveKitDemo.xcodeproj/project.xcworkspace/xcuserdata/admin.xcuserdatad/UserInterfaceState.xcuserstate b/LFLiveKitDemo/LFLiveKitDemo.xcodeproj/project.xcworkspace/xcuserdata/admin.xcuserdatad/UserInterfaceState.xcuserstate deleted file mode 100644 index 16896160..00000000 Binary files a/LFLiveKitDemo/LFLiveKitDemo.xcodeproj/project.xcworkspace/xcuserdata/admin.xcuserdatad/UserInterfaceState.xcuserstate and /dev/null differ diff --git a/LFLiveKitDemo/LFLiveKitDemo.xcodeproj/xcuserdata/admin.xcuserdatad/xcschemes/LFLiveKitDemo.xcscheme b/LFLiveKitDemo/LFLiveKitDemo.xcodeproj/xcuserdata/admin.xcuserdatad/xcschemes/LFLiveKitDemo.xcscheme deleted file mode 100644 index b97ad901..00000000 --- a/LFLiveKitDemo/LFLiveKitDemo.xcodeproj/xcuserdata/admin.xcuserdatad/xcschemes/LFLiveKitDemo.xcscheme +++ /dev/null @@ -1,91 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/LFLiveKitDemo/LFLiveKitDemo.xcodeproj/xcuserdata/admin.xcuserdatad/xcschemes/xcschememanagement.plist b/LFLiveKitDemo/LFLiveKitDemo.xcodeproj/xcuserdata/admin.xcuserdatad/xcschemes/xcschememanagement.plist deleted file mode 100644 index 654687fc..00000000 --- a/LFLiveKitDemo/LFLiveKitDemo.xcodeproj/xcuserdata/admin.xcuserdatad/xcschemes/xcschememanagement.plist +++ /dev/null @@ -1,22 +0,0 @@ - - - - - SchemeUserState - - LFLiveKitDemo.xcscheme - - orderHint - 0 - - - SuppressBuildableAutocreation - - 84D8B4251D75778B00752B56 - - primary - - - - - diff --git a/LFLiveKitSwiftDemo/LFLiveKitSwiftDemo.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/LFLiveKitSwiftDemo/LFLiveKitSwiftDemo.xcodeproj/project.xcworkspace/contents.xcworkspacedata deleted file mode 100644 index f0571c28..00000000 --- a/LFLiveKitSwiftDemo/LFLiveKitSwiftDemo.xcodeproj/project.xcworkspace/contents.xcworkspacedata +++ /dev/null @@ -1,7 +0,0 @@ - - - - - diff --git a/LFLiveKitDemo/LFLiveKitDemo.xcodeproj/project.pbxproj b/samples/LFLiveKitDemo/LFLiveKitDemo.xcodeproj/project.pbxproj similarity index 100% rename from LFLiveKitDemo/LFLiveKitDemo.xcodeproj/project.pbxproj rename to samples/LFLiveKitDemo/LFLiveKitDemo.xcodeproj/project.pbxproj diff --git a/LFLiveKitDemo/LFLiveKitDemo/AppDelegate.h b/samples/LFLiveKitDemo/LFLiveKitDemo/AppDelegate.h similarity index 100% rename from LFLiveKitDemo/LFLiveKitDemo/AppDelegate.h rename to samples/LFLiveKitDemo/LFLiveKitDemo/AppDelegate.h diff --git a/LFLiveKitDemo/LFLiveKitDemo/AppDelegate.m b/samples/LFLiveKitDemo/LFLiveKitDemo/AppDelegate.m similarity index 100% rename from LFLiveKitDemo/LFLiveKitDemo/AppDelegate.m rename to samples/LFLiveKitDemo/LFLiveKitDemo/AppDelegate.m diff --git a/LFLiveKitDemo/LFLiveKitDemo/Assets.xcassets/AppIcon.appiconset/Contents.json b/samples/LFLiveKitDemo/LFLiveKitDemo/Assets.xcassets/AppIcon.appiconset/Contents.json similarity index 100% rename from LFLiveKitDemo/LFLiveKitDemo/Assets.xcassets/AppIcon.appiconset/Contents.json rename to samples/LFLiveKitDemo/LFLiveKitDemo/Assets.xcassets/AppIcon.appiconset/Contents.json diff --git a/LFLiveKitDemo/LFLiveKitDemo/Base.lproj/LaunchScreen.storyboard b/samples/LFLiveKitDemo/LFLiveKitDemo/Base.lproj/LaunchScreen.storyboard similarity index 100% rename from LFLiveKitDemo/LFLiveKitDemo/Base.lproj/LaunchScreen.storyboard rename to samples/LFLiveKitDemo/LFLiveKitDemo/Base.lproj/LaunchScreen.storyboard diff --git a/LFLiveKitDemo/LFLiveKitDemo/Base.lproj/Main.storyboard b/samples/LFLiveKitDemo/LFLiveKitDemo/Base.lproj/Main.storyboard similarity index 100% rename from LFLiveKitDemo/LFLiveKitDemo/Base.lproj/Main.storyboard rename to samples/LFLiveKitDemo/LFLiveKitDemo/Base.lproj/Main.storyboard diff --git a/LFLiveKitDemo/LFLiveKitDemo/Icon.png b/samples/LFLiveKitDemo/LFLiveKitDemo/Icon.png similarity index 100% rename from LFLiveKitDemo/LFLiveKitDemo/Icon.png rename to samples/LFLiveKitDemo/LFLiveKitDemo/Icon.png diff --git a/LFLiveKitDemo/LFLiveKitDemo/Info.plist b/samples/LFLiveKitDemo/LFLiveKitDemo/Info.plist similarity index 100% rename from LFLiveKitDemo/LFLiveKitDemo/Info.plist rename to samples/LFLiveKitDemo/LFLiveKitDemo/Info.plist diff --git a/LFLiveKitDemo/LFLiveKitDemo/LFLivePreview.h b/samples/LFLiveKitDemo/LFLiveKitDemo/LFLivePreview.h similarity index 100% rename from LFLiveKitDemo/LFLiveKitDemo/LFLivePreview.h rename to samples/LFLiveKitDemo/LFLiveKitDemo/LFLivePreview.h diff --git a/LFLiveKitDemo/LFLiveKitDemo/LFLivePreview.m b/samples/LFLiveKitDemo/LFLiveKitDemo/LFLivePreview.m similarity index 100% rename from LFLiveKitDemo/LFLiveKitDemo/LFLivePreview.m rename to samples/LFLiveKitDemo/LFLiveKitDemo/LFLivePreview.m diff --git a/LFLiveKitDemo/LFLiveKitDemo/ViewController.h b/samples/LFLiveKitDemo/LFLiveKitDemo/ViewController.h similarity index 100% rename from LFLiveKitDemo/LFLiveKitDemo/ViewController.h rename to samples/LFLiveKitDemo/LFLiveKitDemo/ViewController.h diff --git a/LFLiveKitDemo/LFLiveKitDemo/ViewController.m b/samples/LFLiveKitDemo/LFLiveKitDemo/ViewController.m similarity index 100% rename from LFLiveKitDemo/LFLiveKitDemo/ViewController.m rename to samples/LFLiveKitDemo/LFLiveKitDemo/ViewController.m diff --git a/LFLiveKitDemo/LFLiveKitDemo/category/UIControl+YYAdd.h b/samples/LFLiveKitDemo/LFLiveKitDemo/category/UIControl+YYAdd.h similarity index 100% rename from LFLiveKitDemo/LFLiveKitDemo/category/UIControl+YYAdd.h rename to samples/LFLiveKitDemo/LFLiveKitDemo/category/UIControl+YYAdd.h diff --git a/LFLiveKitDemo/LFLiveKitDemo/category/UIControl+YYAdd.m b/samples/LFLiveKitDemo/LFLiveKitDemo/category/UIControl+YYAdd.m similarity index 100% rename from LFLiveKitDemo/LFLiveKitDemo/category/UIControl+YYAdd.m rename to samples/LFLiveKitDemo/LFLiveKitDemo/category/UIControl+YYAdd.m diff --git a/LFLiveKitDemo/LFLiveKitDemo/category/UIView+YYAdd.h b/samples/LFLiveKitDemo/LFLiveKitDemo/category/UIView+YYAdd.h similarity index 100% rename from LFLiveKitDemo/LFLiveKitDemo/category/UIView+YYAdd.h rename to samples/LFLiveKitDemo/LFLiveKitDemo/category/UIView+YYAdd.h diff --git a/LFLiveKitDemo/LFLiveKitDemo/category/UIView+YYAdd.m b/samples/LFLiveKitDemo/LFLiveKitDemo/category/UIView+YYAdd.m similarity index 100% rename from LFLiveKitDemo/LFLiveKitDemo/category/UIView+YYAdd.m rename to samples/LFLiveKitDemo/LFLiveKitDemo/category/UIView+YYAdd.m diff --git a/LFLiveKitDemo/LFLiveKitDemo/images/camra_beauty@2x.png b/samples/LFLiveKitDemo/LFLiveKitDemo/images/camra_beauty@2x.png similarity index 100% rename from LFLiveKitDemo/LFLiveKitDemo/images/camra_beauty@2x.png rename to samples/LFLiveKitDemo/LFLiveKitDemo/images/camra_beauty@2x.png diff --git a/LFLiveKitDemo/LFLiveKitDemo/images/camra_beauty@3x.png b/samples/LFLiveKitDemo/LFLiveKitDemo/images/camra_beauty@3x.png similarity index 100% rename from LFLiveKitDemo/LFLiveKitDemo/images/camra_beauty@3x.png rename to samples/LFLiveKitDemo/LFLiveKitDemo/images/camra_beauty@3x.png diff --git a/LFLiveKitDemo/LFLiveKitDemo/images/camra_beauty_close@2x.png b/samples/LFLiveKitDemo/LFLiveKitDemo/images/camra_beauty_close@2x.png similarity index 100% rename from LFLiveKitDemo/LFLiveKitDemo/images/camra_beauty_close@2x.png rename to samples/LFLiveKitDemo/LFLiveKitDemo/images/camra_beauty_close@2x.png diff --git a/LFLiveKitDemo/LFLiveKitDemo/images/camra_beauty_close@3x.png b/samples/LFLiveKitDemo/LFLiveKitDemo/images/camra_beauty_close@3x.png similarity index 100% rename from LFLiveKitDemo/LFLiveKitDemo/images/camra_beauty_close@3x.png rename to samples/LFLiveKitDemo/LFLiveKitDemo/images/camra_beauty_close@3x.png diff --git a/LFLiveKitDemo/LFLiveKitDemo/images/camra_preview@2x.png b/samples/LFLiveKitDemo/LFLiveKitDemo/images/camra_preview@2x.png similarity index 100% rename from LFLiveKitDemo/LFLiveKitDemo/images/camra_preview@2x.png rename to samples/LFLiveKitDemo/LFLiveKitDemo/images/camra_preview@2x.png diff --git a/LFLiveKitDemo/LFLiveKitDemo/images/camra_preview@3x.png b/samples/LFLiveKitDemo/LFLiveKitDemo/images/camra_preview@3x.png similarity index 100% rename from LFLiveKitDemo/LFLiveKitDemo/images/camra_preview@3x.png rename to samples/LFLiveKitDemo/LFLiveKitDemo/images/camra_preview@3x.png diff --git a/LFLiveKitDemo/LFLiveKitDemo/images/close_preview@2x.png b/samples/LFLiveKitDemo/LFLiveKitDemo/images/close_preview@2x.png similarity index 100% rename from LFLiveKitDemo/LFLiveKitDemo/images/close_preview@2x.png rename to samples/LFLiveKitDemo/LFLiveKitDemo/images/close_preview@2x.png diff --git a/LFLiveKitDemo/LFLiveKitDemo/images/close_preview@3x.png b/samples/LFLiveKitDemo/LFLiveKitDemo/images/close_preview@3x.png similarity index 100% rename from LFLiveKitDemo/LFLiveKitDemo/images/close_preview@3x.png rename to samples/LFLiveKitDemo/LFLiveKitDemo/images/close_preview@3x.png diff --git a/LFLiveKitDemo/LFLiveKitDemo/images/ios-29x29.png b/samples/LFLiveKitDemo/LFLiveKitDemo/images/ios-29x29.png similarity index 100% rename from LFLiveKitDemo/LFLiveKitDemo/images/ios-29x29.png rename to samples/LFLiveKitDemo/LFLiveKitDemo/images/ios-29x29.png diff --git a/LFLiveKitDemo/LFLiveKitDemo/main.m b/samples/LFLiveKitDemo/LFLiveKitDemo/main.m similarity index 100% rename from LFLiveKitDemo/LFLiveKitDemo/main.m rename to samples/LFLiveKitDemo/LFLiveKitDemo/main.m diff --git a/LFLiveKitDemo/Podfile b/samples/LFLiveKitDemo/Podfile similarity index 72% rename from LFLiveKitDemo/Podfile rename to samples/LFLiveKitDemo/Podfile index 529839ed..340cad85 100644 --- a/LFLiveKitDemo/Podfile +++ b/samples/LFLiveKitDemo/Podfile @@ -2,5 +2,5 @@ source 'https://github.com/CocoaPods/Specs.git' platform :ios,'7.0' target “LFLiveKitDemo” do - pod 'LFLiveKit', :path => '../.' + pod 'LFLiveKit', :path => '../../.' end diff --git a/samples/LFLiveKitFrameworkDemo/LFLiveKitFrameworkDemo.xcodeproj/project.pbxproj b/samples/LFLiveKitFrameworkDemo/LFLiveKitFrameworkDemo.xcodeproj/project.pbxproj new file mode 100644 index 00000000..69c5247b --- /dev/null +++ b/samples/LFLiveKitFrameworkDemo/LFLiveKitFrameworkDemo.xcodeproj/project.pbxproj @@ -0,0 +1,519 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 46; + objects = { + +/* Begin PBXBuildFile section */ + 8495F6B01DB8F37300542124 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 8495F6AF1DB8F37300542124 /* main.m */; }; + 8495F6B31DB8F37300542124 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 8495F6B21DB8F37300542124 /* AppDelegate.m */; }; + 8495F6B61DB8F37300542124 /* FirstViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 8495F6B51DB8F37300542124 /* FirstViewController.m */; }; + 8495F6B91DB8F37300542124 /* SecondViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 8495F6B81DB8F37300542124 /* SecondViewController.m */; }; + 8495F6BC1DB8F37300542124 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 8495F6BA1DB8F37300542124 /* Main.storyboard */; }; + 8495F6BE1DB8F37300542124 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 8495F6BD1DB8F37300542124 /* Assets.xcassets */; }; + 8495F6C11DB8F37300542124 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 8495F6BF1DB8F37300542124 /* LaunchScreen.storyboard */; }; + 8495F6D31DB8F3CD00542124 /* LFLiveKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8495F6D01DB8F37E00542124 /* LFLiveKit.framework */; }; + 8495F6D71DB8F49800542124 /* GPUImage.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8495F6D51DB8F49800542124 /* GPUImage.framework */; }; + 8495F6D81DB8F49800542124 /* pili-librtmp.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8495F6D61DB8F49800542124 /* pili-librtmp.framework */; }; + 84D003561DB8F7FA00560583 /* UIControl+YYAdd.m in Sources */ = {isa = PBXBuildFile; fileRef = 84D003471DB8F7FA00560583 /* UIControl+YYAdd.m */; }; + 84D003571DB8F7FA00560583 /* UIView+YYAdd.m in Sources */ = {isa = PBXBuildFile; fileRef = 84D003491DB8F7FA00560583 /* UIView+YYAdd.m */; }; + 84D003581DB8F7FA00560583 /* camra_beauty@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 84D0034B1DB8F7FA00560583 /* camra_beauty@2x.png */; }; + 84D003591DB8F7FA00560583 /* camra_beauty@3x.png in Resources */ = {isa = PBXBuildFile; fileRef = 84D0034C1DB8F7FA00560583 /* camra_beauty@3x.png */; }; + 84D0035A1DB8F7FA00560583 /* camra_beauty_close@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 84D0034D1DB8F7FA00560583 /* camra_beauty_close@2x.png */; }; + 84D0035B1DB8F7FA00560583 /* camra_beauty_close@3x.png in Resources */ = {isa = PBXBuildFile; fileRef = 84D0034E1DB8F7FA00560583 /* camra_beauty_close@3x.png */; }; + 84D0035C1DB8F7FA00560583 /* camra_preview@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 84D0034F1DB8F7FA00560583 /* camra_preview@2x.png */; }; + 84D0035D1DB8F7FA00560583 /* camra_preview@3x.png in Resources */ = {isa = PBXBuildFile; fileRef = 84D003501DB8F7FA00560583 /* camra_preview@3x.png */; }; + 84D0035E1DB8F7FA00560583 /* close_preview@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 84D003511DB8F7FA00560583 /* close_preview@2x.png */; }; + 84D0035F1DB8F7FA00560583 /* close_preview@3x.png in Resources */ = {isa = PBXBuildFile; fileRef = 84D003521DB8F7FA00560583 /* close_preview@3x.png */; }; + 84D003601DB8F7FA00560583 /* ios-29x29.png in Resources */ = {isa = PBXBuildFile; fileRef = 84D003531DB8F7FA00560583 /* ios-29x29.png */; }; + 84D003611DB8F7FA00560583 /* LFLivePreview.m in Sources */ = {isa = PBXBuildFile; fileRef = 84D003551DB8F7FA00560583 /* LFLivePreview.m */; }; + 84D003641DB8F83400560583 /* libstdc++.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = 84D003631DB8F83400560583 /* libstdc++.tbd */; }; + 84D0036A1DB8F85E00560583 /* VideoToolbox.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 84D003691DB8F85E00560583 /* VideoToolbox.framework */; }; + 84D0036C1DB8F86700560583 /* AudioToolbox.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 84D0036B1DB8F86700560583 /* AudioToolbox.framework */; }; + 84D0036E1DB8F86D00560583 /* AVFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 84D0036D1DB8F86D00560583 /* AVFoundation.framework */; }; + 84D003711DB8F8BD00560583 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 84D003701DB8F8BD00560583 /* UIKit.framework */; }; + 84D003731DB8F8C200560583 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 84D003721DB8F8C200560583 /* Foundation.framework */; }; +/* End PBXBuildFile section */ + +/* Begin PBXContainerItemProxy section */ + 8495F6CD1DB8F37E00542124 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 8495F6C81DB8F37E00542124 /* LFLiveKit.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = 84D8B3901D7574D600752B56; + remoteInfo = LFLiveKit; + }; + 8495F6CF1DB8F37E00542124 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 8495F6C81DB8F37E00542124 /* LFLiveKit.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = 8495F66B1DB8F14600542124; + remoteInfo = LFLiveKitFramework; + }; + 8495F6D11DB8F3C400542124 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 8495F6C81DB8F37E00542124 /* LFLiveKit.xcodeproj */; + proxyType = 1; + remoteGlobalIDString = 8495F66A1DB8F14600542124; + remoteInfo = LFLiveKitFramework; + }; +/* End PBXContainerItemProxy section */ + +/* Begin PBXFileReference section */ + 8495F6AB1DB8F37300542124 /* LFLiveKitFrameworkDemo.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = LFLiveKitFrameworkDemo.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 8495F6AF1DB8F37300542124 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; + 8495F6B11DB8F37300542124 /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; }; + 8495F6B21DB8F37300542124 /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; }; + 8495F6B41DB8F37300542124 /* FirstViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = FirstViewController.h; sourceTree = ""; }; + 8495F6B51DB8F37300542124 /* FirstViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = FirstViewController.m; sourceTree = ""; }; + 8495F6B71DB8F37300542124 /* SecondViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SecondViewController.h; sourceTree = ""; }; + 8495F6B81DB8F37300542124 /* SecondViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SecondViewController.m; sourceTree = ""; }; + 8495F6BB1DB8F37300542124 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; + 8495F6BD1DB8F37300542124 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; + 8495F6C01DB8F37300542124 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; + 8495F6C21DB8F37300542124 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + 8495F6C81DB8F37E00542124 /* LFLiveKit.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = LFLiveKit.xcodeproj; path = ../../FrameWork/LFLiveKit.xcodeproj; sourceTree = ""; }; + 8495F6D51DB8F49800542124 /* GPUImage.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = GPUImage.framework; path = vendors/GPUImage.framework; sourceTree = ""; }; + 8495F6D61DB8F49800542124 /* pili-librtmp.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = "pili-librtmp.framework"; path = "vendors/pili-librtmp.framework"; sourceTree = ""; }; + 84D003461DB8F7FA00560583 /* UIControl+YYAdd.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "UIControl+YYAdd.h"; sourceTree = ""; }; + 84D003471DB8F7FA00560583 /* UIControl+YYAdd.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "UIControl+YYAdd.m"; sourceTree = ""; }; + 84D003481DB8F7FA00560583 /* UIView+YYAdd.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "UIView+YYAdd.h"; sourceTree = ""; }; + 84D003491DB8F7FA00560583 /* UIView+YYAdd.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "UIView+YYAdd.m"; sourceTree = ""; }; + 84D0034B1DB8F7FA00560583 /* camra_beauty@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "camra_beauty@2x.png"; sourceTree = ""; }; + 84D0034C1DB8F7FA00560583 /* camra_beauty@3x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "camra_beauty@3x.png"; sourceTree = ""; }; + 84D0034D1DB8F7FA00560583 /* camra_beauty_close@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "camra_beauty_close@2x.png"; sourceTree = ""; }; + 84D0034E1DB8F7FA00560583 /* camra_beauty_close@3x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "camra_beauty_close@3x.png"; sourceTree = ""; }; + 84D0034F1DB8F7FA00560583 /* camra_preview@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "camra_preview@2x.png"; sourceTree = ""; }; + 84D003501DB8F7FA00560583 /* camra_preview@3x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "camra_preview@3x.png"; sourceTree = ""; }; + 84D003511DB8F7FA00560583 /* close_preview@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "close_preview@2x.png"; sourceTree = ""; }; + 84D003521DB8F7FA00560583 /* close_preview@3x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "close_preview@3x.png"; sourceTree = ""; }; + 84D003531DB8F7FA00560583 /* ios-29x29.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "ios-29x29.png"; sourceTree = ""; }; + 84D003541DB8F7FA00560583 /* LFLivePreview.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LFLivePreview.h; sourceTree = ""; }; + 84D003551DB8F7FA00560583 /* LFLivePreview.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = LFLivePreview.m; sourceTree = ""; }; + 84D003631DB8F83400560583 /* libstdc++.tbd */ = {isa = PBXFileReference; lastKnownFileType = "sourcecode.text-based-dylib-definition"; name = "libstdc++.tbd"; path = "usr/lib/libstdc++.tbd"; sourceTree = SDKROOT; }; + 84D003651DB8F84000560583 /* libresolv.tbd */ = {isa = PBXFileReference; lastKnownFileType = "sourcecode.text-based-dylib-definition"; name = libresolv.tbd; path = usr/lib/libresolv.tbd; sourceTree = SDKROOT; }; + 84D003671DB8F84800560583 /* libz.tbd */ = {isa = PBXFileReference; lastKnownFileType = "sourcecode.text-based-dylib-definition"; name = libz.tbd; path = usr/lib/libz.tbd; sourceTree = SDKROOT; }; + 84D003691DB8F85E00560583 /* VideoToolbox.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = VideoToolbox.framework; path = System/Library/Frameworks/VideoToolbox.framework; sourceTree = SDKROOT; }; + 84D0036B1DB8F86700560583 /* AudioToolbox.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AudioToolbox.framework; path = System/Library/Frameworks/AudioToolbox.framework; sourceTree = SDKROOT; }; + 84D0036D1DB8F86D00560583 /* AVFoundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AVFoundation.framework; path = System/Library/Frameworks/AVFoundation.framework; sourceTree = SDKROOT; }; + 84D003701DB8F8BD00560583 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; }; + 84D003721DB8F8C200560583 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 8495F6A81DB8F37300542124 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 84D003731DB8F8C200560583 /* Foundation.framework in Frameworks */, + 84D003711DB8F8BD00560583 /* UIKit.framework in Frameworks */, + 84D0036E1DB8F86D00560583 /* AVFoundation.framework in Frameworks */, + 84D0036C1DB8F86700560583 /* AudioToolbox.framework in Frameworks */, + 84D0036A1DB8F85E00560583 /* VideoToolbox.framework in Frameworks */, + 84D003641DB8F83400560583 /* libstdc++.tbd in Frameworks */, + 8495F6D71DB8F49800542124 /* GPUImage.framework in Frameworks */, + 8495F6D81DB8F49800542124 /* pili-librtmp.framework in Frameworks */, + 8495F6D31DB8F3CD00542124 /* LFLiveKit.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 8495F6A21DB8F37300542124 = { + isa = PBXGroup; + children = ( + 8495F6C81DB8F37E00542124 /* LFLiveKit.xcodeproj */, + 8495F6AD1DB8F37300542124 /* LFLiveKitFrameworkDemo */, + 8495F6AC1DB8F37300542124 /* Products */, + 8495F6D41DB8F49800542124 /* Frameworks */, + ); + sourceTree = ""; + }; + 8495F6AC1DB8F37300542124 /* Products */ = { + isa = PBXGroup; + children = ( + 8495F6AB1DB8F37300542124 /* LFLiveKitFrameworkDemo.app */, + ); + name = Products; + sourceTree = ""; + }; + 8495F6AD1DB8F37300542124 /* LFLiveKitFrameworkDemo */ = { + isa = PBXGroup; + children = ( + 8495F6B11DB8F37300542124 /* AppDelegate.h */, + 8495F6B21DB8F37300542124 /* AppDelegate.m */, + 8495F6B41DB8F37300542124 /* FirstViewController.h */, + 8495F6B51DB8F37300542124 /* FirstViewController.m */, + 8495F6B71DB8F37300542124 /* SecondViewController.h */, + 8495F6B81DB8F37300542124 /* SecondViewController.m */, + 84D003451DB8F7FA00560583 /* category */, + 84D0034A1DB8F7FA00560583 /* images */, + 84D003541DB8F7FA00560583 /* LFLivePreview.h */, + 84D003551DB8F7FA00560583 /* LFLivePreview.m */, + 8495F6BA1DB8F37300542124 /* Main.storyboard */, + 8495F6BD1DB8F37300542124 /* Assets.xcassets */, + 8495F6BF1DB8F37300542124 /* LaunchScreen.storyboard */, + 8495F6C21DB8F37300542124 /* Info.plist */, + 8495F6AE1DB8F37300542124 /* Supporting Files */, + ); + path = LFLiveKitFrameworkDemo; + sourceTree = ""; + }; + 8495F6AE1DB8F37300542124 /* Supporting Files */ = { + isa = PBXGroup; + children = ( + 8495F6AF1DB8F37300542124 /* main.m */, + ); + name = "Supporting Files"; + sourceTree = ""; + }; + 8495F6C91DB8F37E00542124 /* Products */ = { + isa = PBXGroup; + children = ( + 8495F6CE1DB8F37E00542124 /* LFLiveKit.framework */, + 8495F6D01DB8F37E00542124 /* LFLiveKit.framework */, + ); + name = Products; + sourceTree = ""; + }; + 8495F6D41DB8F49800542124 /* Frameworks */ = { + isa = PBXGroup; + children = ( + 84D003721DB8F8C200560583 /* Foundation.framework */, + 84D003701DB8F8BD00560583 /* UIKit.framework */, + 84D0036D1DB8F86D00560583 /* AVFoundation.framework */, + 84D0036B1DB8F86700560583 /* AudioToolbox.framework */, + 84D003691DB8F85E00560583 /* VideoToolbox.framework */, + 84D003671DB8F84800560583 /* libz.tbd */, + 84D003651DB8F84000560583 /* libresolv.tbd */, + 84D003631DB8F83400560583 /* libstdc++.tbd */, + 8495F6D51DB8F49800542124 /* GPUImage.framework */, + 8495F6D61DB8F49800542124 /* pili-librtmp.framework */, + ); + name = Frameworks; + sourceTree = ""; + }; + 84D003451DB8F7FA00560583 /* category */ = { + isa = PBXGroup; + children = ( + 84D003461DB8F7FA00560583 /* UIControl+YYAdd.h */, + 84D003471DB8F7FA00560583 /* UIControl+YYAdd.m */, + 84D003481DB8F7FA00560583 /* UIView+YYAdd.h */, + 84D003491DB8F7FA00560583 /* UIView+YYAdd.m */, + ); + path = category; + sourceTree = ""; + }; + 84D0034A1DB8F7FA00560583 /* images */ = { + isa = PBXGroup; + children = ( + 84D0034B1DB8F7FA00560583 /* camra_beauty@2x.png */, + 84D0034C1DB8F7FA00560583 /* camra_beauty@3x.png */, + 84D0034D1DB8F7FA00560583 /* camra_beauty_close@2x.png */, + 84D0034E1DB8F7FA00560583 /* camra_beauty_close@3x.png */, + 84D0034F1DB8F7FA00560583 /* camra_preview@2x.png */, + 84D003501DB8F7FA00560583 /* camra_preview@3x.png */, + 84D003511DB8F7FA00560583 /* close_preview@2x.png */, + 84D003521DB8F7FA00560583 /* close_preview@3x.png */, + 84D003531DB8F7FA00560583 /* ios-29x29.png */, + ); + path = images; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 8495F6AA1DB8F37300542124 /* LFLiveKitFrameworkDemo */ = { + isa = PBXNativeTarget; + buildConfigurationList = 8495F6C51DB8F37300542124 /* Build configuration list for PBXNativeTarget "LFLiveKitFrameworkDemo" */; + buildPhases = ( + 8495F6A71DB8F37300542124 /* Sources */, + 8495F6A81DB8F37300542124 /* Frameworks */, + 8495F6A91DB8F37300542124 /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + 8495F6D21DB8F3C400542124 /* PBXTargetDependency */, + ); + name = LFLiveKitFrameworkDemo; + productName = LFLiveKitFrameworkDemo; + productReference = 8495F6AB1DB8F37300542124 /* LFLiveKitFrameworkDemo.app */; + productType = "com.apple.product-type.application"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 8495F6A31DB8F37300542124 /* Project object */ = { + isa = PBXProject; + attributes = { + LastUpgradeCheck = 0800; + ORGANIZATIONNAME = admin; + TargetAttributes = { + 8495F6AA1DB8F37300542124 = { + CreatedOnToolsVersion = 8.0; + DevelopmentTeam = G497YX6CBT; + ProvisioningStyle = Automatic; + }; + }; + }; + buildConfigurationList = 8495F6A61DB8F37300542124 /* Build configuration list for PBXProject "LFLiveKitFrameworkDemo" */; + compatibilityVersion = "Xcode 3.2"; + developmentRegion = English; + hasScannedForEncodings = 0; + knownRegions = ( + en, + Base, + ); + mainGroup = 8495F6A21DB8F37300542124; + productRefGroup = 8495F6AC1DB8F37300542124 /* Products */; + projectDirPath = ""; + projectReferences = ( + { + ProductGroup = 8495F6C91DB8F37E00542124 /* Products */; + ProjectRef = 8495F6C81DB8F37E00542124 /* LFLiveKit.xcodeproj */; + }, + ); + projectRoot = ""; + targets = ( + 8495F6AA1DB8F37300542124 /* LFLiveKitFrameworkDemo */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXReferenceProxy section */ + 8495F6CE1DB8F37E00542124 /* LFLiveKit.framework */ = { + isa = PBXReferenceProxy; + fileType = wrapper.framework; + path = LFLiveKit.framework; + remoteRef = 8495F6CD1DB8F37E00542124 /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; + 8495F6D01DB8F37E00542124 /* LFLiveKit.framework */ = { + isa = PBXReferenceProxy; + fileType = wrapper.framework; + path = LFLiveKit.framework; + remoteRef = 8495F6CF1DB8F37E00542124 /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; +/* End PBXReferenceProxy section */ + +/* Begin PBXResourcesBuildPhase section */ + 8495F6A91DB8F37300542124 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 84D0035A1DB8F7FA00560583 /* camra_beauty_close@2x.png in Resources */, + 8495F6C11DB8F37300542124 /* LaunchScreen.storyboard in Resources */, + 84D003581DB8F7FA00560583 /* camra_beauty@2x.png in Resources */, + 8495F6BE1DB8F37300542124 /* Assets.xcassets in Resources */, + 84D0035D1DB8F7FA00560583 /* camra_preview@3x.png in Resources */, + 84D0035B1DB8F7FA00560583 /* camra_beauty_close@3x.png in Resources */, + 84D003601DB8F7FA00560583 /* ios-29x29.png in Resources */, + 84D0035F1DB8F7FA00560583 /* close_preview@3x.png in Resources */, + 84D0035E1DB8F7FA00560583 /* close_preview@2x.png in Resources */, + 8495F6BC1DB8F37300542124 /* Main.storyboard in Resources */, + 84D0035C1DB8F7FA00560583 /* camra_preview@2x.png in Resources */, + 84D003591DB8F7FA00560583 /* camra_beauty@3x.png in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 8495F6A71DB8F37300542124 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 84D003561DB8F7FA00560583 /* UIControl+YYAdd.m in Sources */, + 8495F6B91DB8F37300542124 /* SecondViewController.m in Sources */, + 84D003571DB8F7FA00560583 /* UIView+YYAdd.m in Sources */, + 8495F6B31DB8F37300542124 /* AppDelegate.m in Sources */, + 84D003611DB8F7FA00560583 /* LFLivePreview.m in Sources */, + 8495F6B61DB8F37300542124 /* FirstViewController.m in Sources */, + 8495F6B01DB8F37300542124 /* main.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXTargetDependency section */ + 8495F6D21DB8F3C400542124 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + name = LFLiveKitFramework; + targetProxy = 8495F6D11DB8F3C400542124 /* PBXContainerItemProxy */; + }; +/* End PBXTargetDependency section */ + +/* Begin PBXVariantGroup section */ + 8495F6BA1DB8F37300542124 /* Main.storyboard */ = { + isa = PBXVariantGroup; + children = ( + 8495F6BB1DB8F37300542124 /* Base */, + ); + name = Main.storyboard; + sourceTree = ""; + }; + 8495F6BF1DB8F37300542124 /* LaunchScreen.storyboard */ = { + isa = PBXVariantGroup; + children = ( + 8495F6C01DB8F37300542124 /* Base */, + ); + name = LaunchScreen.storyboard; + sourceTree = ""; + }; +/* End PBXVariantGroup section */ + +/* Begin XCBuildConfiguration section */ + 8495F6C31DB8F37300542124 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_SUSPICIOUS_MOVES = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = dwarf; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_TESTABILITY = YES; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_DYNAMIC_NO_PIC = NO; + GCC_NO_COMMON_BLOCKS = YES; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + ); + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 10.0; + MTL_ENABLE_DEBUG_INFO = YES; + ONLY_ACTIVE_ARCH = YES; + SDKROOT = iphoneos; + }; + name = Debug; + }; + 8495F6C41DB8F37300542124 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_SUSPICIOUS_MOVES = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 10.0; + MTL_ENABLE_DEBUG_INFO = NO; + SDKROOT = iphoneos; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; + 8495F6C61DB8F37300542124 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + DEVELOPMENT_TEAM = G497YX6CBT; + FRAMEWORK_SEARCH_PATHS = ( + "$(inherited)", + "$(PROJECT_DIR)/vendors", + ); + HEADER_SEARCH_PATHS = "\"$(SRCROOT)/vendors\""; + INFOPLIST_FILE = LFLiveKitFrameworkDemo/Info.plist; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + OTHER_LDFLAGS = ""; + PRODUCT_BUNDLE_IDENTIFIER = com.youku.LFLiveKitFrameworkDemo; + PRODUCT_NAME = "$(TARGET_NAME)"; + }; + name = Debug; + }; + 8495F6C71DB8F37300542124 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + DEVELOPMENT_TEAM = G497YX6CBT; + FRAMEWORK_SEARCH_PATHS = ( + "$(inherited)", + "$(PROJECT_DIR)/vendors", + ); + HEADER_SEARCH_PATHS = "\"$(SRCROOT)/vendors\""; + INFOPLIST_FILE = LFLiveKitFrameworkDemo/Info.plist; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + OTHER_LDFLAGS = ""; + PRODUCT_BUNDLE_IDENTIFIER = com.youku.LFLiveKitFrameworkDemo; + PRODUCT_NAME = "$(TARGET_NAME)"; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 8495F6A61DB8F37300542124 /* Build configuration list for PBXProject "LFLiveKitFrameworkDemo" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 8495F6C31DB8F37300542124 /* Debug */, + 8495F6C41DB8F37300542124 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 8495F6C51DB8F37300542124 /* Build configuration list for PBXNativeTarget "LFLiveKitFrameworkDemo" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 8495F6C61DB8F37300542124 /* Debug */, + 8495F6C71DB8F37300542124 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = 8495F6A31DB8F37300542124 /* Project object */; +} diff --git a/samples/LFLiveKitFrameworkDemo/LFLiveKitFrameworkDemo/AppDelegate.h b/samples/LFLiveKitFrameworkDemo/LFLiveKitFrameworkDemo/AppDelegate.h new file mode 100644 index 00000000..caa92516 --- /dev/null +++ b/samples/LFLiveKitFrameworkDemo/LFLiveKitFrameworkDemo/AppDelegate.h @@ -0,0 +1,17 @@ +// +// AppDelegate.h +// LFLiveKitFrameworkDemo +// +// Created by admin on 2016/10/20. +// Copyright © 2016年 admin. All rights reserved. +// + +#import + +@interface AppDelegate : UIResponder + +@property (strong, nonatomic) UIWindow *window; + + +@end + diff --git a/samples/LFLiveKitFrameworkDemo/LFLiveKitFrameworkDemo/AppDelegate.m b/samples/LFLiveKitFrameworkDemo/LFLiveKitFrameworkDemo/AppDelegate.m new file mode 100644 index 00000000..eb453b9c --- /dev/null +++ b/samples/LFLiveKitFrameworkDemo/LFLiveKitFrameworkDemo/AppDelegate.m @@ -0,0 +1,51 @@ +// +// AppDelegate.m +// LFLiveKitFrameworkDemo +// +// Created by admin on 2016/10/20. +// Copyright © 2016年 admin. All rights reserved. +// + +#import "AppDelegate.h" + +@interface AppDelegate () + +@end + +@implementation AppDelegate + + +- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { + // Override point for customization after application launch. + return YES; +} + + +- (void)applicationWillResignActive:(UIApplication *)application { + // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state. + // Use this method to pause ongoing tasks, disable timers, and invalidate graphics rendering callbacks. Games should use this method to pause the game. +} + + +- (void)applicationDidEnterBackground:(UIApplication *)application { + // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later. + // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. +} + + +- (void)applicationWillEnterForeground:(UIApplication *)application { + // Called as part of the transition from the background to the active state; here you can undo many of the changes made on entering the background. +} + + +- (void)applicationDidBecomeActive:(UIApplication *)application { + // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface. +} + + +- (void)applicationWillTerminate:(UIApplication *)application { + // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. +} + + +@end diff --git a/LFLiveKitSwiftDemo/LFLiveKitSwiftDemo/Assets.xcassets/AppIcon.appiconset/Contents.json b/samples/LFLiveKitFrameworkDemo/LFLiveKitFrameworkDemo/Assets.xcassets/AppIcon.appiconset/Contents.json similarity index 100% rename from LFLiveKitSwiftDemo/LFLiveKitSwiftDemo/Assets.xcassets/AppIcon.appiconset/Contents.json rename to samples/LFLiveKitFrameworkDemo/LFLiveKitFrameworkDemo/Assets.xcassets/AppIcon.appiconset/Contents.json diff --git a/samples/LFLiveKitFrameworkDemo/LFLiveKitFrameworkDemo/Assets.xcassets/first.imageset/Contents.json b/samples/LFLiveKitFrameworkDemo/LFLiveKitFrameworkDemo/Assets.xcassets/first.imageset/Contents.json new file mode 100644 index 00000000..33a74510 --- /dev/null +++ b/samples/LFLiveKitFrameworkDemo/LFLiveKitFrameworkDemo/Assets.xcassets/first.imageset/Contents.json @@ -0,0 +1,12 @@ +{ + "images" : [ + { + "idiom" : "universal", + "filename" : "first.pdf" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/samples/LFLiveKitFrameworkDemo/LFLiveKitFrameworkDemo/Assets.xcassets/first.imageset/first.pdf b/samples/LFLiveKitFrameworkDemo/LFLiveKitFrameworkDemo/Assets.xcassets/first.imageset/first.pdf new file mode 100644 index 00000000..47d911de Binary files /dev/null and b/samples/LFLiveKitFrameworkDemo/LFLiveKitFrameworkDemo/Assets.xcassets/first.imageset/first.pdf differ diff --git a/samples/LFLiveKitFrameworkDemo/LFLiveKitFrameworkDemo/Assets.xcassets/second.imageset/Contents.json b/samples/LFLiveKitFrameworkDemo/LFLiveKitFrameworkDemo/Assets.xcassets/second.imageset/Contents.json new file mode 100644 index 00000000..03bd9c92 --- /dev/null +++ b/samples/LFLiveKitFrameworkDemo/LFLiveKitFrameworkDemo/Assets.xcassets/second.imageset/Contents.json @@ -0,0 +1,12 @@ +{ + "images" : [ + { + "idiom" : "universal", + "filename" : "second.pdf" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/samples/LFLiveKitFrameworkDemo/LFLiveKitFrameworkDemo/Assets.xcassets/second.imageset/second.pdf b/samples/LFLiveKitFrameworkDemo/LFLiveKitFrameworkDemo/Assets.xcassets/second.imageset/second.pdf new file mode 100644 index 00000000..401614e2 Binary files /dev/null and b/samples/LFLiveKitFrameworkDemo/LFLiveKitFrameworkDemo/Assets.xcassets/second.imageset/second.pdf differ diff --git a/samples/LFLiveKitFrameworkDemo/LFLiveKitFrameworkDemo/Base.lproj/LaunchScreen.storyboard b/samples/LFLiveKitFrameworkDemo/LFLiveKitFrameworkDemo/Base.lproj/LaunchScreen.storyboard new file mode 100644 index 00000000..fdf3f97d --- /dev/null +++ b/samples/LFLiveKitFrameworkDemo/LFLiveKitFrameworkDemo/Base.lproj/LaunchScreen.storyboard @@ -0,0 +1,27 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/samples/LFLiveKitFrameworkDemo/LFLiveKitFrameworkDemo/Base.lproj/Main.storyboard b/samples/LFLiveKitFrameworkDemo/LFLiveKitFrameworkDemo/Base.lproj/Main.storyboard new file mode 100644 index 00000000..3f958ee8 --- /dev/null +++ b/samples/LFLiveKitFrameworkDemo/LFLiveKitFrameworkDemo/Base.lproj/Main.storyboard @@ -0,0 +1,108 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/samples/LFLiveKitFrameworkDemo/LFLiveKitFrameworkDemo/FirstViewController.h b/samples/LFLiveKitFrameworkDemo/LFLiveKitFrameworkDemo/FirstViewController.h new file mode 100644 index 00000000..4ebdd850 --- /dev/null +++ b/samples/LFLiveKitFrameworkDemo/LFLiveKitFrameworkDemo/FirstViewController.h @@ -0,0 +1,15 @@ +// +// FirstViewController.h +// LFLiveKitFrameworkDemo +// +// Created by admin on 2016/10/20. +// Copyright © 2016年 admin. All rights reserved. +// + +#import + +@interface FirstViewController : UIViewController + + +@end + diff --git a/samples/LFLiveKitFrameworkDemo/LFLiveKitFrameworkDemo/FirstViewController.m b/samples/LFLiveKitFrameworkDemo/LFLiveKitFrameworkDemo/FirstViewController.m new file mode 100644 index 00000000..c0eb0ea2 --- /dev/null +++ b/samples/LFLiveKitFrameworkDemo/LFLiveKitFrameworkDemo/FirstViewController.m @@ -0,0 +1,30 @@ +// +// FirstViewController.m +// LFLiveKitFrameworkDemo +// +// Created by admin on 2016/10/20. +// Copyright © 2016年 admin. All rights reserved. +// + +#import "FirstViewController.h" +#import + +@interface FirstViewController () + +@end + +@implementation FirstViewController + +- (void)viewDidLoad { + [super viewDidLoad]; + // Do any additional setup after loading the view, typically from a nib. +} + + +- (void)didReceiveMemoryWarning { + [super didReceiveMemoryWarning]; + // Dispose of any resources that can be recreated. +} + + +@end diff --git a/samples/LFLiveKitFrameworkDemo/LFLiveKitFrameworkDemo/Info.plist b/samples/LFLiveKitFrameworkDemo/LFLiveKitFrameworkDemo/Info.plist new file mode 100644 index 00000000..a0c3d666 --- /dev/null +++ b/samples/LFLiveKitFrameworkDemo/LFLiveKitFrameworkDemo/Info.plist @@ -0,0 +1,52 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + APPL + CFBundleShortVersionString + 1.0 + CFBundleVersion + 1 + LSRequiresIPhoneOS + + UILaunchStoryboardName + LaunchScreen + UIMainStoryboardFile + Main + NSCameraUsageDescription + .. + NSMicrophoneUsageDescription + .. + UIRequiredDeviceCapabilities + + armv7 + + UIStatusBarTintParameters + + UINavigationBar + + Style + UIBarStyleDefault + Translucent + + + + UISupportedInterfaceOrientations + + UIInterfaceOrientationPortrait + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + + diff --git a/samples/LFLiveKitFrameworkDemo/LFLiveKitFrameworkDemo/LFLivePreview.h b/samples/LFLiveKitFrameworkDemo/LFLiveKitFrameworkDemo/LFLivePreview.h new file mode 100755 index 00000000..14a93625 --- /dev/null +++ b/samples/LFLiveKitFrameworkDemo/LFLiveKitFrameworkDemo/LFLivePreview.h @@ -0,0 +1,13 @@ +// +// LFLivePreview.h +// LFLiveKit +// +// Created by 倾慕 on 16/5/2. +// Copyright © 2016年 live Interactive. All rights reserved. +// + +#import + +@interface LFLivePreview : UIView + +@end diff --git a/samples/LFLiveKitFrameworkDemo/LFLiveKitFrameworkDemo/LFLivePreview.m b/samples/LFLiveKitFrameworkDemo/LFLiveKitFrameworkDemo/LFLivePreview.m new file mode 100755 index 00000000..35654838 --- /dev/null +++ b/samples/LFLiveKitFrameworkDemo/LFLiveKitFrameworkDemo/LFLivePreview.m @@ -0,0 +1,374 @@ +// +// LFLivePreview.m +// LFLiveKit +// +// Created by 倾慕 on 16/5/2. +// Copyright © 2016年 live Interactive. All rights reserved. +// + +#import "LFLivePreview.h" +#import "UIControl+YYAdd.h" +#import "UIView+YYAdd.h" +#import + +inline static NSString *formatedSpeed(float bytes, float elapsed_milli) { + if (elapsed_milli <= 0) { + return @"N/A"; + } + + if (bytes <= 0) { + return @"0 KB/s"; + } + + float bytes_per_sec = ((float)bytes) * 1000.f / elapsed_milli; + if (bytes_per_sec >= 1000 * 1000) { + return [NSString stringWithFormat:@"%.2f MB/s", ((float)bytes_per_sec) / 1000 / 1000]; + } else if (bytes_per_sec >= 1000) { + return [NSString stringWithFormat:@"%.1f KB/s", ((float)bytes_per_sec) / 1000]; + } else { + return [NSString stringWithFormat:@"%ld B/s", (long)bytes_per_sec]; + } +} + +@interface LFLivePreview () + +@property (nonatomic, strong) UIButton *beautyButton; +@property (nonatomic, strong) UIButton *cameraButton; +@property (nonatomic, strong) UIButton *closeButton; +@property (nonatomic, strong) UIButton *startLiveButton; +@property (nonatomic, strong) UIView *containerView; +@property (nonatomic, strong) LFLiveDebug *debugInfo; +@property (nonatomic, strong) LFLiveSession *session; +@property (nonatomic, strong) UILabel *stateLabel; + +@end + +@implementation LFLivePreview + +- (instancetype)initWithFrame:(CGRect)frame { + if (self = [super initWithFrame:frame]) { + self.backgroundColor = [UIColor clearColor]; + [self requestAccessForVideo]; + [self requestAccessForAudio]; + [self addSubview:self.containerView]; + [self.containerView addSubview:self.stateLabel]; + [self.containerView addSubview:self.closeButton]; + [self.containerView addSubview:self.cameraButton]; + [self.containerView addSubview:self.beautyButton]; + [self.containerView addSubview:self.startLiveButton]; + } + return self; +} + +#pragma mark -- Public Method +- (void)requestAccessForVideo { + __weak typeof(self) _self = self; + AVAuthorizationStatus status = [AVCaptureDevice authorizationStatusForMediaType:AVMediaTypeVideo]; + switch (status) { + case AVAuthorizationStatusNotDetermined: { + // 许可对话没有出现,发起授权许可 + [AVCaptureDevice requestAccessForMediaType:AVMediaTypeVideo completionHandler:^(BOOL granted) { + if (granted) { + dispatch_async(dispatch_get_main_queue(), ^{ + [_self.session setRunning:YES]; + }); + } + }]; + break; + } + case AVAuthorizationStatusAuthorized: { + // 已经开启授权,可继续 + dispatch_async(dispatch_get_main_queue(), ^{ + [_self.session setRunning:YES]; + }); + break; + } + case AVAuthorizationStatusDenied: + case AVAuthorizationStatusRestricted: + // 用户明确地拒绝授权,或者相机设备无法访问 + + break; + default: + break; + } +} + +- (void)requestAccessForAudio { + AVAuthorizationStatus status = [AVCaptureDevice authorizationStatusForMediaType:AVMediaTypeAudio]; + switch (status) { + case AVAuthorizationStatusNotDetermined: { + [AVCaptureDevice requestAccessForMediaType:AVMediaTypeAudio completionHandler:^(BOOL granted) { + }]; + break; + } + case AVAuthorizationStatusAuthorized: { + break; + } + case AVAuthorizationStatusDenied: + case AVAuthorizationStatusRestricted: + break; + default: + break; + } +} + +#pragma mark -- LFStreamingSessionDelegate +/** live status changed will callback */ +- (void)liveSession:(nullable LFLiveSession *)session liveStateDidChange:(LFLiveState)state { + NSLog(@"liveStateDidChange: %ld", state); + switch (state) { + case LFLiveReady: + _stateLabel.text = @"未连接"; + break; + case LFLivePending: + _stateLabel.text = @"连接中"; + break; + case LFLiveStart: + _stateLabel.text = @"已连接"; + break; + case LFLiveError: + _stateLabel.text = @"连接错误"; + break; + case LFLiveStop: + _stateLabel.text = @"未连接"; + break; + default: + break; + } +} + +/** live debug info callback */ +- (void)liveSession:(nullable LFLiveSession *)session debugInfo:(nullable LFLiveDebug *)debugInfo { + NSLog(@"debugInfo uploadSpeed: %@", formatedSpeed(debugInfo.currentBandwidth, debugInfo.elapsedMilli)); +} + +/** callback socket errorcode */ +- (void)liveSession:(nullable LFLiveSession *)session errorCode:(LFLiveSocketErrorCode)errorCode { + NSLog(@"errorCode: %ld", errorCode); +} + +#pragma mark -- Getter Setter +- (LFLiveSession *)session { + if (!_session) { + /** 发现大家有不会用横屏的请注意啦,横屏需要在ViewController supportedInterfaceOrientations修改方向 默认竖屏 ****/ + /** 发现大家有不会用横屏的请注意啦,横屏需要在ViewController supportedInterfaceOrientations修改方向 默认竖屏 ****/ + /** 发现大家有不会用横屏的请注意啦,横屏需要在ViewController supportedInterfaceOrientations修改方向 默认竖屏 ****/ + + + /***  默认分辨率368 * 640 音频:44.1 iphone6以上48 双声道 方向竖屏 ***/ + LFLiveVideoConfiguration *videoConfiguration = [LFLiveVideoConfiguration new]; + videoConfiguration.videoSize = CGSizeMake(360, 640); + videoConfiguration.videoBitRate = 800*1024; + videoConfiguration.videoMaxBitRate = 1000*1024; + videoConfiguration.videoMinBitRate = 500*1024; + videoConfiguration.videoFrameRate = 24; + videoConfiguration.videoMaxKeyframeInterval = 48; + videoConfiguration.outputImageOrientation = UIInterfaceOrientationPortrait; + videoConfiguration.autorotate = NO; + videoConfiguration.sessionPreset = LFCaptureSessionPreset720x1280; + _session = [[LFLiveSession alloc] initWithAudioConfiguration:[LFLiveAudioConfiguration defaultConfiguration] videoConfiguration:videoConfiguration captureType:LFLiveCaptureDefaultMask]; + + /**   自己定制单声道 */ + /* + LFLiveAudioConfiguration *audioConfiguration = [LFLiveAudioConfiguration new]; + audioConfiguration.numberOfChannels = 1; + audioConfiguration.audioBitrate = LFLiveAudioBitRate_64Kbps; + audioConfiguration.audioSampleRate = LFLiveAudioSampleRate_44100Hz; + _session = [[LFLiveSession alloc] initWithAudioConfiguration:audioConfiguration videoConfiguration:[LFLiveVideoConfiguration defaultConfiguration]]; + */ + + /**   自己定制高质量音频96K */ + /* + LFLiveAudioConfiguration *audioConfiguration = [LFLiveAudioConfiguration new]; + audioConfiguration.numberOfChannels = 2; + audioConfiguration.audioBitrate = LFLiveAudioBitRate_96Kbps; + audioConfiguration.audioSampleRate = LFLiveAudioSampleRate_44100Hz; + _session = [[LFLiveSession alloc] initWithAudioConfiguration:audioConfiguration videoConfiguration:[LFLiveVideoConfiguration defaultConfiguration]]; + */ + + /**   自己定制高质量音频96K 分辨率设置为540*960 方向竖屏 */ + + /* + LFLiveAudioConfiguration *audioConfiguration = [LFLiveAudioConfiguration new]; + audioConfiguration.numberOfChannels = 2; + audioConfiguration.audioBitrate = LFLiveAudioBitRate_96Kbps; + audioConfiguration.audioSampleRate = LFLiveAudioSampleRate_44100Hz; + + LFLiveVideoConfiguration *videoConfiguration = [LFLiveVideoConfiguration new]; + videoConfiguration.videoSize = CGSizeMake(540, 960); + videoConfiguration.videoBitRate = 800*1024; + videoConfiguration.videoMaxBitRate = 1000*1024; + videoConfiguration.videoMinBitRate = 500*1024; + videoConfiguration.videoFrameRate = 24; + videoConfiguration.videoMaxKeyframeInterval = 48; + videoConfiguration.orientation = UIInterfaceOrientationPortrait; + videoConfiguration.sessionPreset = LFCaptureSessionPreset540x960; + + _session = [[LFLiveSession alloc] initWithAudioConfiguration:audioConfiguration videoConfiguration:videoConfiguration]; + */ + + + /**   自己定制高质量音频128K 分辨率设置为720*1280 方向竖屏 */ + + /* + LFLiveAudioConfiguration *audioConfiguration = [LFLiveAudioConfiguration new]; + audioConfiguration.numberOfChannels = 2; + audioConfiguration.audioBitrate = LFLiveAudioBitRate_128Kbps; + audioConfiguration.audioSampleRate = LFLiveAudioSampleRate_44100Hz; + + LFLiveVideoConfiguration *videoConfiguration = [LFLiveVideoConfiguration new]; + videoConfiguration.videoSize = CGSizeMake(720, 1280); + videoConfiguration.videoBitRate = 800*1024; + videoConfiguration.videoMaxBitRate = 1000*1024; + videoConfiguration.videoMinBitRate = 500*1024; + videoConfiguration.videoFrameRate = 15; + videoConfiguration.videoMaxKeyframeInterval = 30; + videoConfiguration.landscape = NO; + videoConfiguration.sessionPreset = LFCaptureSessionPreset360x640; + + _session = [[LFLiveSession alloc] initWithAudioConfiguration:audioConfiguration videoConfiguration:videoConfiguration]; + */ + + + /**   自己定制高质量音频128K 分辨率设置为720*1280 方向横屏 */ + + /* + LFLiveAudioConfiguration *audioConfiguration = [LFLiveAudioConfiguration new]; + audioConfiguration.numberOfChannels = 2; + audioConfiguration.audioBitrate = LFLiveAudioBitRate_128Kbps; + audioConfiguration.audioSampleRate = LFLiveAudioSampleRate_44100Hz; + + LFLiveVideoConfiguration *videoConfiguration = [LFLiveVideoConfiguration new]; + videoConfiguration.videoSize = CGSizeMake(1280, 720); + videoConfiguration.videoBitRate = 800*1024; + videoConfiguration.videoMaxBitRate = 1000*1024; + videoConfiguration.videoMinBitRate = 500*1024; + videoConfiguration.videoFrameRate = 15; + videoConfiguration.videoMaxKeyframeInterval = 30; + videoConfiguration.landscape = YES; + videoConfiguration.sessionPreset = LFCaptureSessionPreset720x1280; + + _session = [[LFLiveSession alloc] initWithAudioConfiguration:audioConfiguration videoConfiguration:videoConfiguration]; + */ + + _session.delegate = self; + _session.showDebugInfo = NO; + _session.preView = self; + + /*本地存储*/ +// _session.saveLocalVideo = YES; +// NSString *pathToMovie = [NSHomeDirectory() stringByAppendingPathComponent:@"Documents/Movie.mp4"]; +// unlink([pathToMovie UTF8String]); // If a file already exists, AVAssetWriter won't let you record new frames, so delete the old movie +// NSURL *movieURL = [NSURL fileURLWithPath:pathToMovie]; +// _session.saveLocalVideoPath = movieURL; + + /* + UIImageView *imageView = [[UIImageView alloc] init]; + imageView.alpha = 0.8; + imageView.frame = CGRectMake(100, 100, 29, 29); + imageView.image = [UIImage imageNamed:@"ios-29x29"]; + _session.warterMarkView = imageView;*/ + + } + return _session; +} + +- (UIView *)containerView { + if (!_containerView) { + _containerView = [UIView new]; + _containerView.frame = self.bounds; + _containerView.backgroundColor = [UIColor clearColor]; + _containerView.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight; + } + return _containerView; +} + +- (UILabel *)stateLabel { + if (!_stateLabel) { + _stateLabel = [[UILabel alloc] initWithFrame:CGRectMake(20, 20, 80, 40)]; + _stateLabel.text = @"未连接"; + _stateLabel.textColor = [UIColor whiteColor]; + _stateLabel.font = [UIFont boldSystemFontOfSize:14.f]; + } + return _stateLabel; +} + +- (UIButton *)closeButton { + if (!_closeButton) { + _closeButton = [UIButton new]; + _closeButton.size = CGSizeMake(44, 44); + _closeButton.left = self.width - 10 - _closeButton.width; + _closeButton.top = 20; + [_closeButton setImage:[UIImage imageNamed:@"close_preview"] forState:UIControlStateNormal]; + _closeButton.exclusiveTouch = YES; + [_closeButton addBlockForControlEvents:UIControlEventTouchUpInside block:^(id sender) { + + }]; + } + return _closeButton; +} + +- (UIButton *)cameraButton { + if (!_cameraButton) { + _cameraButton = [UIButton new]; + _cameraButton.size = CGSizeMake(44, 44); + _cameraButton.origin = CGPointMake(_closeButton.left - 10 - _cameraButton.width, 20); + [_cameraButton setImage:[UIImage imageNamed:@"camra_preview"] forState:UIControlStateNormal]; + _cameraButton.exclusiveTouch = YES; + __weak typeof(self) _self = self; + [_cameraButton addBlockForControlEvents:UIControlEventTouchUpInside block:^(id sender) { + AVCaptureDevicePosition devicePositon = _self.session.captureDevicePosition; + _self.session.captureDevicePosition = (devicePositon == AVCaptureDevicePositionBack) ? AVCaptureDevicePositionFront : AVCaptureDevicePositionBack; + }]; + } + return _cameraButton; +} + +- (UIButton *)beautyButton { + if (!_beautyButton) { + _beautyButton = [UIButton new]; + _beautyButton.size = CGSizeMake(44, 44); + _beautyButton.origin = CGPointMake(_cameraButton.left - 10 - _beautyButton.width, 20); + [_beautyButton setImage:[UIImage imageNamed:@"camra_beauty"] forState:UIControlStateNormal]; + [_beautyButton setImage:[UIImage imageNamed:@"camra_beauty_close"] forState:UIControlStateSelected]; + _beautyButton.exclusiveTouch = YES; + __weak typeof(self) _self = self; + [_beautyButton addBlockForControlEvents:UIControlEventTouchUpInside block:^(id sender) { + _self.session.beautyFace = !_self.session.beautyFace; + _self.beautyButton.selected = !_self.session.beautyFace; + }]; + } + return _beautyButton; +} + +- (UIButton *)startLiveButton { + if (!_startLiveButton) { + _startLiveButton = [UIButton new]; + _startLiveButton.size = CGSizeMake(self.width - 60, 44); + _startLiveButton.left = 30; + _startLiveButton.bottom = self.height - 50; + _startLiveButton.layer.cornerRadius = _startLiveButton.height/2; + [_startLiveButton setTitleColor:[UIColor blackColor] forState:UIControlStateNormal]; + [_startLiveButton.titleLabel setFont:[UIFont systemFontOfSize:16]]; + [_startLiveButton setTitle:@"开始直播" forState:UIControlStateNormal]; + [_startLiveButton setBackgroundColor:[UIColor colorWithRed:50 green:32 blue:245 alpha:1]]; + _startLiveButton.exclusiveTouch = YES; + __weak typeof(self) _self = self; + [_startLiveButton addBlockForControlEvents:UIControlEventTouchUpInside block:^(id sender) { + _self.startLiveButton.selected = !_self.startLiveButton.selected; + if (_self.startLiveButton.selected) { + [_self.startLiveButton setTitle:@"结束直播" forState:UIControlStateNormal]; + LFLiveStreamInfo *stream = [LFLiveStreamInfo new]; + stream.url = @"rtmp://live.hkstv.hk.lxdns.com:1935/live/stream153"; + [_self.session startLive:stream]; + } else { + [_self.startLiveButton setTitle:@"开始直播" forState:UIControlStateNormal]; + [_self.session stopLive]; + } + }]; + } + return _startLiveButton; +} + +@end + diff --git a/samples/LFLiveKitFrameworkDemo/LFLiveKitFrameworkDemo/SecondViewController.h b/samples/LFLiveKitFrameworkDemo/LFLiveKitFrameworkDemo/SecondViewController.h new file mode 100644 index 00000000..2c36368c --- /dev/null +++ b/samples/LFLiveKitFrameworkDemo/LFLiveKitFrameworkDemo/SecondViewController.h @@ -0,0 +1,15 @@ +// +// SecondViewController.h +// LFLiveKitFrameworkDemo +// +// Created by admin on 2016/10/20. +// Copyright © 2016年 admin. All rights reserved. +// + +#import + +@interface SecondViewController : UIViewController + + +@end + diff --git a/samples/LFLiveKitFrameworkDemo/LFLiveKitFrameworkDemo/SecondViewController.m b/samples/LFLiveKitFrameworkDemo/LFLiveKitFrameworkDemo/SecondViewController.m new file mode 100644 index 00000000..70e009bc --- /dev/null +++ b/samples/LFLiveKitFrameworkDemo/LFLiveKitFrameworkDemo/SecondViewController.m @@ -0,0 +1,34 @@ +// +// SecondViewController.m +// LFLiveKitFrameworkDemo +// +// Created by admin on 2016/10/20. +// Copyright © 2016年 admin. All rights reserved. +// + +#import "SecondViewController.h" +#import "LFLivePreview.h" + +@interface SecondViewController () + +@end + +@implementation SecondViewController + +- (void)viewDidLoad { + [super viewDidLoad]; + // Do any additional setup after loading the view, typically from a nib. + [self.view addSubview:[[LFLivePreview alloc] initWithFrame:self.view.bounds]]; +} + + +- (UIInterfaceOrientationMask)supportedInterfaceOrientations { + return UIInterfaceOrientationMaskPortrait; +} + +- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation { + return YES; +} + + +@end diff --git a/samples/LFLiveKitFrameworkDemo/LFLiveKitFrameworkDemo/category/UIControl+YYAdd.h b/samples/LFLiveKitFrameworkDemo/LFLiveKitFrameworkDemo/category/UIControl+YYAdd.h new file mode 100644 index 00000000..76f9547d --- /dev/null +++ b/samples/LFLiveKitFrameworkDemo/LFLiveKitFrameworkDemo/category/UIControl+YYAdd.h @@ -0,0 +1,71 @@ +// +// UIControl+YYAdd.h +// +// +// Created by guoyaoyuan on 13-4-5. +// Copyright (c) 2013 live Interactive. All rights reserved. +// + +#import + +/** + Provides extensions for `UIControl`. + */ +@interface UIControl (YYAdd) + +/** + Removes all targets and actions for a particular event (or events) + from an internal dispatch table. + */ +- (void)removeAllTargets; + +/** + Adds or replaces a target and action for a particular event (or events) + to an internal dispatch table. + + @param target The target object—that is, the object to which the + action message is sent. If this is nil, the responder + chain is searched for an object willing to respond to the + action message. + + @param action A selector identifying an action message. It cannot be NULL. + + @param controlEvents A bitmask specifying the control events for which the + action message is sent. + */ +- (void)setTarget:(id)target action:(SEL)action forControlEvents:(UIControlEvents)controlEvents; + +/** + Adds a block for a particular event (or events) to an internal dispatch table. + It will cause a strong reference to @a block. + + @param block The block which is invoked then the action message is + sent (cannot be nil). The block is retained. + + @param controlEvents A bitmask specifying the control events for which the + action message is sent. + */ +- (void)addBlockForControlEvents:(UIControlEvents)controlEvents block:(void (^)(id sender))block; + +/** + Adds or replaces a block for a particular event (or events) to an internal + dispatch table. It will cause a strong reference to @a block. + + @param block The block which is invoked then the action message is + sent (cannot be nil). The block is retained. + + @param controlEvents A bitmask specifying the control events for which the + action message is sent. + */ +- (void)setBlockForControlEvents:(UIControlEvents)controlEvents block:(void (^)(id sender))block; + +/** + Removes all blocks for a particular event (or events) from an internal + dispatch table. + + @param controlEvents A bitmask specifying the control events for which the + action message is sent. + */ +- (void)removeAllBlocksForControlEvents:(UIControlEvents)controlEvents; + +@end diff --git a/samples/LFLiveKitFrameworkDemo/LFLiveKitFrameworkDemo/category/UIControl+YYAdd.m b/samples/LFLiveKitFrameworkDemo/LFLiveKitFrameworkDemo/category/UIControl+YYAdd.m new file mode 100644 index 00000000..f9807998 --- /dev/null +++ b/samples/LFLiveKitFrameworkDemo/LFLiveKitFrameworkDemo/category/UIControl+YYAdd.m @@ -0,0 +1,105 @@ +// +// UIControl+YYAdd.m +// +// +// Created by guoyaoyuan on 13-4-5. +// Copyright (c) 2013 live Interactive. All rights reserved. +// + +#import "UIControl+YYAdd.h" +#import + + +static const int block_key; + +@interface _LFUIControlBlockTarget : NSObject + +@property (nonatomic, copy) void (^block)(id sender); +@property (nonatomic, assign) UIControlEvents events; + +- (id)initWithBlock:(void (^)(id sender))block events:(UIControlEvents)events; +- (void)invoke:(id)sender; + +@end + +@implementation _LFUIControlBlockTarget + +- (id)initWithBlock:(void (^)(id sender))block events:(UIControlEvents)events { + self = [super init]; + if (self) { + self.block = block; + self.events = events; + } + return self; +} + +- (void)invoke:(id)sender { + if (self.block) self.block(sender); +} + +@end + + + +@implementation UIControl (LFAdd) + +- (void)removeAllTargets { + [[self allTargets] enumerateObjectsUsingBlock: ^(id object, BOOL *stop) { + [self removeTarget:object + action:NULL + forControlEvents:UIControlEventAllEvents]; + }]; +} + +- (void)setTarget:(id)target action:(SEL)action forControlEvents:(UIControlEvents)controlEvents { + NSSet *targets = [self allTargets]; + for (id currentTarget in targets) { + NSArray *actions = [self actionsForTarget:currentTarget forControlEvent:controlEvents]; + for (NSString *currentAction in actions) { + [self removeTarget:currentTarget action:NSSelectorFromString(currentAction) + forControlEvents:controlEvents]; + } + } + [self addTarget:target action:action forControlEvents:controlEvents]; +} + +- (void)addBlockForControlEvents:(UIControlEvents)controlEvents + block:(void (^)(id sender))block { + _LFUIControlBlockTarget *target = [[_LFUIControlBlockTarget alloc] + initWithBlock:block events:controlEvents]; + [self addTarget:target action:@selector(invoke:) forControlEvents:controlEvents]; + NSMutableArray *targets = [self _lf_allUIControlBlockTargets]; + [targets addObject:target]; +} + +- (void)setBlockForControlEvents:(UIControlEvents)controlEvents + block:(void (^)(id sender))block { + [self removeAllBlocksForControlEvents:controlEvents]; + [self addBlockForControlEvents:controlEvents block:block]; +} + +- (void)removeAllBlocksForControlEvents:(UIControlEvents)controlEvents { + NSMutableArray *targets = [self _lf_allUIControlBlockTargets]; + NSMutableArray *removes = [NSMutableArray array]; + [targets enumerateObjectsUsingBlock: ^(id obj, NSUInteger idx, BOOL *stop) { + _LFUIControlBlockTarget *target = (_LFUIControlBlockTarget *)obj; + if (target.events == controlEvents) { + [removes addObject:target]; + [self removeTarget:target + action:@selector(invoke:) + forControlEvents:controlEvents]; + } + }]; + [targets removeObjectsInArray:removes]; +} + +- (NSMutableArray *)_lf_allUIControlBlockTargets { + NSMutableArray *targets = objc_getAssociatedObject(self, &block_key); + if (!targets) { + targets = [NSMutableArray array]; + objc_setAssociatedObject(self, &block_key, targets, OBJC_ASSOCIATION_RETAIN_NONATOMIC); + } + return targets; +} + +@end diff --git a/samples/LFLiveKitFrameworkDemo/LFLiveKitFrameworkDemo/category/UIView+YYAdd.h b/samples/LFLiveKitFrameworkDemo/LFLiveKitFrameworkDemo/category/UIView+YYAdd.h new file mode 100644 index 00000000..8b49be66 --- /dev/null +++ b/samples/LFLiveKitFrameworkDemo/LFLiveKitFrameworkDemo/category/UIView+YYAdd.h @@ -0,0 +1,132 @@ +// +// UIView+Add.h +// +// +// Created by guoyaoyuan on 13-4-3. +// Copyright (c) 2013 live Interactive. All rights reserved. +// + +#import + +/** + Provides extensions for `UIView`. + */ +@interface UIView (YYAdd) + +/** + Create a snapshot image of the complete view hierarchy. + This method should be called in main thread. + */ +- (nullable UIImage *)snapshotImage; + +/** + Create a snapshot PDF of the complete view hierarchy. + This method should be called in main thread. + */ +- (nullable NSData *)snapshotPDF; + +/** + Shortcut to set the view.layer's shadow + + @param color Shadow Color + @param offset Shadow offset + @param radius Shadow radius + */ +- (void)setLayerShadow:(nullable UIColor*)color offset:(CGSize)offset radius:(CGFloat)radius; +/** + * 设置阴影 郭liyuan+ + */ +- (void) makeInsetShadow; +- (void) makeInsetShadowWithRadius:(float)radius Alpha:(float)alpha; +- (void) makeInsetShadowWithRadius:(float)radius Color:(nullable UIColor *)color Directions:(nullable NSArray *)directions; + +/** + Remove all subviews. + + @warning Never call this method inside your view's drawRect: method. + */ +- (void)removeAllSubviews; + +/** + Returns the view's view controller (may be nil). + */ +@property (nonatomic, readonly,nullable) UIViewController *viewController; + +@property (nonatomic) CGFloat left; ///< Shortcut for frame.origin.x. +@property (nonatomic) CGFloat top; ///< Shortcut for frame.origin.y +@property (nonatomic) CGFloat right; ///< Shortcut for frame.origin.x + frame.size.width +@property (nonatomic) CGFloat bottom; ///< Shortcut for frame.origin.y + frame.size.height +@property (nonatomic) CGFloat width; ///< Shortcut for frame.size.width. +@property (nonatomic) CGFloat height; ///< Shortcut for frame.size.height. +@property (nonatomic) CGFloat centerX; ///< Shortcut for center.x +@property (nonatomic) CGFloat centerY; ///< Shortcut for center.y +@property (nonatomic) CGPoint origin; ///< Shortcut for frame.origin. +@property (nonatomic) CGSize size; ///< Shortcut for frame.size. +@property (nonatomic, readonly) CGRect screenFrame; ///< View frame on the screen, taking into account scroll views. + +/** + Returns the visible alpha on screen, taking into account superview and window. + */ +@property (nonatomic, readonly) CGFloat visibleAlpha; + + +/** + Converts a point from the receiver's coordinate system to that of the specified view or window. + + @param point A point specified in the local coordinate system (bounds) of the receiver. + @param view The view or window into whose coordinate system point is to be converted. + If view is nil, this method instead converts to window base coordinates. + @return The point converted to the coordinate system of view. + */ +- (CGPoint)convertPoint:(CGPoint)point toViewOrWindow:(nullable UIView *)view; + +/** + Converts a point from the coordinate system of a given view or window to that of the receiver. + + @param point A point specified in the local coordinate system (bounds) of view. + @param view The view or window with point in its coordinate system. + If view is nil, this method instead converts from window base coordinates. + @return The point converted to the local coordinate system (bounds) of the receiver. + */ +- (CGPoint)convertPoint:(CGPoint)point fromViewOrWindow:(nullable UIView *)view; + +/** + Converts a rectangle from the receiver's coordinate system to that of another view or window. + + @param rect A rectangle specified in the local coordinate system (bounds) of the receiver. + @param view The view or window that is the target of the conversion operation. If view is nil, this method instead converts to window base coordinates. + @return The converted rectangle. + */ +- (CGRect)convertRect:(CGRect)rect toViewOrWindow:(nullable UIView *)view; + +/** + Converts a rectangle from the coordinate system of another view or window to that of the receiver. + + @param rect A rectangle specified in the local coordinate system (bounds) of view. + @param view The view or window with rect in its coordinate system. + If view is nil, this method instead converts from window base coordinates. + @return The converted rectangle. + */ +- (CGRect)convertRect:(CGRect)rect fromViewOrWindow:(nullable UIView *)view; + +/** + * 返回响应者链上的任意Objc + * + * @param viewControllerCls 需要返回的Obj的类名,为nil时默认返回当前控制器 + * + * @return viewController Or needCls + */ +- (nonnull id)viewControllerWithNeedViewOrViewController:(nullable Class)viewControllerCls +; + + +/// 移除所有子视图中 tableview、scrollview 的 delegate、datasource +- (void)clearScrollViewDelegate; + + +- (void)removeAllGestures; +- (void)removeAllGesturesWithSubViews; + +/// 在 block 内禁用动画 ++ (void)disableAnimationWithBlock:(nullable void (^)(void))block; +@end diff --git a/samples/LFLiveKitFrameworkDemo/LFLiveKitFrameworkDemo/category/UIView+YYAdd.m b/samples/LFLiveKitFrameworkDemo/LFLiveKitFrameworkDemo/category/UIView+YYAdd.m new file mode 100644 index 00000000..c4219033 --- /dev/null +++ b/samples/LFLiveKitFrameworkDemo/LFLiveKitFrameworkDemo/category/UIView+YYAdd.m @@ -0,0 +1,464 @@ +// +// UIView+Add.m +// +// +// Created by guoyaoyuan on 13-4-3. +// Copyright (c) 2013 live Interactive. All rights reserved. +// + +#import "UIView+YYAdd.h" +#import + +@implementation UIView (YYAdd) + +- (UIImage *)snapshotImage { + UIImage *image = nil; + if ([self respondsToSelector:@selector(drawViewHierarchyInRect:afterScreenUpdates:)]) { + UIGraphicsBeginImageContextWithOptions(self.bounds.size, YES, 0); + [self drawViewHierarchyInRect:self.bounds afterScreenUpdates:YES]; + image = UIGraphicsGetImageFromCurrentImageContext(); + UIGraphicsEndImageContext(); + }else{ + UIGraphicsBeginImageContextWithOptions(self.bounds.size, self.opaque, 0); + [self.layer renderInContext:UIGraphicsGetCurrentContext()]; + image = UIGraphicsGetImageFromCurrentImageContext(); + UIGraphicsEndImageContext(); + + } + return image; +} + +- (NSData *)snapshotPDF { + CGRect bounds = self.bounds; + NSMutableData* data = [NSMutableData data]; + CGDataConsumerRef consumer = CGDataConsumerCreateWithCFData((__bridge CFMutableDataRef)data); + CGContextRef context = CGPDFContextCreate(consumer, &bounds, NULL); + CGDataConsumerRelease(consumer); + if (!context) return nil; + CGPDFContextBeginPage(context, NULL); + CGContextTranslateCTM(context, 0, bounds.size.height); + CGContextScaleCTM(context, 1.0, -1.0); + [self.layer renderInContext:context]; + CGPDFContextEndPage(context); + CGPDFContextClose(context); + CGContextRelease(context); + return data; +} + +- (void)setLayerShadow:(UIColor*)color offset:(CGSize)offset radius:(CGFloat)radius { + self.layer.shadowColor = color.CGColor; + self.layer.shadowOffset = offset; + self.layer.shadowRadius = radius; + self.layer.shadowOpacity = 1; + self.layer.shouldRasterize = YES; + self.layer.rasterizationScale = [UIScreen mainScreen].scale; +} + + +#define kShadowViewTag 2132 +#define kValidDirections [NSArray arrayWithObjects: @"top", @"bottom", @"left", @"right",nil] + +- (void) makeInsetShadow +{ + NSArray *shadowDirections = [NSArray arrayWithObjects:@"top", @"bottom", @"left" , @"right" , nil]; + UIColor *color = [UIColor colorWithRed:(0.0) green:(0.0) blue:(0.0) alpha:0.5]; + + UIView *shadowView = [self createShadowViewWithRadius:3 Color:color Directions:shadowDirections]; + shadowView.tag = kShadowViewTag; + + [self addSubview:shadowView]; +} + +- (void) makeInsetShadowWithRadius:(float)radius Alpha:(float)alpha +{ + NSArray *shadowDirections = [NSArray arrayWithObjects:@"top", @"bottom", @"left" , @"right" , nil]; + UIColor *color = [UIColor colorWithRed:(0.0) green:(0.0) blue:(0.0) alpha:alpha]; + + UIView *shadowView = [self createShadowViewWithRadius:radius Color:color Directions:shadowDirections]; + shadowView.tag = kShadowViewTag; + + [self addSubview:shadowView]; +} + +- (void) makeInsetShadowWithRadius:(float)radius Color:(UIColor *)color Directions:(NSArray *)directions +{ + UIView *shadowView = [self createShadowViewWithRadius:radius Color:color Directions:directions]; + shadowView.tag = kShadowViewTag; + + [self addSubview:shadowView]; +} + +- (UIView *) createShadowViewWithRadius:(float)radius Color:(UIColor *)color Directions:(NSArray *)directions +{ + UIView *shadowView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, self.bounds.size.width, self.bounds.size.height)]; + shadowView.backgroundColor = [UIColor clearColor]; + + // Ignore duplicate direction + NSMutableDictionary *directionDict = [[NSMutableDictionary alloc] init]; + for (NSString *direction in directions) [directionDict setObject:@"1" forKey:direction]; + +// for (NSString *direction in directionDict) { +// // Ignore invalid direction +// if ([kValidDirections containsObject:direction]) +// { +// CAGradientLayer *shadow = [CAGradientLayer layer]; +// shadow.locations = @[@(0.0),@(0.5)]; +// +// if ([direction isEqualToString:@"top"]) { +// [shadow setStartPoint:CGPointMake(0.5, 0.0)]; +// [shadow setEndPoint:CGPointMake(0.5, 1.0)]; +// shadow.frame = CGRectMake(-radius, -radius, self.bounds.size.width + radius*2, radius); +// shadow.colors = [NSArray arrayWithObjects:(id)[self.backgroundColor CGColor], (id)[color CGColor], nil]; +// } +// else if ([direction isEqualToString:@"bottom"]) +// { +// [shadow setStartPoint:CGPointMake(0.5, 1.0)]; +// [shadow setEndPoint:CGPointMake(0.5, 0.0)]; +// shadow.frame = CGRectMake(-radius, self.bounds.size.height, self.bounds.size.width + radius*2, radius); +// shadow.colors = [NSArray arrayWithObjects:(id)[self.backgroundColor CGColor] ,(id)[color CGColor], nil]; +// } else if ([direction isEqualToString:@"left"]) +// { +// shadow.frame = CGRectMake(-radius, -radius, radius, self.bounds.size.height + radius*2); +// [shadow setStartPoint:CGPointMake(0.0, 0.5)]; +// [shadow setEndPoint:CGPointMake(1.0, 0.5)]; +// shadow.colors = [NSArray arrayWithObjects:(id)[self.backgroundColor CGColor],(id)[color CGColor], nil]; +// +// } else if ([direction isEqualToString:@"right"]) +// { +// shadow.frame = CGRectMake(self.bounds.size.width, -radius, radius, self.bounds.size.height + radius*2); +// [shadow setStartPoint:CGPointMake(1.0, 0.5)]; +// [shadow setEndPoint:CGPointMake(0.0, 0.5)]; +// shadow.colors = [NSArray arrayWithObjects:(id)[self.backgroundColor CGColor],(id)[color CGColor], nil]; +// } +// // 后边一个颜色要和所加视图背景颜色一样 +// +// [shadowView.layer insertSublayer:shadow atIndex:0]; +// } +// } + + for (NSString *direction in directionDict) { + // Ignore invalid direction + if ([kValidDirections containsObject:direction]) + { + CALayer *shadow = [CAGradientLayer layer]; + shadow.backgroundColor = color.CGColor; + + if ([direction isEqualToString:@"top"]) { + shadow.frame = CGRectMake(0, 0, self.bounds.size.width, radius); + } + else if ([direction isEqualToString:@"bottom"]) + { + shadow.frame = CGRectMake(0, self.bounds.size.height, self.bounds.size.width, radius); + } else if ([direction isEqualToString:@"left"]) + { + shadow.frame = CGRectMake(0, 0, radius, self.bounds.size.height ); + } else if ([direction isEqualToString:@"right"]) + { + shadow.frame = CGRectMake(self.bounds.size.width, 0, radius, self.bounds.size.height); + } + [shadowView.layer insertSublayer:shadow atIndex:0]; + } + } + + + return shadowView; +} + + + +- (void)removeAllSubviews { + while (self.subviews.count) { + [self.subviews.lastObject removeFromSuperview]; + } +} + + +- (UIViewController *)viewController { + for (UIView *view = self; view; view = view.superview) { + UIResponder *nextResponder = [view nextResponder]; + if ([nextResponder isKindOfClass:[UIViewController class]]) { + return (UIViewController *)nextResponder; + } + } + return nil; +} + +- (nonnull id)viewControllerWithNeedViewOrViewController:(nullable Class)viewControllerCls +{ + UIViewController *result = nil; + + UIWindow * window = [[UIApplication sharedApplication] keyWindow]; + if (window.windowLevel != UIWindowLevelNormal) + { + NSArray *windows = [[UIApplication sharedApplication] windows]; + for(UIWindow * tmpWin in windows) + { + if (tmpWin.windowLevel == UIWindowLevelNormal) + { + window = tmpWin; + break; + } + } + } + + UIView *frontView = self; + id nextResponse = [frontView nextResponder]; + Class cls = viewControllerCls?viewControllerCls:UIViewController.class; + while (nextResponse) { + if ([nextResponse isKindOfClass:cls]) { + result = nextResponse; + break; + } + nextResponse = [nextResponse nextResponder]; + } + if(!result) result = window.rootViewController; + + return result; +} + + +- (CGFloat)left { + return self.frame.origin.x; +} + +- (void)setLeft:(CGFloat)x { + CGRect frame = self.frame; + frame.origin.x = x; + self.frame = frame; +} + +- (CGFloat)top { + return self.frame.origin.y; +} + +- (void)setTop:(CGFloat)y { + CGRect frame = self.frame; + frame.origin.y = y; + self.frame = frame; +} + +- (CGFloat)right { + return self.frame.origin.x + self.frame.size.width; +} + +- (void)setRight:(CGFloat)right { + CGRect frame = self.frame; + frame.origin.x = right - frame.size.width; + self.frame = frame; +} + +- (CGFloat)bottom { + return self.frame.origin.y + self.frame.size.height; +} + +- (void)setBottom:(CGFloat)bottom { + CGRect frame = self.frame; + frame.origin.y = bottom - frame.size.height; + self.frame = frame; +} + +- (CGFloat)width { + return self.frame.size.width; +} + +- (void)setWidth:(CGFloat)width { + CGRect frame = self.frame; + frame.size.width = width; + self.frame = frame; +} + +- (CGFloat)height { + return self.frame.size.height; +} + +- (void)setHeight:(CGFloat)height { + CGRect frame = self.frame; + frame.size.height = height; + self.frame = frame; +} + +- (CGFloat)centerX { + return self.center.x; +} + +- (void)setCenterX:(CGFloat)centerX { + self.center = CGPointMake(centerX, self.center.y); +} + +- (CGFloat)centerY { + return self.center.y; +} + +- (void)setCenterY:(CGFloat)centerY { + self.center = CGPointMake(self.center.x, centerY); +} + +- (CGPoint)origin { + return self.frame.origin; +} + +- (void)setOrigin:(CGPoint)origin { + CGRect frame = self.frame; + frame.origin = origin; + self.frame = frame; +} + +- (CGSize)size { + return self.frame.size; +} + +- (void)setSize:(CGSize)size { + CGRect frame = self.frame; + frame.size = size; + self.frame = frame; +} + +- (CGRect)screenFrame { + CGPoint origin = CGPointZero; + for (UIView *view = self; view; view = view.superview) { + origin.x += view.left; + origin.y += view.top; + + if ([view isKindOfClass:[UIScrollView class]]) { + UIScrollView *scrollView = (UIScrollView *)view; + origin.x -= scrollView.contentOffset.x; + origin.y -= scrollView.contentOffset.y; + } + } + return CGRectMake(origin.x, origin.y, self.width, self.height); +} + + +- (CGFloat)visibleAlpha { + if ([self isKindOfClass:[UIWindow class]]) { + if (self.hidden) return 0; + return self.alpha; + } + if (!self.window) return 0; + CGFloat alpha = 1; + UIView *v = self; + while (v) { + if (v.hidden) { + alpha = 0; + break; + } + alpha *= v.alpha; + v = v.superview; + } + return alpha; +} + + + +- (CGPoint)convertPoint:(CGPoint)point toViewOrWindow:(UIView *)view { + if (!view) { + if ([self isKindOfClass:[UIWindow class]]) { + return [((UIWindow *)self) convertPoint:point toWindow:nil]; + } else { + return [self convertPoint:point toView:nil]; + } + } + + UIWindow *from = [self isKindOfClass:[UIWindow class]] ? (id)self : self.window; + UIWindow *to = [view isKindOfClass:[UIWindow class]] ? (id)view : view.window; + if ((!from || !to) || (from == to)) return [self convertPoint:point toView:view]; + point = [self convertPoint:point toView:from]; + point = [to convertPoint:point fromWindow:from]; + point = [view convertPoint:point fromView:to]; + return point; +} + +- (CGPoint)convertPoint:(CGPoint)point fromViewOrWindow:(UIView *)view { + if (!view) { + if ([self isKindOfClass:[UIWindow class]]) { + return [((UIWindow *)self) convertPoint:point fromWindow:nil]; + } else { + return [self convertPoint:point fromView:nil]; + } + } + + UIWindow *from = [view isKindOfClass:[UIWindow class]] ? (id)view : view.window; + UIWindow *to = [self isKindOfClass:[UIWindow class]] ? (id)self : self.window; + if ((!from || !to) || (from == to)) return [self convertPoint:point fromView:view]; + point = [from convertPoint:point fromView:view]; + point = [to convertPoint:point fromWindow:from]; + point = [self convertPoint:point fromView:to]; + return point; +} + +- (CGRect)convertRect:(CGRect)rect toViewOrWindow:(UIView *)view { + if (!view) { + if ([self isKindOfClass:[UIWindow class]]) { + return [((UIWindow *)self) convertRect:rect toWindow:nil]; + } else { + return [self convertRect:rect toView:nil]; + } + } + + UIWindow *from = [self isKindOfClass:[UIWindow class]] ? (id)self : self.window; + UIWindow *to = [view isKindOfClass:[UIWindow class]] ? (id)view : view.window; + if (!from || !to) return [self convertRect:rect toView:view]; + if (from == to) return [self convertRect:rect toView:view]; + rect = [self convertRect:rect toView:from]; + rect = [to convertRect:rect fromWindow:from]; + rect = [view convertRect:rect fromView:to]; + return rect; +} + +- (CGRect)convertRect:(CGRect)rect fromViewOrWindow:(UIView *)view { + if (!view) { + if ([self isKindOfClass:[UIWindow class]]) { + return [((UIWindow *)self) convertRect:rect fromWindow:nil]; + } else { + return [self convertRect:rect fromView:nil]; + } + } + + UIWindow *from = [view isKindOfClass:[UIWindow class]] ? (id)view : view.window; + UIWindow *to = [self isKindOfClass:[UIWindow class]] ? (id)self : self.window; + if ((!from || !to) || (from == to)) return [self convertRect:rect fromView:view]; + rect = [from convertRect:rect fromView:view]; + rect = [to convertRect:rect fromWindow:from]; + rect = [self convertRect:rect fromView:to]; + return rect; +} + +- (void)clearScrollViewDelegate { + if ([self isKindOfClass:[UIScrollView class]]) { + ((UIScrollView *)self).delegate = nil; + if ([self isKindOfClass:[UITableView class]]) { + ((UITableView *)self).delegate = nil; + } + } + for (UIView *sub in self.subviews) { + [sub clearScrollViewDelegate]; + } +} + +- (void)removeAllGestures { + NSArray *gs = [self.gestureRecognizers copy]; + for (UIGestureRecognizer *g in gs) { + [self removeGestureRecognizer:g]; + } +} +- (void)removeAllGesturesWithSubViews { + [self removeAllGestures]; + for (UIView *v in self.subviews) { + [v removeAllGesturesWithSubViews]; + } + [UIView animateWithDuration:0 animations:^{ + + }]; +} + ++ (void)disableAnimationWithBlock:(void (^)(void))block { + if (!block) return; + BOOL aniEnabled = [CATransaction disableActions]; + [CATransaction setDisableActions:YES]; + block(); + [CATransaction setDisableActions:aniEnabled]; +} + + + +@end diff --git a/LFLiveKitSwiftDemo/LFLiveKitSwiftDemo/images/camra_beauty@2x.png b/samples/LFLiveKitFrameworkDemo/LFLiveKitFrameworkDemo/images/camra_beauty@2x.png similarity index 100% rename from LFLiveKitSwiftDemo/LFLiveKitSwiftDemo/images/camra_beauty@2x.png rename to samples/LFLiveKitFrameworkDemo/LFLiveKitFrameworkDemo/images/camra_beauty@2x.png diff --git a/LFLiveKitSwiftDemo/LFLiveKitSwiftDemo/images/camra_beauty@3x.png b/samples/LFLiveKitFrameworkDemo/LFLiveKitFrameworkDemo/images/camra_beauty@3x.png similarity index 100% rename from LFLiveKitSwiftDemo/LFLiveKitSwiftDemo/images/camra_beauty@3x.png rename to samples/LFLiveKitFrameworkDemo/LFLiveKitFrameworkDemo/images/camra_beauty@3x.png diff --git a/LFLiveKitSwiftDemo/LFLiveKitSwiftDemo/images/camra_beauty_close@2x.png b/samples/LFLiveKitFrameworkDemo/LFLiveKitFrameworkDemo/images/camra_beauty_close@2x.png similarity index 100% rename from LFLiveKitSwiftDemo/LFLiveKitSwiftDemo/images/camra_beauty_close@2x.png rename to samples/LFLiveKitFrameworkDemo/LFLiveKitFrameworkDemo/images/camra_beauty_close@2x.png diff --git a/LFLiveKitSwiftDemo/LFLiveKitSwiftDemo/images/camra_beauty_close@3x.png b/samples/LFLiveKitFrameworkDemo/LFLiveKitFrameworkDemo/images/camra_beauty_close@3x.png similarity index 100% rename from LFLiveKitSwiftDemo/LFLiveKitSwiftDemo/images/camra_beauty_close@3x.png rename to samples/LFLiveKitFrameworkDemo/LFLiveKitFrameworkDemo/images/camra_beauty_close@3x.png diff --git a/LFLiveKitSwiftDemo/LFLiveKitSwiftDemo/images/camra_preview@2x.png b/samples/LFLiveKitFrameworkDemo/LFLiveKitFrameworkDemo/images/camra_preview@2x.png similarity index 100% rename from LFLiveKitSwiftDemo/LFLiveKitSwiftDemo/images/camra_preview@2x.png rename to samples/LFLiveKitFrameworkDemo/LFLiveKitFrameworkDemo/images/camra_preview@2x.png diff --git a/LFLiveKitSwiftDemo/LFLiveKitSwiftDemo/images/camra_preview@3x.png b/samples/LFLiveKitFrameworkDemo/LFLiveKitFrameworkDemo/images/camra_preview@3x.png similarity index 100% rename from LFLiveKitSwiftDemo/LFLiveKitSwiftDemo/images/camra_preview@3x.png rename to samples/LFLiveKitFrameworkDemo/LFLiveKitFrameworkDemo/images/camra_preview@3x.png diff --git a/LFLiveKitSwiftDemo/LFLiveKitSwiftDemo/images/close_preview@2x.png b/samples/LFLiveKitFrameworkDemo/LFLiveKitFrameworkDemo/images/close_preview@2x.png similarity index 100% rename from LFLiveKitSwiftDemo/LFLiveKitSwiftDemo/images/close_preview@2x.png rename to samples/LFLiveKitFrameworkDemo/LFLiveKitFrameworkDemo/images/close_preview@2x.png diff --git a/LFLiveKitSwiftDemo/LFLiveKitSwiftDemo/images/close_preview@3x.png b/samples/LFLiveKitFrameworkDemo/LFLiveKitFrameworkDemo/images/close_preview@3x.png similarity index 100% rename from LFLiveKitSwiftDemo/LFLiveKitSwiftDemo/images/close_preview@3x.png rename to samples/LFLiveKitFrameworkDemo/LFLiveKitFrameworkDemo/images/close_preview@3x.png diff --git a/samples/LFLiveKitFrameworkDemo/LFLiveKitFrameworkDemo/images/ios-29x29.png b/samples/LFLiveKitFrameworkDemo/LFLiveKitFrameworkDemo/images/ios-29x29.png new file mode 100644 index 00000000..03997000 Binary files /dev/null and b/samples/LFLiveKitFrameworkDemo/LFLiveKitFrameworkDemo/images/ios-29x29.png differ diff --git a/samples/LFLiveKitFrameworkDemo/LFLiveKitFrameworkDemo/main.m b/samples/LFLiveKitFrameworkDemo/LFLiveKitFrameworkDemo/main.m new file mode 100644 index 00000000..0f3c3d1f --- /dev/null +++ b/samples/LFLiveKitFrameworkDemo/LFLiveKitFrameworkDemo/main.m @@ -0,0 +1,16 @@ +// +// main.m +// LFLiveKitFrameworkDemo +// +// Created by admin on 2016/10/20. +// Copyright © 2016年 admin. All rights reserved. +// + +#import +#import "AppDelegate.h" + +int main(int argc, char * argv[]) { + @autoreleasepool { + return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); + } +} diff --git a/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/GPUImage b/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/GPUImage new file mode 100644 index 00000000..6ecbe19d Binary files /dev/null and b/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/GPUImage differ diff --git a/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GLProgram.h b/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GLProgram.h new file mode 100755 index 00000000..cd455e71 --- /dev/null +++ b/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GLProgram.h @@ -0,0 +1,42 @@ +// This is Jeff LaMarche's GLProgram OpenGL shader wrapper class from his OpenGL ES 2.0 book. +// A description of this can be found at his page on the topic: +// http://iphonedevelopment.blogspot.com/2010/11/opengl-es-20-for-ios-chapter-4.html +// I've extended this to be able to take programs as NSStrings in addition to files, for baked-in shaders + +#import + +#if TARGET_IPHONE_SIMULATOR || TARGET_OS_IPHONE +#import +#import +#else +#import +#import +#endif + +@interface GLProgram : NSObject +{ + NSMutableArray *attributes; + NSMutableArray *uniforms; + GLuint program, + vertShader, + fragShader; +} + +@property(readwrite, nonatomic) BOOL initialized; +@property(readwrite, copy, nonatomic) NSString *vertexShaderLog; +@property(readwrite, copy, nonatomic) NSString *fragmentShaderLog; +@property(readwrite, copy, nonatomic) NSString *programLog; + +- (id)initWithVertexShaderString:(NSString *)vShaderString + fragmentShaderString:(NSString *)fShaderString; +- (id)initWithVertexShaderString:(NSString *)vShaderString + fragmentShaderFilename:(NSString *)fShaderFilename; +- (id)initWithVertexShaderFilename:(NSString *)vShaderFilename + fragmentShaderFilename:(NSString *)fShaderFilename; +- (void)addAttribute:(NSString *)attributeName; +- (GLuint)attributeIndex:(NSString *)attributeName; +- (GLuint)uniformIndex:(NSString *)uniformName; +- (BOOL)link; +- (void)use; +- (void)validate; +@end diff --git a/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImage.h b/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImage.h new file mode 100755 index 00000000..3e91c29c --- /dev/null +++ b/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImage.h @@ -0,0 +1,170 @@ +#import "GLProgram.h" + +// Base classes +#import "GPUImageContext.h" +#import "GPUImageOutput.h" +#import "GPUImageView.h" +#import "GPUImageVideoCamera.h" +#import "GPUImageStillCamera.h" +#import "GPUImageMovie.h" +#import "GPUImagePicture.h" +#import "GPUImageRawDataInput.h" +#import "GPUImageRawDataOutput.h" +#import "GPUImageMovieWriter.h" +#import "GPUImageFilterPipeline.h" +#import "GPUImageTextureOutput.h" +#import "GPUImageFilterGroup.h" +#import "GPUImageTextureInput.h" +#import "GPUImageUIElement.h" +#import "GPUImageBuffer.h" +#import "GPUImageFramebuffer.h" +#import "GPUImageFramebufferCache.h" + +// Filters +#import "GPUImageFilter.h" +#import "GPUImageTwoInputFilter.h" +#import "GPUImagePixellateFilter.h" +#import "GPUImagePixellatePositionFilter.h" +#import "GPUImageSepiaFilter.h" +#import "GPUImageColorInvertFilter.h" +#import "GPUImageSaturationFilter.h" +#import "GPUImageContrastFilter.h" +#import "GPUImageExposureFilter.h" +#import "GPUImageBrightnessFilter.h" +#import "GPUImageLevelsFilter.h" +#import "GPUImageSharpenFilter.h" +#import "GPUImageGammaFilter.h" +#import "GPUImageSobelEdgeDetectionFilter.h" +#import "GPUImageSketchFilter.h" +#import "GPUImageToonFilter.h" +#import "GPUImageSmoothToonFilter.h" +#import "GPUImageMultiplyBlendFilter.h" +#import "GPUImageDissolveBlendFilter.h" +#import "GPUImageKuwaharaFilter.h" +#import "GPUImageKuwaharaRadius3Filter.h" +#import "GPUImageVignetteFilter.h" +#import "GPUImageGaussianBlurFilter.h" +#import "GPUImageGaussianBlurPositionFilter.h" +#import "GPUImageGaussianSelectiveBlurFilter.h" +#import "GPUImageOverlayBlendFilter.h" +#import "GPUImageDarkenBlendFilter.h" +#import "GPUImageLightenBlendFilter.h" +#import "GPUImageSwirlFilter.h" +#import "GPUImageSourceOverBlendFilter.h" +#import "GPUImageColorBurnBlendFilter.h" +#import "GPUImageColorDodgeBlendFilter.h" +#import "GPUImageScreenBlendFilter.h" +#import "GPUImageExclusionBlendFilter.h" +#import "GPUImageDifferenceBlendFilter.h" +#import "GPUImageSubtractBlendFilter.h" +#import "GPUImageHardLightBlendFilter.h" +#import "GPUImageSoftLightBlendFilter.h" +#import "GPUImageColorBlendFilter.h" +#import "GPUImageHueBlendFilter.h" +#import "GPUImageSaturationBlendFilter.h" +#import "GPUImageLuminosityBlendFilter.h" +#import "GPUImageCropFilter.h" +#import "GPUImageGrayscaleFilter.h" +#import "GPUImageTransformFilter.h" +#import "GPUImageChromaKeyBlendFilter.h" +#import "GPUImageHazeFilter.h" +#import "GPUImageLuminanceThresholdFilter.h" +#import "GPUImagePosterizeFilter.h" +#import "GPUImageBoxBlurFilter.h" +#import "GPUImageAdaptiveThresholdFilter.h" +#import "GPUImageSolarizeFilter.h" +#import "GPUImageUnsharpMaskFilter.h" +#import "GPUImageBulgeDistortionFilter.h" +#import "GPUImagePinchDistortionFilter.h" +#import "GPUImageCrosshatchFilter.h" +#import "GPUImageCGAColorspaceFilter.h" +#import "GPUImagePolarPixellateFilter.h" +#import "GPUImageStretchDistortionFilter.h" +#import "GPUImagePerlinNoiseFilter.h" +#import "GPUImageJFAVoronoiFilter.h" +#import "GPUImageVoronoiConsumerFilter.h" +#import "GPUImageMosaicFilter.h" +#import "GPUImageTiltShiftFilter.h" +#import "GPUImage3x3ConvolutionFilter.h" +#import "GPUImageEmbossFilter.h" +#import "GPUImageCannyEdgeDetectionFilter.h" +#import "GPUImageThresholdEdgeDetectionFilter.h" +#import "GPUImageMaskFilter.h" +#import "GPUImageHistogramFilter.h" +#import "GPUImageHistogramGenerator.h" +#import "GPUImageHistogramEqualizationFilter.h" +#import "GPUImagePrewittEdgeDetectionFilter.h" +#import "GPUImageXYDerivativeFilter.h" +#import "GPUImageHarrisCornerDetectionFilter.h" +#import "GPUImageAlphaBlendFilter.h" +#import "GPUImageNormalBlendFilter.h" +#import "GPUImageNonMaximumSuppressionFilter.h" +#import "GPUImageRGBFilter.h" +#import "GPUImageMedianFilter.h" +#import "GPUImageBilateralFilter.h" +#import "GPUImageCrosshairGenerator.h" +#import "GPUImageToneCurveFilter.h" +#import "GPUImageNobleCornerDetectionFilter.h" +#import "GPUImageShiTomasiFeatureDetectionFilter.h" +#import "GPUImageErosionFilter.h" +#import "GPUImageRGBErosionFilter.h" +#import "GPUImageDilationFilter.h" +#import "GPUImageRGBDilationFilter.h" +#import "GPUImageOpeningFilter.h" +#import "GPUImageRGBOpeningFilter.h" +#import "GPUImageClosingFilter.h" +#import "GPUImageRGBClosingFilter.h" +#import "GPUImageColorPackingFilter.h" +#import "GPUImageSphereRefractionFilter.h" +#import "GPUImageMonochromeFilter.h" +#import "GPUImageOpacityFilter.h" +#import "GPUImageHighlightShadowFilter.h" +#import "GPUImageFalseColorFilter.h" +#import "GPUImageHSBFilter.h" +#import "GPUImageHueFilter.h" +#import "GPUImageGlassSphereFilter.h" +#import "GPUImageLookupFilter.h" +#import "GPUImageAmatorkaFilter.h" +#import "GPUImageMissEtikateFilter.h" +#import "GPUImageSoftEleganceFilter.h" +#import "GPUImageAddBlendFilter.h" +#import "GPUImageDivideBlendFilter.h" +#import "GPUImagePolkaDotFilter.h" +#import "GPUImageLocalBinaryPatternFilter.h" +#import "GPUImageColorLocalBinaryPatternFilter.h" +#import "GPUImageLanczosResamplingFilter.h" +#import "GPUImageAverageColor.h" +#import "GPUImageSolidColorGenerator.h" +#import "GPUImageLuminosity.h" +#import "GPUImageAverageLuminanceThresholdFilter.h" +#import "GPUImageWhiteBalanceFilter.h" +#import "GPUImageChromaKeyFilter.h" +#import "GPUImageLowPassFilter.h" +#import "GPUImageHighPassFilter.h" +#import "GPUImageMotionDetector.h" +#import "GPUImageHalftoneFilter.h" +#import "GPUImageThresholdedNonMaximumSuppressionFilter.h" +#import "GPUImageHoughTransformLineDetector.h" +#import "GPUImageParallelCoordinateLineTransformFilter.h" +#import "GPUImageThresholdSketchFilter.h" +#import "GPUImageLineGenerator.h" +#import "GPUImageLinearBurnBlendFilter.h" +#import "GPUImageGaussianBlurPositionFilter.h" +#import "GPUImagePixellatePositionFilter.h" +#import "GPUImageTwoInputCrossTextureSamplingFilter.h" +#import "GPUImagePoissonBlendFilter.h" +#import "GPUImageMotionBlurFilter.h" +#import "GPUImageZoomBlurFilter.h" +#import "GPUImageLaplacianFilter.h" +#import "GPUImageiOSBlurFilter.h" +#import "GPUImageLuminanceRangeFilter.h" +#import "GPUImageDirectionalNonMaximumSuppressionFilter.h" +#import "GPUImageDirectionalSobelEdgeDetectionFilter.h" +#import "GPUImageSingleComponentGaussianBlurFilter.h" +#import "GPUImageThreeInputFilter.h" +#import "GPUImageFourInputFilter.h" +#import "GPUImageWeakPixelInclusionFilter.h" +#import "GPUImageColorConversion.h" +#import "GPUImageColourFASTFeatureDetector.h" +#import "GPUImageColourFASTSamplingOperation.h" + diff --git a/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImage3x3ConvolutionFilter.h b/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImage3x3ConvolutionFilter.h new file mode 100755 index 00000000..67e68def --- /dev/null +++ b/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImage3x3ConvolutionFilter.h @@ -0,0 +1,18 @@ +#import "GPUImage3x3TextureSamplingFilter.h" + +/** Runs a 3x3 convolution kernel against the image + */ +@interface GPUImage3x3ConvolutionFilter : GPUImage3x3TextureSamplingFilter +{ + GLint convolutionMatrixUniform; +} + +/** Convolution kernel to run against the image + + The convolution kernel is a 3x3 matrix of values to apply to the pixel and its 8 surrounding pixels. + The matrix is specified in row-major order, with the top left pixel being one.one and the bottom right three.three + If the values in the matrix don't add up to 1.0, the image could be brightened or darkened. + */ +@property(readwrite, nonatomic) GPUMatrix3x3 convolutionKernel; + +@end diff --git a/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImage3x3TextureSamplingFilter.h b/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImage3x3TextureSamplingFilter.h new file mode 100755 index 00000000..5599e156 --- /dev/null +++ b/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImage3x3TextureSamplingFilter.h @@ -0,0 +1,18 @@ +#import "GPUImageFilter.h" + +extern NSString *const kGPUImageNearbyTexelSamplingVertexShaderString; + +@interface GPUImage3x3TextureSamplingFilter : GPUImageFilter +{ + GLint texelWidthUniform, texelHeightUniform; + + CGFloat texelWidth, texelHeight; + BOOL hasOverriddenImageSizeFactor; +} + +// The texel width and height determines how far out to sample from this texel. By default, this is the normalized width of a pixel, but this can be overridden for different effects. +@property(readwrite, nonatomic) CGFloat texelWidth; +@property(readwrite, nonatomic) CGFloat texelHeight; + + +@end diff --git a/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageAdaptiveThresholdFilter.h b/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageAdaptiveThresholdFilter.h new file mode 100755 index 00000000..32785560 --- /dev/null +++ b/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageAdaptiveThresholdFilter.h @@ -0,0 +1,9 @@ +#import "GPUImageFilterGroup.h" + +@interface GPUImageAdaptiveThresholdFilter : GPUImageFilterGroup + +/** A multiplier for the background averaging blur radius in pixels, with a default of 4 + */ +@property(readwrite, nonatomic) CGFloat blurRadiusInPixels; + +@end diff --git a/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageAddBlendFilter.h b/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageAddBlendFilter.h new file mode 100755 index 00000000..b14c60c6 --- /dev/null +++ b/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageAddBlendFilter.h @@ -0,0 +1,5 @@ +#import "GPUImageTwoInputFilter.h" + +@interface GPUImageAddBlendFilter : GPUImageTwoInputFilter + +@end diff --git a/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageAlphaBlendFilter.h b/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageAlphaBlendFilter.h new file mode 100755 index 00000000..c4d75759 --- /dev/null +++ b/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageAlphaBlendFilter.h @@ -0,0 +1,11 @@ +#import "GPUImageTwoInputFilter.h" + +@interface GPUImageAlphaBlendFilter : GPUImageTwoInputFilter +{ + GLint mixUniform; +} + +// Mix ranges from 0.0 (only image 1) to 1.0 (only image 2), with 1.0 as the normal level +@property(readwrite, nonatomic) CGFloat mix; + +@end diff --git a/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageAmatorkaFilter.h b/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageAmatorkaFilter.h new file mode 100755 index 00000000..1dbe096d --- /dev/null +++ b/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageAmatorkaFilter.h @@ -0,0 +1,17 @@ +#import "GPUImageFilterGroup.h" + +@class GPUImagePicture; + +/** A photo filter based on Photoshop action by Amatorka + http://amatorka.deviantart.com/art/Amatorka-Action-2-121069631 + */ + +// Note: If you want to use this effect you have to add lookup_amatorka.png +// from Resources folder to your application bundle. + +@interface GPUImageAmatorkaFilter : GPUImageFilterGroup +{ + GPUImagePicture *lookupImageSource; +} + +@end diff --git a/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageAverageColor.h b/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageAverageColor.h new file mode 100755 index 00000000..e3d957d0 --- /dev/null +++ b/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageAverageColor.h @@ -0,0 +1,20 @@ +#import "GPUImageFilter.h" + +extern NSString *const kGPUImageColorAveragingVertexShaderString; + +@interface GPUImageAverageColor : GPUImageFilter +{ + GLint texelWidthUniform, texelHeightUniform; + + NSUInteger numberOfStages; + + GLubyte *rawImagePixels; + CGSize finalStageSize; +} + +// This block is called on the completion of color averaging for a frame +@property(nonatomic, copy) void(^colorAverageProcessingFinishedBlock)(CGFloat redComponent, CGFloat greenComponent, CGFloat blueComponent, CGFloat alphaComponent, CMTime frameTime); + +- (void)extractAverageColorAtFrameTime:(CMTime)frameTime; + +@end diff --git a/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageAverageLuminanceThresholdFilter.h b/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageAverageLuminanceThresholdFilter.h new file mode 100755 index 00000000..7f1ae464 --- /dev/null +++ b/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageAverageLuminanceThresholdFilter.h @@ -0,0 +1,8 @@ +#import "GPUImageFilterGroup.h" + +@interface GPUImageAverageLuminanceThresholdFilter : GPUImageFilterGroup + +// This is multiplied by the continually calculated average image luminosity to arrive at the final threshold. Default is 1.0. +@property(readwrite, nonatomic) CGFloat thresholdMultiplier; + +@end diff --git a/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageBilateralFilter.h b/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageBilateralFilter.h new file mode 100755 index 00000000..6b736ccf --- /dev/null +++ b/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageBilateralFilter.h @@ -0,0 +1,10 @@ +#import "GPUImageGaussianBlurFilter.h" + +@interface GPUImageBilateralFilter : GPUImageGaussianBlurFilter +{ + CGFloat firstDistanceNormalizationFactorUniform; + CGFloat secondDistanceNormalizationFactorUniform; +} +// A normalization factor for the distance between central color and sample color. +@property(nonatomic, readwrite) CGFloat distanceNormalizationFactor; +@end diff --git a/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageBoxBlurFilter.h b/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageBoxBlurFilter.h new file mode 100755 index 00000000..3fd880bf --- /dev/null +++ b/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageBoxBlurFilter.h @@ -0,0 +1,7 @@ +#import "GPUImageGaussianBlurFilter.h" + +/** A hardware-accelerated box blur of an image + */ +@interface GPUImageBoxBlurFilter : GPUImageGaussianBlurFilter + +@end diff --git a/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageBrightnessFilter.h b/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageBrightnessFilter.h new file mode 100755 index 00000000..046473b9 --- /dev/null +++ b/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageBrightnessFilter.h @@ -0,0 +1,11 @@ +#import "GPUImageFilter.h" + +@interface GPUImageBrightnessFilter : GPUImageFilter +{ + GLint brightnessUniform; +} + +// Brightness ranges from -1.0 to 1.0, with 0.0 as the normal level +@property(readwrite, nonatomic) CGFloat brightness; + +@end diff --git a/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageBuffer.h b/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageBuffer.h new file mode 100755 index 00000000..caf09c8d --- /dev/null +++ b/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageBuffer.h @@ -0,0 +1,10 @@ +#import "GPUImageFilter.h" + +@interface GPUImageBuffer : GPUImageFilter +{ + NSMutableArray *bufferedFramebuffers; +} + +@property(readwrite, nonatomic) NSUInteger bufferSize; + +@end diff --git a/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageBulgeDistortionFilter.h b/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageBulgeDistortionFilter.h new file mode 100755 index 00000000..d416e536 --- /dev/null +++ b/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageBulgeDistortionFilter.h @@ -0,0 +1,16 @@ +#import "GPUImageFilter.h" + +/// Creates a bulge distortion on the image +@interface GPUImageBulgeDistortionFilter : GPUImageFilter +{ + GLint aspectRatioUniform, radiusUniform, centerUniform, scaleUniform; +} + +/// The center about which to apply the distortion, with a default of (0.5, 0.5) +@property(readwrite, nonatomic) CGPoint center; +/// The radius of the distortion, ranging from 0.0 to 1.0, with a default of 0.25 +@property(readwrite, nonatomic) CGFloat radius; +/// The amount of distortion to apply, from -1.0 to 1.0, with a default of 0.5 +@property(readwrite, nonatomic) CGFloat scale; + +@end diff --git a/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageCGAColorspaceFilter.h b/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageCGAColorspaceFilter.h new file mode 100755 index 00000000..4f97804b --- /dev/null +++ b/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageCGAColorspaceFilter.h @@ -0,0 +1,5 @@ +#import "GPUImageFilter.h" + +@interface GPUImageCGAColorspaceFilter : GPUImageFilter + +@end diff --git a/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageCannyEdgeDetectionFilter.h b/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageCannyEdgeDetectionFilter.h new file mode 100755 index 00000000..53c58502 --- /dev/null +++ b/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageCannyEdgeDetectionFilter.h @@ -0,0 +1,62 @@ +#import "GPUImageFilterGroup.h" + +@class GPUImageGrayscaleFilter; +@class GPUImageSingleComponentGaussianBlurFilter; +@class GPUImageDirectionalSobelEdgeDetectionFilter; +@class GPUImageDirectionalNonMaximumSuppressionFilter; +@class GPUImageWeakPixelInclusionFilter; + +/** This applies the edge detection process described by John Canny in + + Canny, J., A Computational Approach To Edge Detection, IEEE Trans. Pattern Analysis and Machine Intelligence, 8(6):679–698, 1986. + + and implemented in OpenGL ES by + + A. Ensor, S. Hall. GPU-based Image Analysis on Mobile Devices. Proceedings of Image and Vision Computing New Zealand 2011. + + It starts with a conversion to luminance, followed by an accelerated 9-hit Gaussian blur. A Sobel operator is applied to obtain the overall + gradient strength in the blurred image, as well as the direction (in texture sampling steps) of the gradient. A non-maximum suppression filter + acts along the direction of the gradient, highlighting strong edges that pass the threshold and completely removing those that fail the lower + threshold. Finally, pixels from in-between these thresholds are either included in edges or rejected based on neighboring pixels. + */ +@interface GPUImageCannyEdgeDetectionFilter : GPUImageFilterGroup +{ + GPUImageGrayscaleFilter *luminanceFilter; + GPUImageSingleComponentGaussianBlurFilter *blurFilter; + GPUImageDirectionalSobelEdgeDetectionFilter *edgeDetectionFilter; + GPUImageDirectionalNonMaximumSuppressionFilter *nonMaximumSuppressionFilter; + GPUImageWeakPixelInclusionFilter *weakPixelInclusionFilter; +} + +/** The image width and height factors tweak the appearance of the edges. + + These parameters affect the visibility of the detected edges + + By default, they match the inverse of the filter size in pixels + */ +@property(readwrite, nonatomic) CGFloat texelWidth; +/** The image width and height factors tweak the appearance of the edges. + + These parameters affect the visibility of the detected edges + + By default, they match the inverse of the filter size in pixels + */ +@property(readwrite, nonatomic) CGFloat texelHeight; + +/** The underlying blur radius for the Gaussian blur. Default is 2.0. + */ +@property (readwrite, nonatomic) CGFloat blurRadiusInPixels; + +/** The underlying blur texel spacing multiplier. Default is 1.0. + */ +@property (readwrite, nonatomic) CGFloat blurTexelSpacingMultiplier; + +/** Any edge with a gradient magnitude above this threshold will pass and show up in the final result. + */ +@property(readwrite, nonatomic) CGFloat upperThreshold; + +/** Any edge with a gradient magnitude below this threshold will fail and be removed from the final result. + */ +@property(readwrite, nonatomic) CGFloat lowerThreshold; + +@end diff --git a/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageChromaKeyBlendFilter.h b/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageChromaKeyBlendFilter.h new file mode 100755 index 00000000..00a5aed7 --- /dev/null +++ b/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageChromaKeyBlendFilter.h @@ -0,0 +1,32 @@ +#import "GPUImageTwoInputFilter.h" + +/** Selectively replaces a color in the first image with the second image + */ +@interface GPUImageChromaKeyBlendFilter : GPUImageTwoInputFilter +{ + GLint colorToReplaceUniform, thresholdSensitivityUniform, smoothingUniform; +} + +/** The threshold sensitivity controls how similar pixels need to be colored to be replaced + + The default value is 0.3 + */ +@property(readwrite, nonatomic) CGFloat thresholdSensitivity; + +/** The degree of smoothing controls how gradually similar colors are replaced in the image + + The default value is 0.1 + */ +@property(readwrite, nonatomic) CGFloat smoothing; + +/** The color to be replaced is specified using individual red, green, and blue components (normalized to 1.0). + + The default is green: (0.0, 1.0, 0.0). + + @param redComponent Red component of color to be replaced + @param greenComponent Green component of color to be replaced + @param blueComponent Blue component of color to be replaced + */ +- (void)setColorToReplaceRed:(GLfloat)redComponent green:(GLfloat)greenComponent blue:(GLfloat)blueComponent; + +@end diff --git a/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageChromaKeyFilter.h b/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageChromaKeyFilter.h new file mode 100755 index 00000000..5ee7e498 --- /dev/null +++ b/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageChromaKeyFilter.h @@ -0,0 +1,30 @@ +#import "GPUImageFilter.h" + +@interface GPUImageChromaKeyFilter : GPUImageFilter +{ + GLint colorToReplaceUniform, thresholdSensitivityUniform, smoothingUniform; +} + +/** The threshold sensitivity controls how similar pixels need to be colored to be replaced + + The default value is 0.3 + */ +@property(readwrite, nonatomic) CGFloat thresholdSensitivity; + +/** The degree of smoothing controls how gradually similar colors are replaced in the image + + The default value is 0.1 + */ +@property(readwrite, nonatomic) CGFloat smoothing; + +/** The color to be replaced is specified using individual red, green, and blue components (normalized to 1.0). + + The default is green: (0.0, 1.0, 0.0). + + @param redComponent Red component of color to be replaced + @param greenComponent Green component of color to be replaced + @param blueComponent Blue component of color to be replaced + */ +- (void)setColorToReplaceRed:(GLfloat)redComponent green:(GLfloat)greenComponent blue:(GLfloat)blueComponent; + +@end diff --git a/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageClosingFilter.h b/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageClosingFilter.h new file mode 100755 index 00000000..61e34c41 --- /dev/null +++ b/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageClosingFilter.h @@ -0,0 +1,19 @@ +#import "GPUImageFilterGroup.h" + +@class GPUImageErosionFilter; +@class GPUImageDilationFilter; + +// A filter that first performs a dilation on the red channel of an image, followed by an erosion of the same radius. +// This helps to filter out smaller dark elements. + +@interface GPUImageClosingFilter : GPUImageFilterGroup +{ + GPUImageErosionFilter *erosionFilter; + GPUImageDilationFilter *dilationFilter; +} + +@property(readwrite, nonatomic) CGFloat verticalTexelSpacing, horizontalTexelSpacing; + +- (id)initWithRadius:(NSUInteger)radius; + +@end diff --git a/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageColorBlendFilter.h b/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageColorBlendFilter.h new file mode 100755 index 00000000..302a16c6 --- /dev/null +++ b/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageColorBlendFilter.h @@ -0,0 +1,5 @@ +#import "GPUImageTwoInputFilter.h" + +@interface GPUImageColorBlendFilter : GPUImageTwoInputFilter + +@end diff --git a/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageColorBurnBlendFilter.h b/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageColorBurnBlendFilter.h new file mode 100755 index 00000000..50ebb3f4 --- /dev/null +++ b/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageColorBurnBlendFilter.h @@ -0,0 +1,9 @@ +#import "GPUImageTwoInputFilter.h" + +/** Applies a color burn blend of two images + */ +@interface GPUImageColorBurnBlendFilter : GPUImageTwoInputFilter +{ +} + +@end diff --git a/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageColorConversion.h b/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageColorConversion.h new file mode 100755 index 00000000..02f82bf8 --- /dev/null +++ b/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageColorConversion.h @@ -0,0 +1,12 @@ +#ifndef GPUImageColorConversion_h +#define GPUImageColorConversion_h + +extern GLfloat *kColorConversion601; +extern GLfloat *kColorConversion601FullRange; +extern GLfloat *kColorConversion709; +extern NSString *const kGPUImageYUVVideoRangeConversionForRGFragmentShaderString; +extern NSString *const kGPUImageYUVFullRangeConversionForLAFragmentShaderString; +extern NSString *const kGPUImageYUVVideoRangeConversionForLAFragmentShaderString; + + +#endif /* GPUImageColorConversion_h */ diff --git a/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageColorDodgeBlendFilter.h b/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageColorDodgeBlendFilter.h new file mode 100755 index 00000000..0f541c42 --- /dev/null +++ b/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageColorDodgeBlendFilter.h @@ -0,0 +1,9 @@ +#import "GPUImageTwoInputFilter.h" + +/** Applies a color dodge blend of two images + */ +@interface GPUImageColorDodgeBlendFilter : GPUImageTwoInputFilter +{ +} + +@end diff --git a/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageColorInvertFilter.h b/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageColorInvertFilter.h new file mode 100755 index 00000000..aaeec438 --- /dev/null +++ b/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageColorInvertFilter.h @@ -0,0 +1,7 @@ +#import "GPUImageFilter.h" + +@interface GPUImageColorInvertFilter : GPUImageFilter +{ +} + +@end diff --git a/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageColorLocalBinaryPatternFilter.h b/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageColorLocalBinaryPatternFilter.h new file mode 100755 index 00000000..8b57cd7c --- /dev/null +++ b/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageColorLocalBinaryPatternFilter.h @@ -0,0 +1,5 @@ +#import "GPUImage3x3TextureSamplingFilter.h" + +@interface GPUImageColorLocalBinaryPatternFilter : GPUImage3x3TextureSamplingFilter + +@end diff --git a/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageColorMatrixFilter.h b/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageColorMatrixFilter.h new file mode 100755 index 00000000..75887276 --- /dev/null +++ b/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageColorMatrixFilter.h @@ -0,0 +1,19 @@ +#import "GPUImageFilter.h" + +/** Transforms the colors of an image by applying a matrix to them + */ +@interface GPUImageColorMatrixFilter : GPUImageFilter +{ + GLint colorMatrixUniform; + GLint intensityUniform; +} + +/** A 4x4 matrix used to transform each color in an image + */ +@property(readwrite, nonatomic) GPUMatrix4x4 colorMatrix; + +/** The degree to which the new transformed color replaces the original color for each pixel + */ +@property(readwrite, nonatomic) CGFloat intensity; + +@end diff --git a/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageColorPackingFilter.h b/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageColorPackingFilter.h new file mode 100755 index 00000000..c2edca51 --- /dev/null +++ b/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageColorPackingFilter.h @@ -0,0 +1,10 @@ +#import "GPUImageFilter.h" + +@interface GPUImageColorPackingFilter : GPUImageFilter +{ + GLint texelWidthUniform, texelHeightUniform; + + CGFloat texelWidth, texelHeight; +} + +@end diff --git a/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageColourFASTFeatureDetector.h b/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageColourFASTFeatureDetector.h new file mode 100755 index 00000000..3d51ed17 --- /dev/null +++ b/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageColourFASTFeatureDetector.h @@ -0,0 +1,21 @@ +#import "GPUImageFilterGroup.h" + +// This generates image-wide feature descriptors using the ColourFAST process, as developed and described in +// +// A. Ensor and S. Hall. ColourFAST: GPU-based feature point detection and tracking on mobile devices. 28th International Conference of Image and Vision Computing, New Zealand, 2013, p. 124-129. +// +// Seth Hall, "GPU accelerated feature algorithms for mobile devices", PhD thesis, School of Computing and Mathematical Sciences, Auckland University of Technology 2014. +// http://aut.researchgateway.ac.nz/handle/10292/7991 + +@class GPUImageColourFASTSamplingOperation; +@class GPUImageBoxBlurFilter; + +@interface GPUImageColourFASTFeatureDetector : GPUImageFilterGroup +{ + GPUImageBoxBlurFilter *blurFilter; + GPUImageColourFASTSamplingOperation *colourFASTSamplingOperation; +} +// The blur radius of the underlying box blur. The default is 3.0. +@property (readwrite, nonatomic) CGFloat blurRadiusInPixels; + +@end diff --git a/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageColourFASTSamplingOperation.h b/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageColourFASTSamplingOperation.h new file mode 100755 index 00000000..78e6ede9 --- /dev/null +++ b/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageColourFASTSamplingOperation.h @@ -0,0 +1,22 @@ +#import "GPUImageTwoInputFilter.h" + +// This is the feature extraction phase of the ColourFAST feature detector, as described in: +// +// A. Ensor and S. Hall. ColourFAST: GPU-based feature point detection and tracking on mobile devices. 28th International Conference of Image and Vision Computing, New Zealand, 2013, p. 124-129. +// +// Seth Hall, "GPU accelerated feature algorithms for mobile devices", PhD thesis, School of Computing and Mathematical Sciences, Auckland University of Technology 2014. +// http://aut.researchgateway.ac.nz/handle/10292/7991 + +@interface GPUImageColourFASTSamplingOperation : GPUImageTwoInputFilter +{ + GLint texelWidthUniform, texelHeightUniform; + + CGFloat texelWidth, texelHeight; + BOOL hasOverriddenImageSizeFactor; +} + +// The texel width and height determines how far out to sample from this texel. By default, this is the normalized width of a pixel, but this can be overridden for different effects. +@property(readwrite, nonatomic) CGFloat texelWidth; +@property(readwrite, nonatomic) CGFloat texelHeight; + +@end diff --git a/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageContext.h b/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageContext.h new file mode 100755 index 00000000..71142b88 --- /dev/null +++ b/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageContext.h @@ -0,0 +1,64 @@ +#import "GLProgram.h" +#import "GPUImageFramebuffer.h" +#import "GPUImageFramebufferCache.h" + +#define GPUImageRotationSwapsWidthAndHeight(rotation) ((rotation) == kGPUImageRotateLeft || (rotation) == kGPUImageRotateRight || (rotation) == kGPUImageRotateRightFlipVertical || (rotation) == kGPUImageRotateRightFlipHorizontal) + +typedef NS_ENUM(NSUInteger, GPUImageRotationMode) { + kGPUImageNoRotation, + kGPUImageRotateLeft, + kGPUImageRotateRight, + kGPUImageFlipVertical, + kGPUImageFlipHorizonal, + kGPUImageRotateRightFlipVertical, + kGPUImageRotateRightFlipHorizontal, + kGPUImageRotate180 +}; + +@interface GPUImageContext : NSObject + +@property(readonly, nonatomic) dispatch_queue_t contextQueue; +@property(readwrite, retain, nonatomic) GLProgram *currentShaderProgram; +@property(readonly, retain, nonatomic) EAGLContext *context; +@property(readonly) CVOpenGLESTextureCacheRef coreVideoTextureCache; +@property(readonly) GPUImageFramebufferCache *framebufferCache; + ++ (void *)contextKey; ++ (GPUImageContext *)sharedImageProcessingContext; ++ (dispatch_queue_t)sharedContextQueue; ++ (GPUImageFramebufferCache *)sharedFramebufferCache; ++ (void)useImageProcessingContext; +- (void)useAsCurrentContext; ++ (void)setActiveShaderProgram:(GLProgram *)shaderProgram; +- (void)setContextShaderProgram:(GLProgram *)shaderProgram; ++ (GLint)maximumTextureSizeForThisDevice; ++ (GLint)maximumTextureUnitsForThisDevice; ++ (GLint)maximumVaryingVectorsForThisDevice; ++ (BOOL)deviceSupportsOpenGLESExtension:(NSString *)extension; ++ (BOOL)deviceSupportsRedTextures; ++ (BOOL)deviceSupportsFramebufferReads; ++ (CGSize)sizeThatFitsWithinATextureForSize:(CGSize)inputSize; + +- (void)presentBufferForDisplay; +- (GLProgram *)programForVertexShaderString:(NSString *)vertexShaderString fragmentShaderString:(NSString *)fragmentShaderString; + +- (void)useSharegroup:(EAGLSharegroup *)sharegroup; + +// Manage fast texture upload ++ (BOOL)supportsFastTextureUpload; + +@end + +@protocol GPUImageInput +- (void)newFrameReadyAtTime:(CMTime)frameTime atIndex:(NSInteger)textureIndex; +- (void)setInputFramebuffer:(GPUImageFramebuffer *)newInputFramebuffer atIndex:(NSInteger)textureIndex; +- (NSInteger)nextAvailableTextureIndex; +- (void)setInputSize:(CGSize)newSize atIndex:(NSInteger)textureIndex; +- (void)setInputRotation:(GPUImageRotationMode)newInputRotation atIndex:(NSInteger)textureIndex; +- (CGSize)maximumOutputSize; +- (void)endProcessing; +- (BOOL)shouldIgnoreUpdatesToThisTarget; +- (BOOL)enabled; +- (BOOL)wantsMonochromeInput; +- (void)setCurrentlyReceivingMonochromeInput:(BOOL)newValue; +@end diff --git a/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageContrastFilter.h b/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageContrastFilter.h new file mode 100755 index 00000000..e09e6dc4 --- /dev/null +++ b/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageContrastFilter.h @@ -0,0 +1,14 @@ +#import "GPUImageFilter.h" + +/** Adjusts the contrast of the image + */ +@interface GPUImageContrastFilter : GPUImageFilter +{ + GLint contrastUniform; +} + +/** Contrast ranges from 0.0 to 4.0 (max contrast), with 1.0 as the normal level + */ +@property(readwrite, nonatomic) CGFloat contrast; + +@end diff --git a/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageCropFilter.h b/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageCropFilter.h new file mode 100755 index 00000000..641fb7bf --- /dev/null +++ b/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageCropFilter.h @@ -0,0 +1,14 @@ +#import "GPUImageFilter.h" + +@interface GPUImageCropFilter : GPUImageFilter +{ + GLfloat cropTextureCoordinates[8]; +} + +// The crop region is the rectangle within the image to crop. It is normalized to a coordinate space from 0.0 to 1.0, with 0.0, 0.0 being the upper left corner of the image +@property(readwrite, nonatomic) CGRect cropRegion; + +// Initialization and teardown +- (id)initWithCropRegion:(CGRect)newCropRegion; + +@end diff --git a/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageCrosshairGenerator.h b/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageCrosshairGenerator.h new file mode 100755 index 00000000..569774f5 --- /dev/null +++ b/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageCrosshairGenerator.h @@ -0,0 +1,17 @@ +#import "GPUImageFilter.h" + +@interface GPUImageCrosshairGenerator : GPUImageFilter +{ + GLint crosshairWidthUniform, crosshairColorUniform; +} + +// The width of the displayed crosshairs, in pixels. Currently this only works well for odd widths. The default is 5. +@property(readwrite, nonatomic) CGFloat crosshairWidth; + +// The color of the crosshairs is specified using individual red, green, and blue components (normalized to 1.0). The default is green: (0.0, 1.0, 0.0). +- (void)setCrosshairColorRed:(GLfloat)redComponent green:(GLfloat)greenComponent blue:(GLfloat)blueComponent; + +// Rendering +- (void)renderCrosshairsFromArray:(GLfloat *)crosshairCoordinates count:(NSUInteger)numberOfCrosshairs frameTime:(CMTime)frameTime; + +@end diff --git a/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageCrosshatchFilter.h b/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageCrosshatchFilter.h new file mode 100755 index 00000000..dab18967 --- /dev/null +++ b/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageCrosshatchFilter.h @@ -0,0 +1,13 @@ +#import "GPUImageFilter.h" + +@interface GPUImageCrosshatchFilter : GPUImageFilter +{ + GLint crossHatchSpacingUniform, lineWidthUniform; +} +// The fractional width of the image to use as the spacing for the crosshatch. The default is 0.03. +@property(readwrite, nonatomic) CGFloat crossHatchSpacing; + +// A relative width for the crosshatch lines. The default is 0.003. +@property(readwrite, nonatomic) CGFloat lineWidth; + +@end diff --git a/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageDarkenBlendFilter.h b/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageDarkenBlendFilter.h new file mode 100755 index 00000000..5dfe3405 --- /dev/null +++ b/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageDarkenBlendFilter.h @@ -0,0 +1,7 @@ +#import "GPUImageTwoInputFilter.h" + +@interface GPUImageDarkenBlendFilter : GPUImageTwoInputFilter +{ +} + +@end diff --git a/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageDifferenceBlendFilter.h b/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageDifferenceBlendFilter.h new file mode 100755 index 00000000..7c7dfc23 --- /dev/null +++ b/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageDifferenceBlendFilter.h @@ -0,0 +1,7 @@ +#import "GPUImageTwoInputFilter.h" + +@interface GPUImageDifferenceBlendFilter : GPUImageTwoInputFilter +{ +} + +@end diff --git a/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageDilationFilter.h b/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageDilationFilter.h new file mode 100755 index 00000000..59423a37 --- /dev/null +++ b/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageDilationFilter.h @@ -0,0 +1,16 @@ +#import "GPUImageTwoPassTextureSamplingFilter.h" + +// For each pixel, this sets it to the maximum value of the red channel in a rectangular neighborhood extending out dilationRadius pixels from the center. +// This extends out bright features, and is most commonly used with black-and-white thresholded images. + +extern NSString *const kGPUImageDilationRadiusOneVertexShaderString; +extern NSString *const kGPUImageDilationRadiusTwoVertexShaderString; +extern NSString *const kGPUImageDilationRadiusThreeVertexShaderString; +extern NSString *const kGPUImageDilationRadiusFourVertexShaderString; + +@interface GPUImageDilationFilter : GPUImageTwoPassTextureSamplingFilter + +// Acceptable values for dilationRadius, which sets the distance in pixels to sample out from the center, are 1, 2, 3, and 4. +- (id)initWithRadius:(NSUInteger)dilationRadius; + +@end diff --git a/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageDirectionalNonMaximumSuppressionFilter.h b/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageDirectionalNonMaximumSuppressionFilter.h new file mode 100755 index 00000000..fdffb9fb --- /dev/null +++ b/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageDirectionalNonMaximumSuppressionFilter.h @@ -0,0 +1,19 @@ +#import "GPUImageFilter.h" + +@interface GPUImageDirectionalNonMaximumSuppressionFilter : GPUImageFilter +{ + GLint texelWidthUniform, texelHeightUniform; + GLint upperThresholdUniform, lowerThresholdUniform; + + BOOL hasOverriddenImageSizeFactor; +} + +// The texel width and height determines how far out to sample from this texel. By default, this is the normalized width of a pixel, but this can be overridden for different effects. +@property(readwrite, nonatomic) CGFloat texelWidth; +@property(readwrite, nonatomic) CGFloat texelHeight; + +// These thresholds set cutoffs for the intensities that definitely get registered (upper threshold) and those that definitely don't (lower threshold) +@property(readwrite, nonatomic) CGFloat upperThreshold; +@property(readwrite, nonatomic) CGFloat lowerThreshold; + +@end diff --git a/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageDirectionalSobelEdgeDetectionFilter.h b/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageDirectionalSobelEdgeDetectionFilter.h new file mode 100755 index 00000000..cfccc897 --- /dev/null +++ b/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageDirectionalSobelEdgeDetectionFilter.h @@ -0,0 +1,5 @@ +#import "GPUImage3x3TextureSamplingFilter.h" + +@interface GPUImageDirectionalSobelEdgeDetectionFilter : GPUImage3x3TextureSamplingFilter + +@end diff --git a/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageDissolveBlendFilter.h b/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageDissolveBlendFilter.h new file mode 100755 index 00000000..b4e5720a --- /dev/null +++ b/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageDissolveBlendFilter.h @@ -0,0 +1,11 @@ +#import "GPUImageTwoInputFilter.h" + +@interface GPUImageDissolveBlendFilter : GPUImageTwoInputFilter +{ + GLint mixUniform; +} + +// Mix ranges from 0.0 (only image 1) to 1.0 (only image 2), with 0.5 (half of either) as the normal level +@property(readwrite, nonatomic) CGFloat mix; + +@end diff --git a/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageDivideBlendFilter.h b/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageDivideBlendFilter.h new file mode 100755 index 00000000..ad798e29 --- /dev/null +++ b/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageDivideBlendFilter.h @@ -0,0 +1,5 @@ +#import "GPUImageTwoInputFilter.h" + +@interface GPUImageDivideBlendFilter : GPUImageTwoInputFilter + +@end diff --git a/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageEmbossFilter.h b/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageEmbossFilter.h new file mode 100755 index 00000000..dbd21e82 --- /dev/null +++ b/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageEmbossFilter.h @@ -0,0 +1,8 @@ +#import "GPUImage3x3ConvolutionFilter.h" + +@interface GPUImageEmbossFilter : GPUImage3x3ConvolutionFilter + +// The strength of the embossing, from 0.0 to 4.0, with 1.0 as the normal level +@property(readwrite, nonatomic) CGFloat intensity; + +@end diff --git a/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageErosionFilter.h b/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageErosionFilter.h new file mode 100755 index 00000000..b311a265 --- /dev/null +++ b/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageErosionFilter.h @@ -0,0 +1,11 @@ +#import "GPUImageTwoPassTextureSamplingFilter.h" + +// For each pixel, this sets it to the minimum value of the red channel in a rectangular neighborhood extending out dilationRadius pixels from the center. +// This extends out dark features, and is most commonly used with black-and-white thresholded images. + +@interface GPUImageErosionFilter : GPUImageTwoPassTextureSamplingFilter + +// Acceptable values for erosionRadius, which sets the distance in pixels to sample out from the center, are 1, 2, 3, and 4. +- (id)initWithRadius:(NSUInteger)erosionRadius; + +@end diff --git a/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageExclusionBlendFilter.h b/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageExclusionBlendFilter.h new file mode 100755 index 00000000..f7c83f57 --- /dev/null +++ b/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageExclusionBlendFilter.h @@ -0,0 +1,7 @@ +#import "GPUImageTwoInputFilter.h" + +@interface GPUImageExclusionBlendFilter : GPUImageTwoInputFilter +{ +} + +@end diff --git a/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageExposureFilter.h b/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageExposureFilter.h new file mode 100755 index 00000000..886a052f --- /dev/null +++ b/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageExposureFilter.h @@ -0,0 +1,11 @@ +#import "GPUImageFilter.h" + +@interface GPUImageExposureFilter : GPUImageFilter +{ + GLint exposureUniform; +} + +// Exposure ranges from -10.0 to 10.0, with 0.0 as the normal level +@property(readwrite, nonatomic) CGFloat exposure; + +@end diff --git a/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageFASTCornerDetectionFilter.h b/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageFASTCornerDetectionFilter.h new file mode 100755 index 00000000..86e7cf42 --- /dev/null +++ b/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageFASTCornerDetectionFilter.h @@ -0,0 +1,33 @@ +#import "GPUImageFilterGroup.h" + +@class GPUImageGrayscaleFilter; +@class GPUImage3x3TextureSamplingFilter; +@class GPUImageNonMaximumSuppressionFilter; + +/* + An implementation of the Features from Accelerated Segment Test (FAST) feature detector as described in the following publications: + + E. Rosten and T. Drummond. Fusing points and lines for high performance tracking. IEEE International Conference on Computer Vision, 2005. + E. Rosten and T. Drummond. Machine learning for high-speed corner detection. European Conference on Computer Vision, 2006. + + For more about the FAST feature detector, see the resources here: + http://www.edwardrosten.com/work/fast.html + */ + +typedef enum { kGPUImageFAST12Contiguous, kGPUImageFAST12ContiguousNonMaximumSuppressed} GPUImageFASTDetectorType; + +@interface GPUImageFASTCornerDetectionFilter : GPUImageFilterGroup +{ + GPUImageGrayscaleFilter *luminanceReductionFilter; + GPUImage3x3TextureSamplingFilter *featureDetectionFilter; + GPUImageNonMaximumSuppressionFilter *nonMaximumSuppressionFilter; +// Generate a lookup texture based on the bit patterns + +// Step 1: convert to monochrome if necessary +// Step 2: do a lookup at each pixel based on the Bresenham circle, encode comparison in two color components +// Step 3: do non-maximum suppression of close corner points +} + +- (id)initWithFASTDetectorVariant:(GPUImageFASTDetectorType)detectorType; + +@end diff --git a/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageFalseColorFilter.h b/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageFalseColorFilter.h new file mode 100755 index 00000000..cb0b82f7 --- /dev/null +++ b/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageFalseColorFilter.h @@ -0,0 +1,15 @@ +#import "GPUImageFilter.h" + +@interface GPUImageFalseColorFilter : GPUImageFilter +{ + GLint firstColorUniform, secondColorUniform; +} + +// The first and second colors specify what colors replace the dark and light areas of the image, respectively. The defaults are (0.0, 0.0, 0.5) amd (1.0, 0.0, 0.0). +@property(readwrite, nonatomic) GPUVector4 firstColor; +@property(readwrite, nonatomic) GPUVector4 secondColor; + +- (void)setFirstColorRed:(GLfloat)redComponent green:(GLfloat)greenComponent blue:(GLfloat)blueComponent; +- (void)setSecondColorRed:(GLfloat)redComponent green:(GLfloat)greenComponent blue:(GLfloat)blueComponent; + +@end diff --git a/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageFilter.h b/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageFilter.h new file mode 100755 index 00000000..0171aa80 --- /dev/null +++ b/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageFilter.h @@ -0,0 +1,134 @@ +#import "GPUImageOutput.h" + +#define STRINGIZE(x) #x +#define STRINGIZE2(x) STRINGIZE(x) +#define SHADER_STRING(text) @ STRINGIZE2(text) + +#define GPUImageHashIdentifier # +#define GPUImageWrappedLabel(x) x +#define GPUImageEscapedHashIdentifier(a) GPUImageWrappedLabel(GPUImageHashIdentifier)a + +extern NSString *const kGPUImageVertexShaderString; +extern NSString *const kGPUImagePassthroughFragmentShaderString; + +struct GPUVector4 { + GLfloat one; + GLfloat two; + GLfloat three; + GLfloat four; +}; +typedef struct GPUVector4 GPUVector4; + +struct GPUVector3 { + GLfloat one; + GLfloat two; + GLfloat three; +}; +typedef struct GPUVector3 GPUVector3; + +struct GPUMatrix4x4 { + GPUVector4 one; + GPUVector4 two; + GPUVector4 three; + GPUVector4 four; +}; +typedef struct GPUMatrix4x4 GPUMatrix4x4; + +struct GPUMatrix3x3 { + GPUVector3 one; + GPUVector3 two; + GPUVector3 three; +}; +typedef struct GPUMatrix3x3 GPUMatrix3x3; + +/** GPUImage's base filter class + + Filters and other subsequent elements in the chain conform to the GPUImageInput protocol, which lets them take in the supplied or processed texture from the previous link in the chain and do something with it. Objects one step further down the chain are considered targets, and processing can be branched by adding multiple targets to a single output or filter. + */ +@interface GPUImageFilter : GPUImageOutput +{ + GPUImageFramebuffer *firstInputFramebuffer; + + GLProgram *filterProgram; + GLint filterPositionAttribute, filterTextureCoordinateAttribute; + GLint filterInputTextureUniform; + GLfloat backgroundColorRed, backgroundColorGreen, backgroundColorBlue, backgroundColorAlpha; + + BOOL isEndProcessing; + + CGSize currentFilterSize; + GPUImageRotationMode inputRotation; + + BOOL currentlyReceivingMonochromeInput; + + NSMutableDictionary *uniformStateRestorationBlocks; + dispatch_semaphore_t imageCaptureSemaphore; +} + +@property(readonly) CVPixelBufferRef renderTarget; +@property(readwrite, nonatomic) BOOL preventRendering; +@property(readwrite, nonatomic) BOOL currentlyReceivingMonochromeInput; + +/// @name Initialization and teardown + +/** + Initialize with vertex and fragment shaders + + You make take advantage of the SHADER_STRING macro to write your shaders in-line. + @param vertexShaderString Source code of the vertex shader to use + @param fragmentShaderString Source code of the fragment shader to use + */ +- (id)initWithVertexShaderFromString:(NSString *)vertexShaderString fragmentShaderFromString:(NSString *)fragmentShaderString; + +/** + Initialize with a fragment shader + + You may take advantage of the SHADER_STRING macro to write your shader in-line. + @param fragmentShaderString Source code of fragment shader to use + */ +- (id)initWithFragmentShaderFromString:(NSString *)fragmentShaderString; +/** + Initialize with a fragment shader + @param fragmentShaderFilename Filename of fragment shader to load + */ +- (id)initWithFragmentShaderFromFile:(NSString *)fragmentShaderFilename; +- (void)initializeAttributes; +- (void)setupFilterForSize:(CGSize)filterFrameSize; +- (CGSize)rotatedSize:(CGSize)sizeToRotate forIndex:(NSInteger)textureIndex; +- (CGPoint)rotatedPoint:(CGPoint)pointToRotate forRotation:(GPUImageRotationMode)rotation; + +/// @name Managing the display FBOs +/** Size of the frame buffer object + */ +- (CGSize)sizeOfFBO; + +/// @name Rendering ++ (const GLfloat *)textureCoordinatesForRotation:(GPUImageRotationMode)rotationMode; +- (void)renderToTextureWithVertices:(const GLfloat *)vertices textureCoordinates:(const GLfloat *)textureCoordinates; +- (void)informTargetsAboutNewFrameAtTime:(CMTime)frameTime; +- (CGSize)outputFrameSize; + +/// @name Input parameters +- (void)setBackgroundColorRed:(GLfloat)redComponent green:(GLfloat)greenComponent blue:(GLfloat)blueComponent alpha:(GLfloat)alphaComponent; +- (void)setInteger:(GLint)newInteger forUniformName:(NSString *)uniformName; +- (void)setFloat:(GLfloat)newFloat forUniformName:(NSString *)uniformName; +- (void)setSize:(CGSize)newSize forUniformName:(NSString *)uniformName; +- (void)setPoint:(CGPoint)newPoint forUniformName:(NSString *)uniformName; +- (void)setFloatVec3:(GPUVector3)newVec3 forUniformName:(NSString *)uniformName; +- (void)setFloatVec4:(GPUVector4)newVec4 forUniform:(NSString *)uniformName; +- (void)setFloatArray:(GLfloat *)array length:(GLsizei)count forUniform:(NSString*)uniformName; + +- (void)setMatrix3f:(GPUMatrix3x3)matrix forUniform:(GLint)uniform program:(GLProgram *)shaderProgram; +- (void)setMatrix4f:(GPUMatrix4x4)matrix forUniform:(GLint)uniform program:(GLProgram *)shaderProgram; +- (void)setFloat:(GLfloat)floatValue forUniform:(GLint)uniform program:(GLProgram *)shaderProgram; +- (void)setPoint:(CGPoint)pointValue forUniform:(GLint)uniform program:(GLProgram *)shaderProgram; +- (void)setSize:(CGSize)sizeValue forUniform:(GLint)uniform program:(GLProgram *)shaderProgram; +- (void)setVec3:(GPUVector3)vectorValue forUniform:(GLint)uniform program:(GLProgram *)shaderProgram; +- (void)setVec4:(GPUVector4)vectorValue forUniform:(GLint)uniform program:(GLProgram *)shaderProgram; +- (void)setFloatArray:(GLfloat *)arrayValue length:(GLsizei)arrayLength forUniform:(GLint)uniform program:(GLProgram *)shaderProgram; +- (void)setInteger:(GLint)intValue forUniform:(GLint)uniform program:(GLProgram *)shaderProgram; + +- (void)setAndExecuteUniformStateCallbackAtIndex:(GLint)uniform forProgram:(GLProgram *)shaderProgram toBlock:(dispatch_block_t)uniformStateBlock; +- (void)setUniformsForProgramAtIndex:(NSUInteger)programIndex; + +@end diff --git a/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageFilterGroup.h b/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageFilterGroup.h new file mode 100755 index 00000000..6817cdf0 --- /dev/null +++ b/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageFilterGroup.h @@ -0,0 +1,19 @@ +#import "GPUImageOutput.h" +#import "GPUImageFilter.h" + +@interface GPUImageFilterGroup : GPUImageOutput +{ + NSMutableArray *filters; + BOOL isEndProcessing; +} + +@property(readwrite, nonatomic, strong) GPUImageOutput *terminalFilter; +@property(readwrite, nonatomic, strong) NSArray *initialFilters; +@property(readwrite, nonatomic, strong) GPUImageOutput *inputFilterToIgnoreForUpdates; + +// Filter management +- (void)addFilter:(GPUImageOutput *)newFilter; +- (GPUImageOutput *)filterAtIndex:(NSUInteger)filterIndex; +- (NSUInteger)filterCount; + +@end diff --git a/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageFilterPipeline.h b/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageFilterPipeline.h new file mode 100755 index 00000000..dc2baeac --- /dev/null +++ b/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageFilterPipeline.h @@ -0,0 +1,30 @@ +#import +#import "GPUImageOutput.h" + +@interface GPUImageFilterPipeline : NSObject +{ + NSString *stringValue; +} + +@property (strong) NSMutableArray *filters; + +@property (strong) GPUImageOutput *input; +@property (strong) id output; + +- (id) initWithOrderedFilters:(NSArray*) filters input:(GPUImageOutput*)input output:(id )output; +- (id) initWithConfiguration:(NSDictionary*) configuration input:(GPUImageOutput*)input output:(id )output; +- (id) initWithConfigurationFile:(NSURL*) configuration input:(GPUImageOutput*)input output:(id )output; + +- (void) addFilter:(GPUImageOutput *)filter; +- (void) addFilter:(GPUImageOutput *)filter atIndex:(NSUInteger)insertIndex; +- (void) replaceFilterAtIndex:(NSUInteger)index withFilter:(GPUImageOutput *)filter; +- (void) replaceAllFilters:(NSArray *) newFilters; +- (void) removeFilter:(GPUImageOutput *)filter; +- (void) removeFilterAtIndex:(NSUInteger)index; +- (void) removeAllFilters; + +- (UIImage *) currentFilteredFrame; +- (UIImage *) currentFilteredFrameWithOrientation:(UIImageOrientation)imageOrientation; +- (CGImageRef) newCGImageFromCurrentFilteredFrame; + +@end diff --git a/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageFourInputFilter.h b/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageFourInputFilter.h new file mode 100755 index 00000000..3beab2df --- /dev/null +++ b/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageFourInputFilter.h @@ -0,0 +1,21 @@ +#import "GPUImageThreeInputFilter.h" + +extern NSString *const kGPUImageFourInputTextureVertexShaderString; + +@interface GPUImageFourInputFilter : GPUImageThreeInputFilter +{ + GPUImageFramebuffer *fourthInputFramebuffer; + + GLint filterFourthTextureCoordinateAttribute; + GLint filterInputTextureUniform4; + GPUImageRotationMode inputRotation4; + GLuint filterSourceTexture4; + CMTime fourthFrameTime; + + BOOL hasSetThirdTexture, hasReceivedFourthFrame, fourthFrameWasVideo; + BOOL fourthFrameCheckDisabled; +} + +- (void)disableFourthFrameCheck; + +@end diff --git a/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageFramebuffer.h b/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageFramebuffer.h new file mode 100755 index 00000000..bdb6a1f1 --- /dev/null +++ b/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageFramebuffer.h @@ -0,0 +1,59 @@ +#import + +#if TARGET_IPHONE_SIMULATOR || TARGET_OS_IPHONE +#import +#import +#import +#else +#import +#import +#endif + +#import +#import + + +typedef struct GPUTextureOptions { + GLenum minFilter; + GLenum magFilter; + GLenum wrapS; + GLenum wrapT; + GLenum internalFormat; + GLenum format; + GLenum type; +} GPUTextureOptions; + +@interface GPUImageFramebuffer : NSObject + +@property(readonly) CGSize size; +@property(readonly) GPUTextureOptions textureOptions; +@property(readonly) GLuint texture; +@property(readonly) BOOL missingFramebuffer; + +// Initialization and teardown +- (id)initWithSize:(CGSize)framebufferSize; +- (id)initWithSize:(CGSize)framebufferSize textureOptions:(GPUTextureOptions)fboTextureOptions onlyTexture:(BOOL)onlyGenerateTexture; +- (id)initWithSize:(CGSize)framebufferSize overriddenTexture:(GLuint)inputTexture; + +// Usage +- (void)activateFramebuffer; + +// Reference counting +- (void)lock; +- (void)unlock; +- (void)clearAllLocks; +- (void)disableReferenceCounting; +- (void)enableReferenceCounting; + +// Image capture +- (CGImageRef)newCGImageFromFramebufferContents; +- (void)restoreRenderTarget; + +// Raw data bytes +- (void)lockForReading; +- (void)unlockAfterReading; +- (NSUInteger)bytesPerRow; +- (GLubyte *)byteBuffer; +- (CVPixelBufferRef)pixelBuffer; + +@end diff --git a/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageFramebufferCache.h b/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageFramebufferCache.h new file mode 100755 index 00000000..e56a3456 --- /dev/null +++ b/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageFramebufferCache.h @@ -0,0 +1,15 @@ +#import +#import +#import "GPUImageFramebuffer.h" + +@interface GPUImageFramebufferCache : NSObject + +// Framebuffer management +- (GPUImageFramebuffer *)fetchFramebufferForSize:(CGSize)framebufferSize textureOptions:(GPUTextureOptions)textureOptions onlyTexture:(BOOL)onlyTexture; +- (GPUImageFramebuffer *)fetchFramebufferForSize:(CGSize)framebufferSize onlyTexture:(BOOL)onlyTexture; +- (void)returnFramebufferToCache:(GPUImageFramebuffer *)framebuffer; +- (void)purgeAllUnassignedFramebuffers; +- (void)addFramebufferToActiveImageCaptureList:(GPUImageFramebuffer *)framebuffer; +- (void)removeFramebufferFromActiveImageCaptureList:(GPUImageFramebuffer *)framebuffer; + +@end diff --git a/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageFramework.h b/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageFramework.h new file mode 100755 index 00000000..3de78bf4 --- /dev/null +++ b/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageFramework.h @@ -0,0 +1,177 @@ +#import + +//! Project version number for GPUImageFramework. +FOUNDATION_EXPORT double GPUImageFrameworkVersionNumber; + +//! Project version string for GPUImageFramework. +FOUNDATION_EXPORT const unsigned char GPUImageFrameworkVersionString[]; + +#import + +// Base classes +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import + +// Filters +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import diff --git a/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageGammaFilter.h b/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageGammaFilter.h new file mode 100755 index 00000000..0521d089 --- /dev/null +++ b/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageGammaFilter.h @@ -0,0 +1,11 @@ +#import "GPUImageFilter.h" + +@interface GPUImageGammaFilter : GPUImageFilter +{ + GLint gammaUniform; +} + +// Gamma ranges from 0.0 to 3.0, with 1.0 as the normal level +@property(readwrite, nonatomic) CGFloat gamma; + +@end diff --git a/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageGaussianBlurFilter.h b/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageGaussianBlurFilter.h new file mode 100755 index 00000000..1fb7a137 --- /dev/null +++ b/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageGaussianBlurFilter.h @@ -0,0 +1,36 @@ +#import "GPUImageTwoPassTextureSamplingFilter.h" + +/** A Gaussian blur filter + Interpolated optimization based on Daniel Rákos' work at http://rastergrid.com/blog/2010/09/efficient-gaussian-blur-with-linear-sampling/ + */ + +@interface GPUImageGaussianBlurFilter : GPUImageTwoPassTextureSamplingFilter +{ + BOOL shouldResizeBlurRadiusWithImageSize; + CGFloat _blurRadiusInPixels; +} + +/** A multiplier for the spacing between texels, ranging from 0.0 on up, with a default of 1.0. Adjusting this may slightly increase the blur strength, but will introduce artifacts in the result. + */ +@property (readwrite, nonatomic) CGFloat texelSpacingMultiplier; + +/** A radius in pixels to use for the blur, with a default of 2.0. This adjusts the sigma variable in the Gaussian distribution function. + */ +@property (readwrite, nonatomic) CGFloat blurRadiusInPixels; + +/** Setting these properties will allow the blur radius to scale with the size of the image. These properties are mutually exclusive; setting either will set the other to 0. + */ +@property (readwrite, nonatomic) CGFloat blurRadiusAsFractionOfImageWidth; +@property (readwrite, nonatomic) CGFloat blurRadiusAsFractionOfImageHeight; + +/// The number of times to sequentially blur the incoming image. The more passes, the slower the filter. +@property(readwrite, nonatomic) NSUInteger blurPasses; + ++ (NSString *)vertexShaderForStandardBlurOfRadius:(NSUInteger)blurRadius sigma:(CGFloat)sigma; ++ (NSString *)fragmentShaderForStandardBlurOfRadius:(NSUInteger)blurRadius sigma:(CGFloat)sigma; ++ (NSString *)vertexShaderForOptimizedBlurOfRadius:(NSUInteger)blurRadius sigma:(CGFloat)sigma; ++ (NSString *)fragmentShaderForOptimizedBlurOfRadius:(NSUInteger)blurRadius sigma:(CGFloat)sigma; + +- (void)switchToVertexShader:(NSString *)newVertexShader fragmentShader:(NSString *)newFragmentShader; + +@end diff --git a/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageGaussianBlurPositionFilter.h b/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageGaussianBlurPositionFilter.h new file mode 100755 index 00000000..dc88a563 --- /dev/null +++ b/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageGaussianBlurPositionFilter.h @@ -0,0 +1,22 @@ +#import "GPUImageTwoPassTextureSamplingFilter.h" + +/** A more generalized 9x9 Gaussian blur filter + */ +@interface GPUImageGaussianBlurPositionFilter : GPUImageTwoPassTextureSamplingFilter +{ + GLint blurCenterUniform, blurRadiusUniform, aspectRatioUniform; +} + +/** A multiplier for the blur size, ranging from 0.0 on up, with a default of 1.0 + */ +@property (readwrite, nonatomic) CGFloat blurSize; + +/** Center for the blur, defaults to 0.5, 0.5 + */ +@property (readwrite, nonatomic) CGPoint blurCenter; + +/** Radius for the blur, defaults to 1.0 + */ +@property (readwrite, nonatomic) CGFloat blurRadius; + +@end diff --git a/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageGaussianSelectiveBlurFilter.h b/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageGaussianSelectiveBlurFilter.h new file mode 100755 index 00000000..02324566 --- /dev/null +++ b/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageGaussianSelectiveBlurFilter.h @@ -0,0 +1,30 @@ +#import "GPUImageFilterGroup.h" + +@class GPUImageGaussianBlurFilter; + +/** A Gaussian blur that preserves focus within a circular region + */ +@interface GPUImageGaussianSelectiveBlurFilter : GPUImageFilterGroup +{ + GPUImageGaussianBlurFilter *blurFilter; + GPUImageFilter *selectiveFocusFilter; + BOOL hasOverriddenAspectRatio; +} + +/** The radius of the circular area being excluded from the blur + */ +@property (readwrite, nonatomic) CGFloat excludeCircleRadius; +/** The center of the circular area being excluded from the blur + */ +@property (readwrite, nonatomic) CGPoint excludeCirclePoint; +/** The size of the area between the blurred portion and the clear circle + */ +@property (readwrite, nonatomic) CGFloat excludeBlurSize; +/** A radius in pixels to use for the blur, with a default of 5.0. This adjusts the sigma variable in the Gaussian distribution function. + */ +@property (readwrite, nonatomic) CGFloat blurRadiusInPixels; +/** The aspect ratio of the image, used to adjust the circularity of the in-focus region. By default, this matches the image aspect ratio, but you can override this value. + */ +@property (readwrite, nonatomic) CGFloat aspectRatio; + +@end diff --git a/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageGlassSphereFilter.h b/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageGlassSphereFilter.h new file mode 100755 index 00000000..809a4ee8 --- /dev/null +++ b/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageGlassSphereFilter.h @@ -0,0 +1,5 @@ +#import "GPUImageSphereRefractionFilter.h" + +@interface GPUImageGlassSphereFilter : GPUImageSphereRefractionFilter + +@end diff --git a/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageGrayscaleFilter.h b/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageGrayscaleFilter.h new file mode 100755 index 00000000..2d97f8c3 --- /dev/null +++ b/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageGrayscaleFilter.h @@ -0,0 +1,9 @@ +#import "GPUImageFilter.h" + +extern NSString *const kGPUImageLuminanceFragmentShaderString; + +/** Converts an image to grayscale (a slightly faster implementation of the saturation filter, without the ability to vary the color contribution) + */ +@interface GPUImageGrayscaleFilter : GPUImageFilter + +@end diff --git a/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageHSBFilter.h b/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageHSBFilter.h new file mode 100755 index 00000000..65a9e1de --- /dev/null +++ b/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageHSBFilter.h @@ -0,0 +1,27 @@ +#import "GPUImageColorMatrixFilter.h" + +@interface GPUImageHSBFilter : GPUImageColorMatrixFilter + +/** Reset the filter to have no transformations. + */ +- (void)reset; + +/** Add a hue rotation to the filter. + The hue rotation is in the range [-360, 360] with 0 being no-change. + Note that this adjustment is additive, so use the reset method if you need to. + */ +- (void)rotateHue:(float)h; + +/** Add a saturation adjustment to the filter. + The saturation adjustment is in the range [0.0, 2.0] with 1.0 being no-change. + Note that this adjustment is additive, so use the reset method if you need to. + */ +- (void)adjustSaturation:(float)s; + +/** Add a brightness adjustment to the filter. + The brightness adjustment is in the range [0.0, 2.0] with 1.0 being no-change. + Note that this adjustment is additive, so use the reset method if you need to. + */ +- (void)adjustBrightness:(float)b; + +@end diff --git a/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageHalftoneFilter.h b/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageHalftoneFilter.h new file mode 100755 index 00000000..1860bc97 --- /dev/null +++ b/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageHalftoneFilter.h @@ -0,0 +1,5 @@ +#import "GPUImagePixellateFilter.h" + +@interface GPUImageHalftoneFilter : GPUImagePixellateFilter + +@end diff --git a/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageHardLightBlendFilter.h b/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageHardLightBlendFilter.h new file mode 100755 index 00000000..47d62609 --- /dev/null +++ b/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageHardLightBlendFilter.h @@ -0,0 +1,7 @@ +#import "GPUImageTwoInputFilter.h" + +@interface GPUImageHardLightBlendFilter : GPUImageTwoInputFilter +{ +} + +@end diff --git a/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageHarrisCornerDetectionFilter.h b/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageHarrisCornerDetectionFilter.h new file mode 100755 index 00000000..1492b8b8 --- /dev/null +++ b/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageHarrisCornerDetectionFilter.h @@ -0,0 +1,53 @@ +#import "GPUImageFilterGroup.h" + +@class GPUImageGaussianBlurFilter; +@class GPUImageXYDerivativeFilter; +@class GPUImageGrayscaleFilter; +@class GPUImageGaussianBlurFilter; +@class GPUImageThresholdedNonMaximumSuppressionFilter; +@class GPUImageColorPackingFilter; + +//#define DEBUGFEATUREDETECTION + +/** Harris corner detector + + First pass: reduce to luminance and take the derivative of the luminance texture (GPUImageXYDerivativeFilter) + + Second pass: blur the derivative (GPUImageGaussianBlurFilter) + + Third pass: apply the Harris corner detection calculation + + This is the Harris corner detector, as described in + C. Harris and M. Stephens. A Combined Corner and Edge Detector. Proc. Alvey Vision Conf., Univ. Manchester, pp. 147-151, 1988. + */ +@interface GPUImageHarrisCornerDetectionFilter : GPUImageFilterGroup +{ + GPUImageXYDerivativeFilter *derivativeFilter; + GPUImageGaussianBlurFilter *blurFilter; + GPUImageFilter *harrisCornerDetectionFilter; + GPUImageThresholdedNonMaximumSuppressionFilter *nonMaximumSuppressionFilter; + GPUImageColorPackingFilter *colorPackingFilter; + GLfloat *cornersArray; + GLubyte *rawImagePixels; +} + +/** The radius of the underlying Gaussian blur. The default is 2.0. + */ +@property(readwrite, nonatomic) CGFloat blurRadiusInPixels; + +// This changes the dynamic range of the Harris corner detector by amplifying small cornerness values. Default is 5.0. +@property(readwrite, nonatomic) CGFloat sensitivity; + +// A threshold value at which a point is recognized as being a corner after the non-maximum suppression. Default is 0.20. +@property(readwrite, nonatomic) CGFloat threshold; + +// This block is called on the detection of new corner points, usually on every processed frame. A C array containing normalized coordinates in X, Y pairs is passed in, along with a count of the number of corners detected and the current timestamp of the video frame +@property(nonatomic, copy) void(^cornersDetectedBlock)(GLfloat* cornerArray, NSUInteger cornersDetected, CMTime frameTime); + +// These images are only enabled when built with DEBUGFEATUREDETECTION defined, and are used to examine the intermediate states of the feature detector +@property(nonatomic, readonly, strong) NSMutableArray *intermediateImages; + +// Initialization and teardown +- (id)initWithCornerDetectionFragmentShader:(NSString *)cornerDetectionFragmentShader; + +@end diff --git a/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageHazeFilter.h b/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageHazeFilter.h new file mode 100755 index 00000000..eb3fbca6 --- /dev/null +++ b/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageHazeFilter.h @@ -0,0 +1,29 @@ +#import "GPUImageFilter.h" + +/* + * The haze filter can be used to add or remove haze (similar to a UV filter) + * + * @author Alaric Cole + * @creationDate 03/10/12 + * + */ + +/** The haze filter can be used to add or remove haze + + This is similar to a UV filter + */ +@interface GPUImageHazeFilter : GPUImageFilter +{ + GLint distanceUniform; + GLint slopeUniform; +} + +/** Strength of the color applied. Default 0. Values between -.3 and .3 are best + */ +@property(readwrite, nonatomic) CGFloat distance; + +/** Amount of color change. Default 0. Values between -.3 and .3 are best + */ +@property(readwrite, nonatomic) CGFloat slope; + +@end diff --git a/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageHighPassFilter.h b/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageHighPassFilter.h new file mode 100755 index 00000000..263d8df1 --- /dev/null +++ b/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageHighPassFilter.h @@ -0,0 +1,14 @@ +#import "GPUImageFilterGroup.h" +#import "GPUImageLowPassFilter.h" +#import "GPUImageDifferenceBlendFilter.h" + +@interface GPUImageHighPassFilter : GPUImageFilterGroup +{ + GPUImageLowPassFilter *lowPassFilter; + GPUImageDifferenceBlendFilter *differenceBlendFilter; +} + +// This controls the degree by which the previous accumulated frames are blended and then subtracted from the current one. This ranges from 0.0 to 1.0, with a default of 0.5. +@property(readwrite, nonatomic) CGFloat filterStrength; + +@end diff --git a/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageHighlightShadowFilter.h b/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageHighlightShadowFilter.h new file mode 100755 index 00000000..35791298 --- /dev/null +++ b/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageHighlightShadowFilter.h @@ -0,0 +1,20 @@ +#import "GPUImageFilter.h" + +@interface GPUImageHighlightShadowFilter : GPUImageFilter +{ + GLint shadowsUniform, highlightsUniform; +} + +/** + * 0 - 1, increase to lighten shadows. + * @default 0 + */ +@property(readwrite, nonatomic) CGFloat shadows; + +/** + * 0 - 1, decrease to darken highlights. + * @default 1 + */ +@property(readwrite, nonatomic) CGFloat highlights; + +@end diff --git a/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageHistogramEqualizationFilter.h b/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageHistogramEqualizationFilter.h new file mode 100755 index 00000000..2b71cda0 --- /dev/null +++ b/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageHistogramEqualizationFilter.h @@ -0,0 +1,26 @@ +// +// GPUImageHistogramEqualizationFilter.h +// FilterShowcase +// +// Created by Adam Marcus on 19/08/2014. +// Copyright (c) 2014 Sunset Lake Software LLC. All rights reserved. +// + +#import "GPUImageFilterGroup.h" +#import "GPUImageHistogramFilter.h" +#import "GPUImageRawDataOutput.h" +#import "GPUImageRawDataInput.h" +#import "GPUImageTwoInputFilter.h" + +@interface GPUImageHistogramEqualizationFilter : GPUImageFilterGroup +{ + GPUImageHistogramFilter *histogramFilter; + GPUImageRawDataOutput *rawDataOutputFilter; + GPUImageRawDataInput *rawDataInputFilter; +} + +@property(readwrite, nonatomic) NSUInteger downsamplingFactor; + +- (id)initWithHistogramType:(GPUImageHistogramType)newHistogramType; + +@end diff --git a/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageHistogramFilter.h b/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageHistogramFilter.h new file mode 100755 index 00000000..32004bf7 --- /dev/null +++ b/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageHistogramFilter.h @@ -0,0 +1,22 @@ +#import "GPUImageFilter.h" + +typedef enum { kGPUImageHistogramRed, kGPUImageHistogramGreen, kGPUImageHistogramBlue, kGPUImageHistogramRGB, kGPUImageHistogramLuminance} GPUImageHistogramType; + +@interface GPUImageHistogramFilter : GPUImageFilter +{ + GPUImageHistogramType histogramType; + + GLubyte *vertexSamplingCoordinates; + + GLProgram *secondFilterProgram, *thirdFilterProgram; + GLint secondFilterPositionAttribute, thirdFilterPositionAttribute; +} + +// Rather than sampling every pixel, this dictates what fraction of the image is sampled. By default, this is 16 with a minimum of 1. +@property(readwrite, nonatomic) NSUInteger downsamplingFactor; + +// Initialization and teardown +- (id)initWithHistogramType:(GPUImageHistogramType)newHistogramType; +- (void)initializeSecondaryAttributes; + +@end diff --git a/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageHistogramGenerator.h b/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageHistogramGenerator.h new file mode 100755 index 00000000..f80c50f3 --- /dev/null +++ b/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageHistogramGenerator.h @@ -0,0 +1,8 @@ +#import "GPUImageFilter.h" + +@interface GPUImageHistogramGenerator : GPUImageFilter +{ + GLint backgroundColorUniform; +} + +@end diff --git a/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageHoughTransformLineDetector.h b/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageHoughTransformLineDetector.h new file mode 100755 index 00000000..3ab6977f --- /dev/null +++ b/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageHoughTransformLineDetector.h @@ -0,0 +1,49 @@ +#import "GPUImageFilterGroup.h" +#import "GPUImageThresholdEdgeDetectionFilter.h" +#import "GPUImageParallelCoordinateLineTransformFilter.h" +#import "GPUImageThresholdedNonMaximumSuppressionFilter.h" +#import "GPUImageCannyEdgeDetectionFilter.h" + +// This applies a Hough transform to detect lines in a scene. It starts with a thresholded Sobel edge detection pass, +// then takes those edge points in and applies a Hough transform to convert them to lines. The intersection of these lines +// is then determined via blending and accumulation, and a non-maximum suppression filter is applied to find local maxima. +// These local maxima are then converted back into lines in normal space and returned via a callback block. +// +// Rather than using one of the standard Hough transform types, this filter uses parallel coordinate space which is far more efficient +// to rasterize on a GPU. +// +// This approach is based entirely on the PC lines process developed by the Graph@FIT research group at the Brno University of Technology +// and described in their publications: +// +// M. Dubská, J. Havel, and A. Herout. Real-Time Detection of Lines using Parallel Coordinates and OpenGL. Proceedings of SCCG 2011, Bratislava, SK, p. 7. +// http://medusa.fit.vutbr.cz/public/data/papers/2011-SCCG-Dubska-Real-Time-Line-Detection-Using-PC-and-OpenGL.pdf +// M. Dubská, J. Havel, and A. Herout. PClines — Line detection using parallel coordinates. 2011 IEEE Conference on Computer Vision and Pattern Recognition (CVPR), p. 1489- 1494. +// http://medusa.fit.vutbr.cz/public/data/papers/2011-CVPR-Dubska-PClines.pdf + +//#define DEBUGLINEDETECTION + +@interface GPUImageHoughTransformLineDetector : GPUImageFilterGroup +{ + GPUImageOutput *thresholdEdgeDetectionFilter; + +// GPUImageThresholdEdgeDetectionFilter *thresholdEdgeDetectionFilter; + GPUImageParallelCoordinateLineTransformFilter *parallelCoordinateLineTransformFilter; + GPUImageThresholdedNonMaximumSuppressionFilter *nonMaximumSuppressionFilter; + + GLfloat *linesArray; + GLubyte *rawImagePixels; +} + +// A threshold value for which a point is detected as belonging to an edge for determining lines. Default is 0.9. +@property(readwrite, nonatomic) CGFloat edgeThreshold; + +// A threshold value for which a local maximum is detected as belonging to a line in parallel coordinate space. Default is 0.20. +@property(readwrite, nonatomic) CGFloat lineDetectionThreshold; + +// This block is called on the detection of lines, usually on every processed frame. A C array containing normalized slopes and intercepts in m, b pairs (y=mx+b) is passed in, along with a count of the number of lines detected and the current timestamp of the video frame +@property(nonatomic, copy) void(^linesDetectedBlock)(GLfloat* lineArray, NSUInteger linesDetected, CMTime frameTime); + +// These images are only enabled when built with DEBUGLINEDETECTION defined, and are used to examine the intermediate states of the Hough transform +@property(nonatomic, readonly, strong) NSMutableArray *intermediateImages; + +@end diff --git a/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageHueBlendFilter.h b/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageHueBlendFilter.h new file mode 100755 index 00000000..4399ffcf --- /dev/null +++ b/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageHueBlendFilter.h @@ -0,0 +1,5 @@ +#import "GPUImageTwoInputFilter.h" + +@interface GPUImageHueBlendFilter : GPUImageTwoInputFilter + +@end diff --git a/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageHueFilter.h b/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageHueFilter.h new file mode 100755 index 00000000..eef24651 --- /dev/null +++ b/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageHueFilter.h @@ -0,0 +1,11 @@ + +#import "GPUImageFilter.h" + +@interface GPUImageHueFilter : GPUImageFilter +{ + GLint hueAdjustUniform; + +} +@property (nonatomic, readwrite) CGFloat hue; + +@end diff --git a/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageJFAVoronoiFilter.h b/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageJFAVoronoiFilter.h new file mode 100755 index 00000000..4c50cc37 --- /dev/null +++ b/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageJFAVoronoiFilter.h @@ -0,0 +1,17 @@ +#import "GPUImageFilter.h" + +@interface GPUImageJFAVoronoiFilter : GPUImageFilter +{ + GLuint secondFilterOutputTexture; + GLuint secondFilterFramebuffer; + + + GLint sampleStepUniform; + GLint sizeUniform; + NSUInteger numPasses; + +} + +@property (nonatomic, readwrite) CGSize sizeInPixels; + +@end \ No newline at end of file diff --git a/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageKuwaharaFilter.h b/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageKuwaharaFilter.h new file mode 100755 index 00000000..4fb0bce8 --- /dev/null +++ b/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageKuwaharaFilter.h @@ -0,0 +1,13 @@ +#import "GPUImageFilter.h" + +/** Kuwahara image abstraction, drawn from the work of Kyprianidis, et. al. in their publication "Anisotropic Kuwahara Filtering on the GPU" within the GPU Pro collection. This produces an oil-painting-like image, but it is extremely computationally expensive, so it can take seconds to render a frame on an iPad 2. This might be best used for still images. + */ +@interface GPUImageKuwaharaFilter : GPUImageFilter +{ + GLint radiusUniform; +} + +/// The radius to sample from when creating the brush-stroke effect, with a default of 3. The larger the radius, the slower the filter. +@property(readwrite, nonatomic) NSUInteger radius; + +@end diff --git a/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageKuwaharaRadius3Filter.h b/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageKuwaharaRadius3Filter.h new file mode 100755 index 00000000..c4591b81 --- /dev/null +++ b/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageKuwaharaRadius3Filter.h @@ -0,0 +1,8 @@ +// +// GPUImageKuwaharaRadius3Filter.h + +#import "GPUImageFilter.h" + +@interface GPUImageKuwaharaRadius3Filter : GPUImageFilter + +@end diff --git a/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageLanczosResamplingFilter.h b/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageLanczosResamplingFilter.h new file mode 100755 index 00000000..5d7409f5 --- /dev/null +++ b/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageLanczosResamplingFilter.h @@ -0,0 +1,7 @@ +#import "GPUImageTwoPassTextureSamplingFilter.h" + +@interface GPUImageLanczosResamplingFilter : GPUImageTwoPassTextureSamplingFilter + +@property(readwrite, nonatomic) CGSize originalImageSize; + +@end diff --git a/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageLaplacianFilter.h b/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageLaplacianFilter.h new file mode 100755 index 00000000..267c1bab --- /dev/null +++ b/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageLaplacianFilter.h @@ -0,0 +1,5 @@ +#import "GPUImage3x3ConvolutionFilter.h" + +@interface GPUImageLaplacianFilter : GPUImage3x3ConvolutionFilter + +@end diff --git a/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageLevelsFilter.h b/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageLevelsFilter.h new file mode 100755 index 00000000..d0948fbf --- /dev/null +++ b/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageLevelsFilter.h @@ -0,0 +1,45 @@ +#import "GPUImageFilter.h" + +/** + * Levels like Photoshop. + * + * The min, max, minOut and maxOut parameters are floats in the range [0, 1]. + * If you have parameters from Photoshop in the range [0, 255] you must first + * convert them to be [0, 1]. + * The gamma/mid parameter is a float >= 0. This matches the value from Photoshop. + * + * If you want to apply levels to RGB as well as individual channels you need to use + * this filter twice - first for the individual channels and then for all channels. + */ +@interface GPUImageLevelsFilter : GPUImageFilter +{ + GLint minUniform; + GLint midUniform; + GLint maxUniform; + GLint minOutputUniform; + GLint maxOutputUniform; + + GPUVector3 minVector, midVector, maxVector, minOutputVector, maxOutputVector; +} + +/** Set levels for the red channel */ +- (void)setRedMin:(CGFloat)min gamma:(CGFloat)mid max:(CGFloat)max minOut:(CGFloat)minOut maxOut:(CGFloat)maxOut; + +- (void)setRedMin:(CGFloat)min gamma:(CGFloat)mid max:(CGFloat)max; + +/** Set levels for the green channel */ +- (void)setGreenMin:(CGFloat)min gamma:(CGFloat)mid max:(CGFloat)max minOut:(CGFloat)minOut maxOut:(CGFloat)maxOut; + +- (void)setGreenMin:(CGFloat)min gamma:(CGFloat)mid max:(CGFloat)max; + +/** Set levels for the blue channel */ +- (void)setBlueMin:(CGFloat)min gamma:(CGFloat)mid max:(CGFloat)max minOut:(CGFloat)minOut maxOut:(CGFloat)maxOut; + +- (void)setBlueMin:(CGFloat)min gamma:(CGFloat)mid max:(CGFloat)max; + +/** Set levels for all channels at once */ +- (void)setMin:(CGFloat)min gamma:(CGFloat)mid max:(CGFloat)max minOut:(CGFloat)minOut maxOut:(CGFloat)maxOut; +- (void)setMin:(CGFloat)min gamma:(CGFloat)mid max:(CGFloat)max; + +@end + diff --git a/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageLightenBlendFilter.h b/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageLightenBlendFilter.h new file mode 100755 index 00000000..b0287c13 --- /dev/null +++ b/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageLightenBlendFilter.h @@ -0,0 +1,8 @@ +#import "GPUImageTwoInputFilter.h" + +/// Blends two images by taking the maximum value of each color component between the images +@interface GPUImageLightenBlendFilter : GPUImageTwoInputFilter +{ +} + +@end diff --git a/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageLineGenerator.h b/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageLineGenerator.h new file mode 100755 index 00000000..4c467366 --- /dev/null +++ b/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageLineGenerator.h @@ -0,0 +1,18 @@ +#import "GPUImageFilter.h" + +@interface GPUImageLineGenerator : GPUImageFilter +{ + GLint lineWidthUniform, lineColorUniform; + GLfloat *lineCoordinates; +} + +// The width of the displayed lines, in pixels. The default is 1. +@property(readwrite, nonatomic) CGFloat lineWidth; + +// The color of the lines is specified using individual red, green, and blue components (normalized to 1.0). The default is green: (0.0, 1.0, 0.0). +- (void)setLineColorRed:(GLfloat)redComponent green:(GLfloat)greenComponent blue:(GLfloat)blueComponent; + +// Rendering +- (void)renderLinesFromArray:(GLfloat *)lineSlopeAndIntercepts count:(NSUInteger)numberOfLines frameTime:(CMTime)frameTime; + +@end diff --git a/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageLinearBurnBlendFilter.h b/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageLinearBurnBlendFilter.h new file mode 100755 index 00000000..7e5e415c --- /dev/null +++ b/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageLinearBurnBlendFilter.h @@ -0,0 +1,5 @@ +#import "GPUImageTwoInputFilter.h" + +@interface GPUImageLinearBurnBlendFilter : GPUImageTwoInputFilter + +@end diff --git a/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageLocalBinaryPatternFilter.h b/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageLocalBinaryPatternFilter.h new file mode 100755 index 00000000..431dbbd4 --- /dev/null +++ b/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageLocalBinaryPatternFilter.h @@ -0,0 +1,5 @@ +#import "GPUImage3x3TextureSamplingFilter.h" + +@interface GPUImageLocalBinaryPatternFilter : GPUImage3x3TextureSamplingFilter + +@end diff --git a/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageLookupFilter.h b/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageLookupFilter.h new file mode 100755 index 00000000..23ebde2b --- /dev/null +++ b/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageLookupFilter.h @@ -0,0 +1,34 @@ +#import "GPUImageTwoInputFilter.h" + +@interface GPUImageLookupFilter : GPUImageTwoInputFilter +{ + GLint intensityUniform; +} + +// How To Use: +// 1) Use your favourite photo editing application to apply a filter to lookup.png from GPUImage/framework/Resources. +// For this to work properly each pixel color must not depend on other pixels (e.g. blur will not work). +// If you need more complex filter you can create as many lookup tables as required. +// E.g. color_balance_lookup_1.png -> GPUImageGaussianBlurFilter -> color_balance_lookup_2.png +// 2) Use you new lookup.png file as a second input for GPUImageLookupFilter. + +// See GPUImageAmatorkaFilter, GPUImageMissEtikateFilter, and GPUImageSoftEleganceFilter for example. + +// Additional Info: +// Lookup texture is organised as 8x8 quads of 64x64 pixels representing all possible RGB colors: +//for (int by = 0; by < 8; by++) { +// for (int bx = 0; bx < 8; bx++) { +// for (int g = 0; g < 64; g++) { +// for (int r = 0; r < 64; r++) { +// image.setPixel(r + bx * 64, g + by * 64, qRgb((int)(r * 255.0 / 63.0 + 0.5), +// (int)(g * 255.0 / 63.0 + 0.5), +// (int)((bx + by * 8.0) * 255.0 / 63.0 + 0.5))); +// } +// } +// } +//} + +// Opacity/intensity of lookup filter ranges from 0.0 to 1.0, with 1.0 as the normal setting +@property(readwrite, nonatomic) CGFloat intensity; + +@end diff --git a/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageLowPassFilter.h b/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageLowPassFilter.h new file mode 100755 index 00000000..be5c397e --- /dev/null +++ b/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageLowPassFilter.h @@ -0,0 +1,14 @@ +#import "GPUImageFilterGroup.h" +#import "GPUImageBuffer.h" +#import "GPUImageDissolveBlendFilter.h" + +@interface GPUImageLowPassFilter : GPUImageFilterGroup +{ + GPUImageBuffer *bufferFilter; + GPUImageDissolveBlendFilter *dissolveBlendFilter; +} + +// This controls the degree by which the previous accumulated frames are blended with the current one. This ranges from 0.0 to 1.0, with a default of 0.5. +@property(readwrite, nonatomic) CGFloat filterStrength; + +@end diff --git a/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageLuminanceRangeFilter.h b/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageLuminanceRangeFilter.h new file mode 100755 index 00000000..5a310370 --- /dev/null +++ b/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageLuminanceRangeFilter.h @@ -0,0 +1,12 @@ +#import "GPUImageFilter.h" + +@interface GPUImageLuminanceRangeFilter : GPUImageFilter +{ + GLint rangeReductionUniform; +} + +/** The degree to reduce the luminance range, from 0.0 to 1.0. Default is 0.6. + */ +@property(readwrite, nonatomic) CGFloat rangeReductionFactor; + +@end diff --git a/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageLuminanceThresholdFilter.h b/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageLuminanceThresholdFilter.h new file mode 100755 index 00000000..0abb9a1e --- /dev/null +++ b/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageLuminanceThresholdFilter.h @@ -0,0 +1,14 @@ +#import "GPUImageFilter.h" + +/** Pixels with a luminance above the threshold will appear white, and those below will be black + */ +@interface GPUImageLuminanceThresholdFilter : GPUImageFilter +{ + GLint thresholdUniform; +} + +/** Anything above this luminance will be white, and anything below black. Ranges from 0.0 to 1.0, with 0.5 as the default + */ +@property(readwrite, nonatomic) CGFloat threshold; + +@end diff --git a/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageLuminosity.h b/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageLuminosity.h new file mode 100755 index 00000000..b2d2458f --- /dev/null +++ b/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageLuminosity.h @@ -0,0 +1,17 @@ +#import "GPUImageAverageColor.h" + +@interface GPUImageLuminosity : GPUImageAverageColor +{ + GLProgram *secondFilterProgram; + GLint secondFilterPositionAttribute, secondFilterTextureCoordinateAttribute; + GLint secondFilterInputTextureUniform, secondFilterInputTextureUniform2; + GLint secondFilterTexelWidthUniform, secondFilterTexelHeightUniform; +} + +// This block is called on the completion of color averaging for a frame +@property(nonatomic, copy) void(^luminosityProcessingFinishedBlock)(CGFloat luminosity, CMTime frameTime); + +- (void)extractLuminosityAtFrameTime:(CMTime)frameTime; +- (void)initializeSecondaryAttributes; + +@end diff --git a/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageLuminosityBlendFilter.h b/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageLuminosityBlendFilter.h new file mode 100755 index 00000000..03b5e4c9 --- /dev/null +++ b/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageLuminosityBlendFilter.h @@ -0,0 +1,5 @@ +#import "GPUImageTwoInputFilter.h" + +@interface GPUImageLuminosityBlendFilter : GPUImageTwoInputFilter + +@end diff --git a/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageMaskFilter.h b/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageMaskFilter.h new file mode 100755 index 00000000..94cf0648 --- /dev/null +++ b/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageMaskFilter.h @@ -0,0 +1,5 @@ +#import "GPUImageTwoInputFilter.h" + +@interface GPUImageMaskFilter : GPUImageTwoInputFilter + +@end diff --git a/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageMedianFilter.h b/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageMedianFilter.h new file mode 100755 index 00000000..80225789 --- /dev/null +++ b/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageMedianFilter.h @@ -0,0 +1,5 @@ +#import "GPUImage3x3TextureSamplingFilter.h" + +@interface GPUImageMedianFilter : GPUImage3x3TextureSamplingFilter + +@end diff --git a/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageMissEtikateFilter.h b/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageMissEtikateFilter.h new file mode 100755 index 00000000..de170647 --- /dev/null +++ b/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageMissEtikateFilter.h @@ -0,0 +1,17 @@ +#import "GPUImageFilterGroup.h" + +@class GPUImagePicture; + +/** A photo filter based on Photoshop action by Miss Etikate: + http://miss-etikate.deviantart.com/art/Photoshop-Action-15-120151961 + */ + +// Note: If you want to use this effect you have to add lookup_miss_etikate.png +// from Resources folder to your application bundle. + +@interface GPUImageMissEtikateFilter : GPUImageFilterGroup +{ + GPUImagePicture *lookupImageSource; +} + +@end diff --git a/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageMonochromeFilter.h b/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageMonochromeFilter.h new file mode 100755 index 00000000..66a0e773 --- /dev/null +++ b/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageMonochromeFilter.h @@ -0,0 +1,13 @@ +#import "GPUImageFilter.h" + +@interface GPUImageMonochromeFilter : GPUImageFilter +{ + GLint intensityUniform, filterColorUniform; +} + +@property(readwrite, nonatomic) CGFloat intensity; +@property(readwrite, nonatomic) GPUVector4 color; + +- (void)setColorRed:(GLfloat)redComponent green:(GLfloat)greenComponent blue:(GLfloat)blueComponent; + +@end diff --git a/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageMosaicFilter.h b/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageMosaicFilter.h new file mode 100755 index 00000000..5f72d3c9 --- /dev/null +++ b/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageMosaicFilter.h @@ -0,0 +1,22 @@ + +// This needs a little more work, it's rotating the input tileset and there are some artifacts (I think from GL_LINEAR interpolation), but it's working + +#import "GPUImageTwoInputFilter.h" +#import "GPUImagePicture.h" + +@interface GPUImageMosaicFilter : GPUImageTwoInputFilter { + GLint inputTileSizeUniform, numTilesUniform, displayTileSizeUniform, colorOnUniform; + GPUImagePicture *pic; +} + +// This filter takes an input tileset, the tiles must ascend in luminance +// It looks at the input image and replaces each display tile with an input tile +// according to the luminance of that tile. The idea was to replicate the ASCII +// video filters seen in other apps, but the tileset can be anything. +@property(readwrite, nonatomic) CGSize inputTileSize; +@property(readwrite, nonatomic) float numTiles; +@property(readwrite, nonatomic) CGSize displayTileSize; +@property(readwrite, nonatomic) BOOL colorOn; +@property(readwrite, nonatomic, copy) NSString *tileSet; + +@end diff --git a/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageMotionBlurFilter.h b/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageMotionBlurFilter.h new file mode 100755 index 00000000..dcca712f --- /dev/null +++ b/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageMotionBlurFilter.h @@ -0,0 +1,13 @@ +#import "GPUImageFilter.h" + +@interface GPUImageMotionBlurFilter : GPUImageFilter + +/** A multiplier for the blur size, ranging from 0.0 on up, with a default of 1.0 + */ +@property (readwrite, nonatomic) CGFloat blurSize; + +/** The angular direction of the blur, in degrees. 0 degrees by default + */ +@property (readwrite, nonatomic) CGFloat blurAngle; + +@end diff --git a/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageMotionDetector.h b/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageMotionDetector.h new file mode 100755 index 00000000..01329145 --- /dev/null +++ b/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageMotionDetector.h @@ -0,0 +1,18 @@ +#import "GPUImageFilterGroup.h" +#import "GPUImageLowPassFilter.h" +#import "GPUImageAverageColor.h" + +@interface GPUImageMotionDetector : GPUImageFilterGroup +{ + GPUImageLowPassFilter *lowPassFilter; + GPUImageTwoInputFilter *frameComparisonFilter; + GPUImageAverageColor *averageColor; +} + +// This controls the low pass filter strength used to compare the current frame with previous ones to detect motion. This ranges from 0.0 to 1.0, with a default of 0.5. +@property(readwrite, nonatomic) CGFloat lowPassFilterStrength; + +// For every frame, this will feed back the calculated centroid of the motion, as well as a relative intensity. +@property(nonatomic, copy) void(^motionDetectionBlock)(CGPoint motionCentroid, CGFloat motionIntensity, CMTime frameTime); + +@end diff --git a/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageMovie.h b/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageMovie.h new file mode 100755 index 00000000..f61e56ef --- /dev/null +++ b/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageMovie.h @@ -0,0 +1,61 @@ +#import +#import +#import "GPUImageContext.h" +#import "GPUImageOutput.h" + +/** Protocol for getting Movie played callback. + */ +@protocol GPUImageMovieDelegate + +- (void)didCompletePlayingMovie; +@end + +/** Source object for filtering movies + */ +@interface GPUImageMovie : GPUImageOutput + +@property (readwrite, retain) AVAsset *asset; +@property (readwrite, retain) AVPlayerItem *playerItem; +@property(readwrite, retain) NSURL *url; + +/** This enables the benchmarking mode, which logs out instantaneous and average frame times to the console + */ +@property(readwrite, nonatomic) BOOL runBenchmark; + +/** This determines whether to play back a movie as fast as the frames can be processed, or if the original speed of the movie should be respected. Defaults to NO. + */ +@property(readwrite, nonatomic) BOOL playAtActualSpeed; + +/** This determines whether the video should repeat (loop) at the end and restart from the beginning. Defaults to NO. + */ +@property(readwrite, nonatomic) BOOL shouldRepeat; + +/** This specifies the progress of the process on a scale from 0 to 1.0. A value of 0 means the process has not yet begun, A value of 1.0 means the conversaion is complete. + This property is not key-value observable. + */ +@property(readonly, nonatomic) float progress; + +/** This is used to send the delete Movie did complete playing alert + */ +@property (readwrite, nonatomic, assign) id delegate; + +@property (readonly, nonatomic) AVAssetReader *assetReader; +@property (readonly, nonatomic) BOOL audioEncodingIsFinished; +@property (readonly, nonatomic) BOOL videoEncodingIsFinished; + +/// @name Initialization and teardown +- (id)initWithAsset:(AVAsset *)asset; +- (id)initWithPlayerItem:(AVPlayerItem *)playerItem; +- (id)initWithURL:(NSURL *)url; +- (void)yuvConversionSetup; + +/// @name Movie processing +- (void)enableSynchronizedEncodingUsingMovieWriter:(GPUImageMovieWriter *)movieWriter; +- (BOOL)readNextVideoFrameFromOutput:(AVAssetReaderOutput *)readerVideoTrackOutput; +- (BOOL)readNextAudioSampleFromOutput:(AVAssetReaderOutput *)readerAudioTrackOutput; +- (void)startProcessing; +- (void)endProcessing; +- (void)cancelProcessing; +- (void)processMovieFrame:(CMSampleBufferRef)movieSampleBuffer; + +@end diff --git a/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageMovieComposition.h b/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageMovieComposition.h new file mode 100755 index 00000000..00e43814 --- /dev/null +++ b/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageMovieComposition.h @@ -0,0 +1,21 @@ +// +// GPUImageMovieComposition.h +// Givit +// +// Created by Sean Meiners on 2013/01/25. +// +// + +#import "GPUImageMovie.h" + +@interface GPUImageMovieComposition : GPUImageMovie + +@property (readwrite, retain) AVComposition *compositon; +@property (readwrite, retain) AVVideoComposition *videoComposition; +@property (readwrite, retain) AVAudioMix *audioMix; + +- (id)initWithComposition:(AVComposition*)compositon + andVideoComposition:(AVVideoComposition*)videoComposition + andAudioMix:(AVAudioMix*)audioMix; + +@end diff --git a/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageMovieWriter.h b/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageMovieWriter.h new file mode 100755 index 00000000..f0b2c6ad --- /dev/null +++ b/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageMovieWriter.h @@ -0,0 +1,67 @@ +#import +#import +#import "GPUImageContext.h" + +extern NSString *const kGPUImageColorSwizzlingFragmentShaderString; + +@protocol GPUImageMovieWriterDelegate + +@optional +- (void)movieRecordingCompleted; +- (void)movieRecordingFailedWithError:(NSError*)error; + +@end + +@interface GPUImageMovieWriter : NSObject +{ + BOOL alreadyFinishedRecording; + + NSURL *movieURL; + NSString *fileType; + AVAssetWriter *assetWriter; + AVAssetWriterInput *assetWriterAudioInput; + AVAssetWriterInput *assetWriterVideoInput; + AVAssetWriterInputPixelBufferAdaptor *assetWriterPixelBufferInput; + + GPUImageContext *_movieWriterContext; + CVPixelBufferRef renderTarget; + CVOpenGLESTextureRef renderTexture; + + CGSize videoSize; + GPUImageRotationMode inputRotation; +} + +@property(readwrite, nonatomic) BOOL hasAudioTrack; +@property(readwrite, nonatomic) BOOL shouldPassthroughAudio; +@property(readwrite, nonatomic) BOOL shouldInvalidateAudioSampleWhenDone; +@property(nonatomic, copy) void(^completionBlock)(void); +@property(nonatomic, copy) void(^failureBlock)(NSError*); +@property(nonatomic, assign) id delegate; +@property(readwrite, nonatomic) BOOL encodingLiveVideo; +@property(nonatomic, copy) BOOL(^videoInputReadyCallback)(void); +@property(nonatomic, copy) BOOL(^audioInputReadyCallback)(void); +@property(nonatomic, copy) void(^audioProcessingCallback)(SInt16 **samplesRef, CMItemCount numSamplesInBuffer); +@property(nonatomic) BOOL enabled; +@property(nonatomic, readonly) AVAssetWriter *assetWriter; +@property(nonatomic, readonly) CMTime duration; +@property(nonatomic, assign) CGAffineTransform transform; +@property(nonatomic, copy) NSArray *metaData; +@property(nonatomic, assign, getter = isPaused) BOOL paused; +@property(nonatomic, retain) GPUImageContext *movieWriterContext; + +// Initialization and teardown +- (id)initWithMovieURL:(NSURL *)newMovieURL size:(CGSize)newSize; +- (id)initWithMovieURL:(NSURL *)newMovieURL size:(CGSize)newSize fileType:(NSString *)newFileType outputSettings:(NSDictionary *)outputSettings; + +- (void)setHasAudioTrack:(BOOL)hasAudioTrack audioSettings:(NSDictionary *)audioOutputSettings; + +// Movie recording +- (void)startRecording; +- (void)startRecordingInOrientation:(CGAffineTransform)orientationTransform; +- (void)finishRecording; +- (void)finishRecordingWithCompletionHandler:(void (^)(void))handler; +- (void)cancelRecording; +- (void)processAudioBuffer:(CMSampleBufferRef)audioBuffer; +- (void)enableSynchronizationCallbacks; + +@end diff --git a/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageMultiplyBlendFilter.h b/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageMultiplyBlendFilter.h new file mode 100755 index 00000000..5ebc28bb --- /dev/null +++ b/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageMultiplyBlendFilter.h @@ -0,0 +1,7 @@ +#import "GPUImageTwoInputFilter.h" + +@interface GPUImageMultiplyBlendFilter : GPUImageTwoInputFilter +{ +} + +@end diff --git a/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageNobleCornerDetectionFilter.h b/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageNobleCornerDetectionFilter.h new file mode 100755 index 00000000..963fd66a --- /dev/null +++ b/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageNobleCornerDetectionFilter.h @@ -0,0 +1,12 @@ +#import "GPUImageHarrisCornerDetectionFilter.h" + +/** Noble corner detector + + This is the Noble variant on the Harris detector, from + Alison Noble, "Descriptions of Image Surfaces", PhD thesis, Department of Engineering Science, Oxford University 1989, p45. +*/ + + +@interface GPUImageNobleCornerDetectionFilter : GPUImageHarrisCornerDetectionFilter + +@end diff --git a/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageNonMaximumSuppressionFilter.h b/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageNonMaximumSuppressionFilter.h new file mode 100755 index 00000000..fd8fe6d6 --- /dev/null +++ b/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageNonMaximumSuppressionFilter.h @@ -0,0 +1,5 @@ +#import "GPUImage3x3TextureSamplingFilter.h" + +@interface GPUImageNonMaximumSuppressionFilter : GPUImage3x3TextureSamplingFilter + +@end diff --git a/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageNormalBlendFilter.h b/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageNormalBlendFilter.h new file mode 100755 index 00000000..ce5e22b4 --- /dev/null +++ b/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageNormalBlendFilter.h @@ -0,0 +1,8 @@ +// Created by Jorge Garcia on 9/5/12. +// + +#import "GPUImageTwoInputFilter.h" + +@interface GPUImageNormalBlendFilter : GPUImageTwoInputFilter + +@end diff --git a/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageOpacityFilter.h b/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageOpacityFilter.h new file mode 100755 index 00000000..826749fb --- /dev/null +++ b/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageOpacityFilter.h @@ -0,0 +1,11 @@ +#import "GPUImageFilter.h" + +@interface GPUImageOpacityFilter : GPUImageFilter +{ + GLint opacityUniform; +} + +// Opacity ranges from 0.0 to 1.0, with 1.0 as the normal setting +@property(readwrite, nonatomic) CGFloat opacity; + +@end diff --git a/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageOpeningFilter.h b/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageOpeningFilter.h new file mode 100755 index 00000000..3e4f7545 --- /dev/null +++ b/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageOpeningFilter.h @@ -0,0 +1,19 @@ +#import "GPUImageFilterGroup.h" + +@class GPUImageErosionFilter; +@class GPUImageDilationFilter; + +// A filter that first performs an erosion on the red channel of an image, followed by a dilation of the same radius. +// This helps to filter out smaller bright elements. + +@interface GPUImageOpeningFilter : GPUImageFilterGroup +{ + GPUImageErosionFilter *erosionFilter; + GPUImageDilationFilter *dilationFilter; +} + +@property(readwrite, nonatomic) CGFloat verticalTexelSpacing, horizontalTexelSpacing; + +- (id)initWithRadius:(NSUInteger)radius; + +@end diff --git a/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageOutput.h b/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageOutput.h new file mode 100755 index 00000000..c10121a9 --- /dev/null +++ b/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageOutput.h @@ -0,0 +1,128 @@ +#import "GPUImageContext.h" +#import "GPUImageFramebuffer.h" + +#if TARGET_IPHONE_SIMULATOR || TARGET_OS_IPHONE +#import +#else +// For now, just redefine this on the Mac +typedef NS_ENUM(NSInteger, UIImageOrientation) { + UIImageOrientationUp, // default orientation + UIImageOrientationDown, // 180 deg rotation + UIImageOrientationLeft, // 90 deg CCW + UIImageOrientationRight, // 90 deg CW + UIImageOrientationUpMirrored, // as above but image mirrored along other axis. horizontal flip + UIImageOrientationDownMirrored, // horizontal flip + UIImageOrientationLeftMirrored, // vertical flip + UIImageOrientationRightMirrored, // vertical flip +}; +#endif + +dispatch_queue_attr_t GPUImageDefaultQueueAttribute(void); +void runOnMainQueueWithoutDeadlocking(void (^block)(void)); +void runSynchronouslyOnVideoProcessingQueue(void (^block)(void)); +void runAsynchronouslyOnVideoProcessingQueue(void (^block)(void)); +void runSynchronouslyOnContextQueue(GPUImageContext *context, void (^block)(void)); +void runAsynchronouslyOnContextQueue(GPUImageContext *context, void (^block)(void)); +void reportAvailableMemoryForGPUImage(NSString *tag); + +@class GPUImageMovieWriter; + +/** GPUImage's base source object + + Images or frames of video are uploaded from source objects, which are subclasses of GPUImageOutput. These include: + + - GPUImageVideoCamera (for live video from an iOS camera) + - GPUImageStillCamera (for taking photos with the camera) + - GPUImagePicture (for still images) + - GPUImageMovie (for movies) + + Source objects upload still image frames to OpenGL ES as textures, then hand those textures off to the next objects in the processing chain. + */ +@interface GPUImageOutput : NSObject +{ + GPUImageFramebuffer *outputFramebuffer; + + NSMutableArray *targets, *targetTextureIndices; + + CGSize inputTextureSize, cachedMaximumOutputSize, forcedMaximumSize; + + BOOL overrideInputSize; + + BOOL allTargetsWantMonochromeData; + BOOL usingNextFrameForImageCapture; +} + +@property(readwrite, nonatomic) BOOL shouldSmoothlyScaleOutput; +@property(readwrite, nonatomic) BOOL shouldIgnoreUpdatesToThisTarget; +@property(readwrite, nonatomic, retain) GPUImageMovieWriter *audioEncodingTarget; +@property(readwrite, nonatomic, unsafe_unretained) id targetToIgnoreForUpdates; +@property(nonatomic, copy) void(^frameProcessingCompletionBlock)(GPUImageOutput*, CMTime); +@property(nonatomic) BOOL enabled; +@property(readwrite, nonatomic) GPUTextureOptions outputTextureOptions; + +/// @name Managing targets +- (void)setInputFramebufferForTarget:(id)target atIndex:(NSInteger)inputTextureIndex; +- (GPUImageFramebuffer *)framebufferForOutput; +- (void)removeOutputFramebuffer; +- (void)notifyTargetsAboutNewOutputTexture; + +/** Returns an array of the current targets. + */ +- (NSArray*)targets; + +/** Adds a target to receive notifications when new frames are available. + + The target will be asked for its next available texture. + + See [GPUImageInput newFrameReadyAtTime:] + + @param newTarget Target to be added + */ +- (void)addTarget:(id)newTarget; + +/** Adds a target to receive notifications when new frames are available. + + See [GPUImageInput newFrameReadyAtTime:] + + @param newTarget Target to be added + */ +- (void)addTarget:(id)newTarget atTextureLocation:(NSInteger)textureLocation; + +/** Removes a target. The target will no longer receive notifications when new frames are available. + + @param targetToRemove Target to be removed + */ +- (void)removeTarget:(id)targetToRemove; + +/** Removes all targets. + */ +- (void)removeAllTargets; + +/// @name Manage the output texture + +- (void)forceProcessingAtSize:(CGSize)frameSize; +- (void)forceProcessingAtSizeRespectingAspectRatio:(CGSize)frameSize; + +/// @name Still image processing + +- (void)useNextFrameForImageCapture; +- (CGImageRef)newCGImageFromCurrentlyProcessedOutput; +- (CGImageRef)newCGImageByFilteringCGImage:(CGImageRef)imageToFilter; + +// Platform-specific image output methods +// If you're trying to use these methods, remember that you need to set -useNextFrameForImageCapture before running -processImage or running video and calling any of these methods, or you will get a nil image +#if TARGET_IPHONE_SIMULATOR || TARGET_OS_IPHONE +- (UIImage *)imageFromCurrentFramebuffer; +- (UIImage *)imageFromCurrentFramebufferWithOrientation:(UIImageOrientation)imageOrientation; +- (UIImage *)imageByFilteringImage:(UIImage *)imageToFilter; +- (CGImageRef)newCGImageByFilteringImage:(UIImage *)imageToFilter; +#else +- (NSImage *)imageFromCurrentFramebuffer; +- (NSImage *)imageFromCurrentFramebufferWithOrientation:(UIImageOrientation)imageOrientation; +- (NSImage *)imageByFilteringImage:(NSImage *)imageToFilter; +- (CGImageRef)newCGImageByFilteringImage:(NSImage *)imageToFilter; +#endif + +- (BOOL)providesMonochromeOutput; + +@end diff --git a/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageOverlayBlendFilter.h b/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageOverlayBlendFilter.h new file mode 100755 index 00000000..57eb8402 --- /dev/null +++ b/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageOverlayBlendFilter.h @@ -0,0 +1,5 @@ +#import "GPUImageTwoInputFilter.h" + +@interface GPUImageOverlayBlendFilter : GPUImageTwoInputFilter + +@end diff --git a/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageParallelCoordinateLineTransformFilter.h b/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageParallelCoordinateLineTransformFilter.h new file mode 100755 index 00000000..aa8f3f47 --- /dev/null +++ b/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageParallelCoordinateLineTransformFilter.h @@ -0,0 +1,16 @@ +#import "GPUImageFilter.h" + +// This is an accumulator that uses a Hough transform in parallel coordinate space to identify probable lines in a scene. +// +// It is entirely based on the work of the Graph@FIT research group at the Brno University of Technology and their publications: +// M. Dubská, J. Havel, and A. Herout. Real-Time Detection of Lines using Parallel Coordinates and OpenGL. Proceedings of SCCG 2011, Bratislava, SK, p. 7. +// M. Dubská, J. Havel, and A. Herout. PClines — Line detection using parallel coordinates. 2011 IEEE Conference on Computer Vision and Pattern Recognition (CVPR), p. 1489- 1494. + +@interface GPUImageParallelCoordinateLineTransformFilter : GPUImageFilter +{ + GLubyte *rawImagePixels; + GLfloat *lineCoordinates; + unsigned int maxLinePairsToRender, linePairsToRender; +} + +@end diff --git a/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImagePerlinNoiseFilter.h b/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImagePerlinNoiseFilter.h new file mode 100755 index 00000000..922f4d30 --- /dev/null +++ b/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImagePerlinNoiseFilter.h @@ -0,0 +1,13 @@ +#import "GPUImageFilter.h" + +@interface GPUImagePerlinNoiseFilter : GPUImageFilter +{ + GLint scaleUniform, colorStartUniform, colorFinishUniform; +} + +@property (readwrite, nonatomic) GPUVector4 colorStart; +@property (readwrite, nonatomic) GPUVector4 colorFinish; + +@property (readwrite, nonatomic) float scale; + +@end diff --git a/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImagePicture+TextureSubimage.h b/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImagePicture+TextureSubimage.h new file mode 100755 index 00000000..03c631bc --- /dev/null +++ b/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImagePicture+TextureSubimage.h @@ -0,0 +1,19 @@ +// +// GPUImagePicture+TextureSubimage.h +// GPUImage +// +// Created by Jack Wu on 2014-05-28. +// Copyright (c) 2014 Brad Larson. All rights reserved. +// + +#import "GPUImagePicture.h" + +@interface GPUImagePicture (TextureSubimage) + +- (void)replaceTextureWithSubimage:(UIImage*)subimage; +- (void)replaceTextureWithSubCGImage:(CGImageRef)subimageSource; + +- (void)replaceTextureWithSubimage:(UIImage*)subimage inRect:(CGRect)subRect; +- (void)replaceTextureWithSubCGImage:(CGImageRef)subimageSource inRect:(CGRect)subRect; + +@end diff --git a/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImagePicture.h b/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImagePicture.h new file mode 100755 index 00000000..4c4b9942 --- /dev/null +++ b/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImagePicture.h @@ -0,0 +1,38 @@ +#import +#import "GPUImageOutput.h" + + +@interface GPUImagePicture : GPUImageOutput +{ + CGSize pixelSizeOfImage; + BOOL hasProcessedImage; + + dispatch_semaphore_t imageUpdateSemaphore; +} + +// Initialization and teardown +- (id)initWithURL:(NSURL *)url; +- (id)initWithImage:(UIImage *)newImageSource; +- (id)initWithCGImage:(CGImageRef)newImageSource; +- (id)initWithImage:(UIImage *)newImageSource smoothlyScaleOutput:(BOOL)smoothlyScaleOutput; +- (id)initWithCGImage:(CGImageRef)newImageSource smoothlyScaleOutput:(BOOL)smoothlyScaleOutput; +- (id)initWithImage:(UIImage *)newImageSource removePremultiplication:(BOOL)removePremultiplication; +- (id)initWithCGImage:(CGImageRef)newImageSource removePremultiplication:(BOOL)removePremultiplication; +- (id)initWithImage:(UIImage *)newImageSource smoothlyScaleOutput:(BOOL)smoothlyScaleOutput removePremultiplication:(BOOL)removePremultiplication; +- (id)initWithCGImage:(CGImageRef)newImageSource smoothlyScaleOutput:(BOOL)smoothlyScaleOutput removePremultiplication:(BOOL)removePremultiplication; + +// Image rendering +- (void)processImage; +- (CGSize)outputImageSize; + +/** + * Process image with all targets and filters asynchronously + * The completion handler is called after processing finished in the + * GPU's dispatch queue - and only if this method did not return NO. + * + * @returns NO if resource is blocked and processing is discarded, YES otherwise + */ +- (BOOL)processImageWithCompletionHandler:(void (^)(void))completion; +- (void)processImageUpToFilter:(GPUImageOutput *)finalFilterInChain withCompletionHandler:(void (^)(UIImage *processedImage))block; + +@end diff --git a/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImagePinchDistortionFilter.h b/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImagePinchDistortionFilter.h new file mode 100755 index 00000000..994774fd --- /dev/null +++ b/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImagePinchDistortionFilter.h @@ -0,0 +1,20 @@ +#import "GPUImageFilter.h" + +/** Creates a pinch distortion of the image + */ +@interface GPUImagePinchDistortionFilter : GPUImageFilter +{ + GLint aspectRatioUniform, radiusUniform, centerUniform, scaleUniform; +} + +/** The center about which to apply the distortion, with a default of (0.5, 0.5) + */ +@property(readwrite, nonatomic) CGPoint center; +/** The radius of the distortion, ranging from 0.0 to 2.0, with a default of 1.0 + */ +@property(readwrite, nonatomic) CGFloat radius; +/** The amount of distortion to apply, from -2.0 to 2.0, with a default of 0.5 + */ +@property(readwrite, nonatomic) CGFloat scale; + +@end diff --git a/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImagePixellateFilter.h b/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImagePixellateFilter.h new file mode 100755 index 00000000..d0f6ae04 --- /dev/null +++ b/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImagePixellateFilter.h @@ -0,0 +1,12 @@ +#import "GPUImageFilter.h" + +@interface GPUImagePixellateFilter : GPUImageFilter +{ + GLint fractionalWidthOfAPixelUniform, aspectRatioUniform; +} + +// The fractional width of the image to use as a size for the pixels in the resulting image. Values below one pixel width in the source image are ignored. +@property(readwrite, nonatomic) CGFloat fractionalWidthOfAPixel; + + +@end diff --git a/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImagePixellatePositionFilter.h b/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImagePixellatePositionFilter.h new file mode 100755 index 00000000..9d304c93 --- /dev/null +++ b/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImagePixellatePositionFilter.h @@ -0,0 +1,17 @@ +#import "GPUImageFilter.h" + +@interface GPUImagePixellatePositionFilter : GPUImageFilter +{ + GLint fractionalWidthOfAPixelUniform, aspectRatioUniform, centerUniform, radiusUniform; +} + +// The fractional width of the image to use as a size for the pixels in the resulting image. Values below one pixel width in the source image are ignored. +@property(readwrite, nonatomic) CGFloat fractionalWidthOfAPixel; + +// the center point to start pixelation in texture coordinates, default 0.5, 0.5 +@property(readwrite, nonatomic) CGPoint center; + +// the radius (0.0 - 1.0) in which to pixelate, default 1.0 +@property(readwrite, nonatomic) CGFloat radius; + +@end diff --git a/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImagePoissonBlendFilter.h b/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImagePoissonBlendFilter.h new file mode 100755 index 00000000..58eff225 --- /dev/null +++ b/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImagePoissonBlendFilter.h @@ -0,0 +1,18 @@ +#import "GPUImageTwoInputCrossTextureSamplingFilter.h" +#import "GPUImageFilterGroup.h" + +@interface GPUImagePoissonBlendFilter : GPUImageTwoInputCrossTextureSamplingFilter +{ + GLint mixUniform; + + GPUImageFramebuffer *secondOutputFramebuffer; +} + +// Mix ranges from 0.0 (only image 1) to 1.0 (only image 2 gradients), with 1.0 as the normal level +@property(readwrite, nonatomic) CGFloat mix; + +// The number of times to propagate the gradients. +// Crank this up to 100 or even 1000 if you want to get anywhere near convergence. Yes, this will be slow. +@property(readwrite, nonatomic) NSUInteger numIterations; + +@end \ No newline at end of file diff --git a/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImagePolarPixellateFilter.h b/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImagePolarPixellateFilter.h new file mode 100755 index 00000000..3de6a4d3 --- /dev/null +++ b/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImagePolarPixellateFilter.h @@ -0,0 +1,13 @@ +#import "GPUImageFilter.h" + +@interface GPUImagePolarPixellateFilter : GPUImageFilter { + GLint centerUniform, pixelSizeUniform; +} + +// The center about which to apply the distortion, with a default of (0.5, 0.5) +@property(readwrite, nonatomic) CGPoint center; +// The amount of distortion to apply, from (-2.0, -2.0) to (2.0, 2.0), with a default of (0.05, 0.05) +@property(readwrite, nonatomic) CGSize pixelSize; + + +@end diff --git a/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImagePolkaDotFilter.h b/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImagePolkaDotFilter.h new file mode 100755 index 00000000..369b7737 --- /dev/null +++ b/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImagePolkaDotFilter.h @@ -0,0 +1,10 @@ +#import "GPUImagePixellateFilter.h" + +@interface GPUImagePolkaDotFilter : GPUImagePixellateFilter +{ + GLint dotScalingUniform; +} + +@property(readwrite, nonatomic) CGFloat dotScaling; + +@end diff --git a/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImagePosterizeFilter.h b/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImagePosterizeFilter.h new file mode 100755 index 00000000..6f655b3e --- /dev/null +++ b/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImagePosterizeFilter.h @@ -0,0 +1,14 @@ +#import "GPUImageFilter.h" + +/** This reduces the color dynamic range into the number of steps specified, leading to a cartoon-like simple shading of the image. + */ +@interface GPUImagePosterizeFilter : GPUImageFilter +{ + GLint colorLevelsUniform; +} + +/** The number of color levels to reduce the image space to. This ranges from 1 to 256, with a default of 10. + */ +@property(readwrite, nonatomic) NSUInteger colorLevels; + +@end diff --git a/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImagePrewittEdgeDetectionFilter.h b/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImagePrewittEdgeDetectionFilter.h new file mode 100755 index 00000000..141f8c5f --- /dev/null +++ b/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImagePrewittEdgeDetectionFilter.h @@ -0,0 +1,5 @@ +#import "GPUImageSobelEdgeDetectionFilter.h" + +@interface GPUImagePrewittEdgeDetectionFilter : GPUImageSobelEdgeDetectionFilter + +@end diff --git a/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageRGBClosingFilter.h b/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageRGBClosingFilter.h new file mode 100755 index 00000000..08d13f88 --- /dev/null +++ b/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageRGBClosingFilter.h @@ -0,0 +1,18 @@ +#import "GPUImageFilterGroup.h" + +@class GPUImageRGBErosionFilter; +@class GPUImageRGBDilationFilter; + +// A filter that first performs a dilation on each color channel of an image, followed by an erosion of the same radius. +// This helps to filter out smaller dark elements. + +@interface GPUImageRGBClosingFilter : GPUImageFilterGroup +{ + GPUImageRGBErosionFilter *erosionFilter; + GPUImageRGBDilationFilter *dilationFilter; +} + +- (id)initWithRadius:(NSUInteger)radius; + + +@end diff --git a/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageRGBDilationFilter.h b/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageRGBDilationFilter.h new file mode 100755 index 00000000..68276f84 --- /dev/null +++ b/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageRGBDilationFilter.h @@ -0,0 +1,11 @@ +#import "GPUImageTwoPassTextureSamplingFilter.h" + +// For each pixel, this sets it to the maximum value of each color channel in a rectangular neighborhood extending out dilationRadius pixels from the center. +// This extends out brighter colors, and can be used for abstraction of color images. + +@interface GPUImageRGBDilationFilter : GPUImageTwoPassTextureSamplingFilter + +// Acceptable values for dilationRadius, which sets the distance in pixels to sample out from the center, are 1, 2, 3, and 4. +- (id)initWithRadius:(NSUInteger)dilationRadius; + +@end diff --git a/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageRGBErosionFilter.h b/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageRGBErosionFilter.h new file mode 100755 index 00000000..5979cb7e --- /dev/null +++ b/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageRGBErosionFilter.h @@ -0,0 +1,11 @@ +#import "GPUImageTwoPassTextureSamplingFilter.h" + +// For each pixel, this sets it to the minimum value of each color channel in a rectangular neighborhood extending out dilationRadius pixels from the center. +// This extends out dark features, and can be used for abstraction of color images. + +@interface GPUImageRGBErosionFilter : GPUImageTwoPassTextureSamplingFilter + +// Acceptable values for erosionRadius, which sets the distance in pixels to sample out from the center, are 1, 2, 3, and 4. +- (id)initWithRadius:(NSUInteger)erosionRadius; + +@end diff --git a/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageRGBFilter.h b/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageRGBFilter.h new file mode 100755 index 00000000..18966b1b --- /dev/null +++ b/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageRGBFilter.h @@ -0,0 +1,15 @@ +#import "GPUImageFilter.h" + +@interface GPUImageRGBFilter : GPUImageFilter +{ + GLint redUniform; + GLint greenUniform; + GLint blueUniform; +} + +// Normalized values by which each color channel is multiplied. The range is from 0.0 up, with 1.0 as the default. +@property (readwrite, nonatomic) CGFloat red; +@property (readwrite, nonatomic) CGFloat green; +@property (readwrite, nonatomic) CGFloat blue; + +@end diff --git a/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageRGBOpeningFilter.h b/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageRGBOpeningFilter.h new file mode 100755 index 00000000..dbec75fb --- /dev/null +++ b/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageRGBOpeningFilter.h @@ -0,0 +1,17 @@ +#import "GPUImageFilterGroup.h" + +@class GPUImageRGBErosionFilter; +@class GPUImageRGBDilationFilter; + +// A filter that first performs an erosion on each color channel of an image, followed by a dilation of the same radius. +// This helps to filter out smaller bright elements. + +@interface GPUImageRGBOpeningFilter : GPUImageFilterGroup +{ + GPUImageRGBErosionFilter *erosionFilter; + GPUImageRGBDilationFilter *dilationFilter; +} + +- (id)initWithRadius:(NSUInteger)radius; + +@end diff --git a/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageRawDataInput.h b/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageRawDataInput.h new file mode 100755 index 00000000..6ec4720f --- /dev/null +++ b/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageRawDataInput.h @@ -0,0 +1,43 @@ +#import "GPUImageOutput.h" + +// The bytes passed into this input are not copied or retained, but you are free to deallocate them after they are used by this filter. +// The bytes are uploaded and stored within a texture, so nothing is kept locally. +// The default format for input bytes is GPUPixelFormatBGRA, unless specified with pixelFormat: +// The default type for input bytes is GPUPixelTypeUByte, unless specified with pixelType: + +typedef enum { + GPUPixelFormatBGRA = GL_BGRA, + GPUPixelFormatRGBA = GL_RGBA, + GPUPixelFormatRGB = GL_RGB, + GPUPixelFormatLuminance = GL_LUMINANCE +} GPUPixelFormat; + +typedef enum { + GPUPixelTypeUByte = GL_UNSIGNED_BYTE, + GPUPixelTypeFloat = GL_FLOAT +} GPUPixelType; + +@interface GPUImageRawDataInput : GPUImageOutput +{ + CGSize uploadedImageSize; + + dispatch_semaphore_t dataUpdateSemaphore; +} + +// Initialization and teardown +- (id)initWithBytes:(GLubyte *)bytesToUpload size:(CGSize)imageSize; +- (id)initWithBytes:(GLubyte *)bytesToUpload size:(CGSize)imageSize pixelFormat:(GPUPixelFormat)pixelFormat; +- (id)initWithBytes:(GLubyte *)bytesToUpload size:(CGSize)imageSize pixelFormat:(GPUPixelFormat)pixelFormat type:(GPUPixelType)pixelType; + +/** Input data pixel format + */ +@property (readwrite, nonatomic) GPUPixelFormat pixelFormat; +@property (readwrite, nonatomic) GPUPixelType pixelType; + +// Image rendering +- (void)updateDataFromBytes:(GLubyte *)bytesToUpload size:(CGSize)imageSize; +- (void)processData; +- (void)processDataForTimestamp:(CMTime)frameTime; +- (CGSize)outputImageSize; + +@end diff --git a/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageRawDataOutput.h b/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageRawDataOutput.h new file mode 100755 index 00000000..5a4538c1 --- /dev/null +++ b/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageRawDataOutput.h @@ -0,0 +1,44 @@ +#import +#import "GPUImageContext.h" + +struct GPUByteColorVector { + GLubyte red; + GLubyte green; + GLubyte blue; + GLubyte alpha; +}; +typedef struct GPUByteColorVector GPUByteColorVector; + +@protocol GPUImageRawDataProcessor; + +#if TARGET_IPHONE_SIMULATOR || TARGET_OS_IPHONE +@interface GPUImageRawDataOutput : NSObject { + CGSize imageSize; + GPUImageRotationMode inputRotation; + BOOL outputBGRA; +} +#else +@interface GPUImageRawDataOutput : NSObject { + CGSize imageSize; + GPUImageRotationMode inputRotation; + BOOL outputBGRA; +} +#endif + +@property(readonly) GLubyte *rawBytesForImage; +@property(nonatomic, copy) void(^newFrameAvailableBlock)(void); +@property(nonatomic) BOOL enabled; + +// Initialization and teardown +- (id)initWithImageSize:(CGSize)newImageSize resultsInBGRAFormat:(BOOL)resultsInBGRAFormat; + +// Data access +- (GPUByteColorVector)colorAtLocation:(CGPoint)locationInImage; +- (NSUInteger)bytesPerRowInOutput; + +- (void)setImageSize:(CGSize)newImageSize; + +- (void)lockFramebufferForReading; +- (void)unlockFramebufferAfterReading; + +@end diff --git a/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageSaturationBlendFilter.h b/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageSaturationBlendFilter.h new file mode 100755 index 00000000..767892a5 --- /dev/null +++ b/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageSaturationBlendFilter.h @@ -0,0 +1,5 @@ +#import "GPUImageTwoInputFilter.h" + +@interface GPUImageSaturationBlendFilter : GPUImageTwoInputFilter + +@end diff --git a/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageSaturationFilter.h b/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageSaturationFilter.h new file mode 100755 index 00000000..1c6ff5bd --- /dev/null +++ b/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageSaturationFilter.h @@ -0,0 +1,14 @@ +#import "GPUImageFilter.h" + +/** Adjusts the saturation of an image + */ +@interface GPUImageSaturationFilter : GPUImageFilter +{ + GLint saturationUniform; +} + +/** Saturation ranges from 0.0 (fully desaturated) to 2.0 (max saturation), with 1.0 as the normal level + */ +@property(readwrite, nonatomic) CGFloat saturation; + +@end diff --git a/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageScreenBlendFilter.h b/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageScreenBlendFilter.h new file mode 100755 index 00000000..2df3abf3 --- /dev/null +++ b/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageScreenBlendFilter.h @@ -0,0 +1,7 @@ +#import "GPUImageTwoInputFilter.h" + +@interface GPUImageScreenBlendFilter : GPUImageTwoInputFilter +{ +} + +@end diff --git a/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageSepiaFilter.h b/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageSepiaFilter.h new file mode 100755 index 00000000..a45164fe --- /dev/null +++ b/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageSepiaFilter.h @@ -0,0 +1,6 @@ +#import "GPUImageColorMatrixFilter.h" + +/// Simple sepia tone filter +@interface GPUImageSepiaFilter : GPUImageColorMatrixFilter + +@end diff --git a/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageSharpenFilter.h b/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageSharpenFilter.h new file mode 100755 index 00000000..739df503 --- /dev/null +++ b/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageSharpenFilter.h @@ -0,0 +1,12 @@ +#import "GPUImageFilter.h" + +@interface GPUImageSharpenFilter : GPUImageFilter +{ + GLint sharpnessUniform; + GLint imageWidthFactorUniform, imageHeightFactorUniform; +} + +// Sharpness ranges from -4.0 to 4.0, with 0.0 as the normal level +@property(readwrite, nonatomic) CGFloat sharpness; + +@end diff --git a/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageShiTomasiFeatureDetectionFilter.h b/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageShiTomasiFeatureDetectionFilter.h new file mode 100755 index 00000000..b16ebc01 --- /dev/null +++ b/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageShiTomasiFeatureDetectionFilter.h @@ -0,0 +1,13 @@ +#import "GPUImageHarrisCornerDetectionFilter.h" + +/** Shi-Tomasi feature detector + + This is the Shi-Tomasi feature detector, as described in + J. Shi and C. Tomasi. Good features to track. Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 593-600, June 1994. + */ + +@interface GPUImageShiTomasiFeatureDetectionFilter : GPUImageHarrisCornerDetectionFilter + +// Compared to the Harris corner detector, the default sensitivity value for this detector is set to 1.5 + +@end diff --git a/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageSingleComponentGaussianBlurFilter.h b/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageSingleComponentGaussianBlurFilter.h new file mode 100755 index 00000000..934b1e3a --- /dev/null +++ b/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageSingleComponentGaussianBlurFilter.h @@ -0,0 +1,7 @@ +#import "GPUImageGaussianBlurFilter.h" + +// This filter merely performs the standard Gaussian blur on the red color channel (assuming a luminance image) + +@interface GPUImageSingleComponentGaussianBlurFilter : GPUImageGaussianBlurFilter + +@end diff --git a/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageSketchFilter.h b/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageSketchFilter.h new file mode 100755 index 00000000..598145ae --- /dev/null +++ b/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageSketchFilter.h @@ -0,0 +1,11 @@ +#import "GPUImageSobelEdgeDetectionFilter.h" + +/** Converts video to look like a sketch. + + This is just the Sobel edge detection filter with the colors inverted. + */ +@interface GPUImageSketchFilter : GPUImageSobelEdgeDetectionFilter +{ +} + +@end diff --git a/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageSmoothToonFilter.h b/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageSmoothToonFilter.h new file mode 100755 index 00000000..f89caac5 --- /dev/null +++ b/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageSmoothToonFilter.h @@ -0,0 +1,28 @@ +#import "GPUImageFilterGroup.h" + +@class GPUImageGaussianBlurFilter; +@class GPUImageToonFilter; + +/** This uses a similar process as the GPUImageToonFilter, only it precedes the toon effect with a Gaussian blur to smooth out noise. + */ +@interface GPUImageSmoothToonFilter : GPUImageFilterGroup +{ + GPUImageGaussianBlurFilter *blurFilter; + GPUImageToonFilter *toonFilter; +} + +/// The image width and height factors tweak the appearance of the edges. By default, they match the filter size in pixels +@property(readwrite, nonatomic) CGFloat texelWidth; +/// The image width and height factors tweak the appearance of the edges. By default, they match the filter size in pixels +@property(readwrite, nonatomic) CGFloat texelHeight; + +/// The radius of the underlying Gaussian blur. The default is 2.0. +@property (readwrite, nonatomic) CGFloat blurRadiusInPixels; + +/// The threshold at which to apply the edges, default of 0.2 +@property(readwrite, nonatomic) CGFloat threshold; + +/// The levels of quantization for the posterization of colors within the scene, with a default of 10.0 +@property(readwrite, nonatomic) CGFloat quantizationLevels; + +@end diff --git a/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageSobelEdgeDetectionFilter.h b/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageSobelEdgeDetectionFilter.h new file mode 100755 index 00000000..d6b2c13a --- /dev/null +++ b/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageSobelEdgeDetectionFilter.h @@ -0,0 +1,16 @@ +#import "GPUImageTwoPassFilter.h" + +@interface GPUImageSobelEdgeDetectionFilter : GPUImageTwoPassFilter +{ + GLint texelWidthUniform, texelHeightUniform, edgeStrengthUniform; + BOOL hasOverriddenImageSizeFactor; +} + +// The texel width and height factors tweak the appearance of the edges. By default, they match the inverse of the filter size in pixels +@property(readwrite, nonatomic) CGFloat texelWidth; +@property(readwrite, nonatomic) CGFloat texelHeight; + +// The filter strength property affects the dynamic range of the filter. High values can make edges more visible, but can lead to saturation. Default of 1.0. +@property(readwrite, nonatomic) CGFloat edgeStrength; + +@end diff --git a/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageSoftEleganceFilter.h b/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageSoftEleganceFilter.h new file mode 100755 index 00000000..596e1567 --- /dev/null +++ b/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageSoftEleganceFilter.h @@ -0,0 +1,19 @@ +#import "GPUImageFilterGroup.h" + +@class GPUImagePicture; + +/** A photo filter based on Soft Elegance Photoshop action + http://h-d-stock.deviantart.com/art/H-D-A-soft-elegance-70107603 + */ + +// Note: If you want to use this effect you have to add +// lookup_soft_elegance_1.png and lookup_soft_elegance_2.png +// from Resources folder to your application bundle. + +@interface GPUImageSoftEleganceFilter : GPUImageFilterGroup +{ + GPUImagePicture *lookupImageSource1; + GPUImagePicture *lookupImageSource2; +} + +@end diff --git a/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageSoftLightBlendFilter.h b/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageSoftLightBlendFilter.h new file mode 100755 index 00000000..13fc877c --- /dev/null +++ b/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageSoftLightBlendFilter.h @@ -0,0 +1,7 @@ +#import "GPUImageTwoInputFilter.h" + +@interface GPUImageSoftLightBlendFilter : GPUImageTwoInputFilter +{ +} + +@end diff --git a/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageSolarizeFilter.h b/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageSolarizeFilter.h new file mode 100755 index 00000000..ba01c15a --- /dev/null +++ b/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageSolarizeFilter.h @@ -0,0 +1,14 @@ +#import "GPUImageFilter.h" + +/** Pixels with a luminance above the threshold will invert their color + */ +@interface GPUImageSolarizeFilter : GPUImageFilter +{ + GLint thresholdUniform; +} + +/** Anything above this luminance will be inverted, and anything below normal. Ranges from 0.0 to 1.0, with 0.5 as the default + */ +@property(readwrite, nonatomic) CGFloat threshold; + +@end \ No newline at end of file diff --git a/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageSolidColorGenerator.h b/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageSolidColorGenerator.h new file mode 100755 index 00000000..58b1383e --- /dev/null +++ b/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageSolidColorGenerator.h @@ -0,0 +1,19 @@ +#import "GPUImageFilter.h" + +// This outputs an image with a constant color. You need to use -forceProcessingAtSize: in order to set the output image +// dimensions, or this won't work correctly + + +@interface GPUImageSolidColorGenerator : GPUImageFilter +{ + GLint colorUniform; + GLint useExistingAlphaUniform; +} + +// This color dictates what the output image will be filled with +@property(readwrite, nonatomic) GPUVector4 color; +@property(readwrite, nonatomic, assign) BOOL useExistingAlpha; // whether to use the alpha of the existing image or not, default is NO + +- (void)setColorRed:(CGFloat)redComponent green:(CGFloat)greenComponent blue:(CGFloat)blueComponent alpha:(CGFloat)alphaComponent; + +@end diff --git a/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageSourceOverBlendFilter.h b/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageSourceOverBlendFilter.h new file mode 100755 index 00000000..29e30635 --- /dev/null +++ b/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageSourceOverBlendFilter.h @@ -0,0 +1,5 @@ +#import "GPUImageTwoInputFilter.h" + +@interface GPUImageSourceOverBlendFilter : GPUImageTwoInputFilter + +@end diff --git a/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageSphereRefractionFilter.h b/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageSphereRefractionFilter.h new file mode 100755 index 00000000..cbbd2afa --- /dev/null +++ b/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageSphereRefractionFilter.h @@ -0,0 +1,15 @@ +#import "GPUImageFilter.h" + +@interface GPUImageSphereRefractionFilter : GPUImageFilter +{ + GLint radiusUniform, centerUniform, aspectRatioUniform, refractiveIndexUniform; +} + +/// The center about which to apply the distortion, with a default of (0.5, 0.5) +@property(readwrite, nonatomic) CGPoint center; +/// The radius of the distortion, ranging from 0.0 to 1.0, with a default of 0.25 +@property(readwrite, nonatomic) CGFloat radius; +/// The index of refraction for the sphere, with a default of 0.71 +@property(readwrite, nonatomic) CGFloat refractiveIndex; + +@end diff --git a/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageStillCamera.h b/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageStillCamera.h new file mode 100755 index 00000000..e4db59b2 --- /dev/null +++ b/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageStillCamera.h @@ -0,0 +1,24 @@ +#import "GPUImageVideoCamera.h" + +void stillImageDataReleaseCallback(void *releaseRefCon, const void *baseAddress); +void GPUImageCreateResizedSampleBuffer(CVPixelBufferRef cameraFrame, CGSize finalSize, CMSampleBufferRef *sampleBuffer); + +@interface GPUImageStillCamera : GPUImageVideoCamera + +/** The JPEG compression quality to use when capturing a photo as a JPEG. + */ +@property CGFloat jpegCompressionQuality; + +// Only reliably set inside the context of the completion handler of one of the capture methods +@property (readonly) NSDictionary *currentCaptureMetadata; + +// Photography controls +- (void)capturePhotoAsSampleBufferWithCompletionHandler:(void (^)(CMSampleBufferRef imageSampleBuffer, NSError *error))block; +- (void)capturePhotoAsImageProcessedUpToFilter:(GPUImageOutput *)finalFilterInChain withCompletionHandler:(void (^)(UIImage *processedImage, NSError *error))block; +- (void)capturePhotoAsImageProcessedUpToFilter:(GPUImageOutput *)finalFilterInChain withOrientation:(UIImageOrientation)orientation withCompletionHandler:(void (^)(UIImage *processedImage, NSError *error))block; +- (void)capturePhotoAsJPEGProcessedUpToFilter:(GPUImageOutput *)finalFilterInChain withCompletionHandler:(void (^)(NSData *processedJPEG, NSError *error))block; +- (void)capturePhotoAsJPEGProcessedUpToFilter:(GPUImageOutput *)finalFilterInChain withOrientation:(UIImageOrientation)orientation withCompletionHandler:(void (^)(NSData *processedJPEG, NSError *error))block; +- (void)capturePhotoAsPNGProcessedUpToFilter:(GPUImageOutput *)finalFilterInChain withCompletionHandler:(void (^)(NSData *processedPNG, NSError *error))block; +- (void)capturePhotoAsPNGProcessedUpToFilter:(GPUImageOutput *)finalFilterInChain withOrientation:(UIImageOrientation)orientation withCompletionHandler:(void (^)(NSData *processedPNG, NSError *error))block; + +@end diff --git a/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageStretchDistortionFilter.h b/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageStretchDistortionFilter.h new file mode 100755 index 00000000..07803095 --- /dev/null +++ b/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageStretchDistortionFilter.h @@ -0,0 +1,13 @@ +#import "GPUImageFilter.h" + +/** Creates a stretch distortion of the image + */ +@interface GPUImageStretchDistortionFilter : GPUImageFilter { + GLint centerUniform; +} + +/** The center about which to apply the distortion, with a default of (0.5, 0.5) + */ +@property(readwrite, nonatomic) CGPoint center; + +@end diff --git a/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageSubtractBlendFilter.h b/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageSubtractBlendFilter.h new file mode 100755 index 00000000..8dee8215 --- /dev/null +++ b/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageSubtractBlendFilter.h @@ -0,0 +1,5 @@ +#import "GPUImageTwoInputFilter.h" + +@interface GPUImageSubtractBlendFilter : GPUImageTwoInputFilter + +@end diff --git a/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageSwirlFilter.h b/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageSwirlFilter.h new file mode 100755 index 00000000..ed7d0122 --- /dev/null +++ b/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageSwirlFilter.h @@ -0,0 +1,17 @@ +#import "GPUImageFilter.h" + +/** Creates a swirl distortion on the image + */ +@interface GPUImageSwirlFilter : GPUImageFilter +{ + GLint radiusUniform, centerUniform, angleUniform; +} + +/// The center about which to apply the distortion, with a default of (0.5, 0.5) +@property(readwrite, nonatomic) CGPoint center; +/// The radius of the distortion, ranging from 0.0 to 1.0, with a default of 0.5 +@property(readwrite, nonatomic) CGFloat radius; +/// The amount of distortion to apply, with a minimum of 0.0 and a default of 1.0 +@property(readwrite, nonatomic) CGFloat angle; + +@end diff --git a/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageTextureInput.h b/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageTextureInput.h new file mode 100755 index 00000000..8190305d --- /dev/null +++ b/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageTextureInput.h @@ -0,0 +1,14 @@ +#import "GPUImageOutput.h" + +@interface GPUImageTextureInput : GPUImageOutput +{ + CGSize textureSize; +} + +// Initialization and teardown +- (id)initWithTexture:(GLuint)newInputTexture size:(CGSize)newTextureSize; + +// Image rendering +- (void)processTextureWithFrameTime:(CMTime)frameTime; + +@end diff --git a/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageTextureOutput.h b/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageTextureOutput.h new file mode 100755 index 00000000..05e1f36e --- /dev/null +++ b/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageTextureOutput.h @@ -0,0 +1,21 @@ +#import +#import "GPUImageContext.h" + +@protocol GPUImageTextureOutputDelegate; + +@interface GPUImageTextureOutput : NSObject +{ + GPUImageFramebuffer *firstInputFramebuffer; +} + +@property(readwrite, unsafe_unretained, nonatomic) id delegate; +@property(readonly) GLuint texture; +@property(nonatomic) BOOL enabled; + +- (void)doneWithTexture; + +@end + +@protocol GPUImageTextureOutputDelegate +- (void)newFrameReadyFromTextureOutput:(GPUImageTextureOutput *)callbackTextureOutput; +@end diff --git a/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageThreeInputFilter.h b/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageThreeInputFilter.h new file mode 100755 index 00000000..5ecd53e0 --- /dev/null +++ b/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageThreeInputFilter.h @@ -0,0 +1,21 @@ +#import "GPUImageTwoInputFilter.h" + +extern NSString *const kGPUImageThreeInputTextureVertexShaderString; + +@interface GPUImageThreeInputFilter : GPUImageTwoInputFilter +{ + GPUImageFramebuffer *thirdInputFramebuffer; + + GLint filterThirdTextureCoordinateAttribute; + GLint filterInputTextureUniform3; + GPUImageRotationMode inputRotation3; + GLuint filterSourceTexture3; + CMTime thirdFrameTime; + + BOOL hasSetSecondTexture, hasReceivedThirdFrame, thirdFrameWasVideo; + BOOL thirdFrameCheckDisabled; +} + +- (void)disableThirdFrameCheck; + +@end diff --git a/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageThresholdEdgeDetectionFilter.h b/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageThresholdEdgeDetectionFilter.h new file mode 100755 index 00000000..2036030c --- /dev/null +++ b/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageThresholdEdgeDetectionFilter.h @@ -0,0 +1,12 @@ +#import "GPUImageSobelEdgeDetectionFilter.h" + +@interface GPUImageThresholdEdgeDetectionFilter : GPUImageSobelEdgeDetectionFilter +{ + GLint thresholdUniform; +} + +/** Any edge above this threshold will be black, and anything below white. Ranges from 0.0 to 1.0, with 0.8 as the default + */ +@property(readwrite, nonatomic) CGFloat threshold; + +@end diff --git a/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageThresholdSketchFilter.h b/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageThresholdSketchFilter.h new file mode 100755 index 00000000..fda58979 --- /dev/null +++ b/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageThresholdSketchFilter.h @@ -0,0 +1,5 @@ +#import "GPUImageThresholdEdgeDetectionFilter.h" + +@interface GPUImageThresholdSketchFilter : GPUImageThresholdEdgeDetectionFilter + +@end diff --git a/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageThresholdedNonMaximumSuppressionFilter.h b/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageThresholdedNonMaximumSuppressionFilter.h new file mode 100755 index 00000000..9c6e5d72 --- /dev/null +++ b/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageThresholdedNonMaximumSuppressionFilter.h @@ -0,0 +1,14 @@ +#import "GPUImage3x3TextureSamplingFilter.h" + +@interface GPUImageThresholdedNonMaximumSuppressionFilter : GPUImage3x3TextureSamplingFilter +{ + GLint thresholdUniform; +} + +/** Any local maximum above this threshold will be white, and anything below black. Ranges from 0.0 to 1.0, with 0.8 as the default + */ +@property(readwrite, nonatomic) CGFloat threshold; + +- (id)initWithPackedColorspace:(BOOL)inputUsesPackedColorspace; + +@end diff --git a/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageTiltShiftFilter.h b/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageTiltShiftFilter.h new file mode 100755 index 00000000..e41adee7 --- /dev/null +++ b/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageTiltShiftFilter.h @@ -0,0 +1,24 @@ +#import "GPUImageFilterGroup.h" + +@class GPUImageGaussianBlurFilter; + +/// A simulated tilt shift lens effect +@interface GPUImageTiltShiftFilter : GPUImageFilterGroup +{ + GPUImageGaussianBlurFilter *blurFilter; + GPUImageFilter *tiltShiftFilter; +} + +/// The radius of the underlying blur, in pixels. This is 7.0 by default. +@property(readwrite, nonatomic) CGFloat blurRadiusInPixels; + +/// The normalized location of the top of the in-focus area in the image, this value should be lower than bottomFocusLevel, default 0.4 +@property(readwrite, nonatomic) CGFloat topFocusLevel; + +/// The normalized location of the bottom of the in-focus area in the image, this value should be higher than topFocusLevel, default 0.6 +@property(readwrite, nonatomic) CGFloat bottomFocusLevel; + +/// The rate at which the image gets blurry away from the in-focus region, default 0.2 +@property(readwrite, nonatomic) CGFloat focusFallOffRate; + +@end diff --git a/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageToneCurveFilter.h b/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageToneCurveFilter.h new file mode 100755 index 00000000..ff4ae92e --- /dev/null +++ b/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageToneCurveFilter.h @@ -0,0 +1,30 @@ +#import "GPUImageFilter.h" + +@interface GPUImageToneCurveFilter : GPUImageFilter + +@property(readwrite, nonatomic, copy) NSArray *redControlPoints; +@property(readwrite, nonatomic, copy) NSArray *greenControlPoints; +@property(readwrite, nonatomic, copy) NSArray *blueControlPoints; +@property(readwrite, nonatomic, copy) NSArray *rgbCompositeControlPoints; + +// Initialization and teardown +- (id)initWithACVData:(NSData*)data; + +- (id)initWithACV:(NSString*)curveFilename; +- (id)initWithACVURL:(NSURL*)curveFileURL; + +// This lets you set all three red, green, and blue tone curves at once. +// NOTE: Deprecated this function because this effect can be accomplished +// using the rgbComposite channel rather then setting all 3 R, G, and B channels. +- (void)setRGBControlPoints:(NSArray *)points DEPRECATED_ATTRIBUTE; + +- (void)setPointsWithACV:(NSString*)curveFilename; +- (void)setPointsWithACVURL:(NSURL*)curveFileURL; + +// Curve calculation +- (NSMutableArray *)getPreparedSplineCurve:(NSArray *)points; +- (NSMutableArray *)splineCurve:(NSArray *)points; +- (NSMutableArray *)secondDerivative:(NSArray *)cgPoints; +- (void)updateToneCurveTexture; + +@end diff --git a/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageToonFilter.h b/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageToonFilter.h new file mode 100755 index 00000000..ef8e17c3 --- /dev/null +++ b/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageToonFilter.h @@ -0,0 +1,19 @@ +#import "GPUImage3x3TextureSamplingFilter.h" + +/** This uses Sobel edge detection to place a black border around objects, + and then it quantizes the colors present in the image to give a cartoon-like quality to the image. + */ +@interface GPUImageToonFilter : GPUImage3x3TextureSamplingFilter +{ + GLint thresholdUniform, quantizationLevelsUniform; +} + +/** The threshold at which to apply the edges, default of 0.2 + */ +@property(readwrite, nonatomic) CGFloat threshold; + +/** The levels of quantization for the posterization of colors within the scene, with a default of 10.0 + */ +@property(readwrite, nonatomic) CGFloat quantizationLevels; + +@end diff --git a/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageTransformFilter.h b/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageTransformFilter.h new file mode 100755 index 00000000..9865b853 --- /dev/null +++ b/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageTransformFilter.h @@ -0,0 +1,19 @@ +#import "GPUImageFilter.h" + +@interface GPUImageTransformFilter : GPUImageFilter +{ + GLint transformMatrixUniform, orthographicMatrixUniform; + GPUMatrix4x4 orthographicMatrix; +} + +// You can either set the transform to apply to be a 2-D affine transform or a 3-D transform. The default is the identity transform (the output image is identical to the input). +@property(readwrite, nonatomic) CGAffineTransform affineTransform; +@property(readwrite, nonatomic) CATransform3D transform3D; + +// This applies the transform to the raw frame data if set to YES, the default of NO takes the aspect ratio of the image input into account when rotating +@property(readwrite, nonatomic) BOOL ignoreAspectRatio; + +// sets the anchor point to top left corner +@property(readwrite, nonatomic) BOOL anchorTopLeft; + +@end diff --git a/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageTwoInputCrossTextureSamplingFilter.h b/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageTwoInputCrossTextureSamplingFilter.h new file mode 100755 index 00000000..64eac9dc --- /dev/null +++ b/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageTwoInputCrossTextureSamplingFilter.h @@ -0,0 +1,15 @@ +#import "GPUImageTwoInputFilter.h" + +@interface GPUImageTwoInputCrossTextureSamplingFilter : GPUImageTwoInputFilter +{ + GLint texelWidthUniform, texelHeightUniform; + + CGFloat texelWidth, texelHeight; + BOOL hasOverriddenImageSizeFactor; +} + +// The texel width and height determines how far out to sample from this texel. By default, this is the normalized width of a pixel, but this can be overridden for different effects. +@property(readwrite, nonatomic) CGFloat texelWidth; +@property(readwrite, nonatomic) CGFloat texelHeight; + +@end diff --git a/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageTwoInputFilter.h b/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageTwoInputFilter.h new file mode 100755 index 00000000..da3a1345 --- /dev/null +++ b/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageTwoInputFilter.h @@ -0,0 +1,21 @@ +#import "GPUImageFilter.h" + +extern NSString *const kGPUImageTwoInputTextureVertexShaderString; + +@interface GPUImageTwoInputFilter : GPUImageFilter +{ + GPUImageFramebuffer *secondInputFramebuffer; + + GLint filterSecondTextureCoordinateAttribute; + GLint filterInputTextureUniform2; + GPUImageRotationMode inputRotation2; + CMTime firstFrameTime, secondFrameTime; + + BOOL hasSetFirstTexture, hasReceivedFirstFrame, hasReceivedSecondFrame, firstFrameWasVideo, secondFrameWasVideo; + BOOL firstFrameCheckDisabled, secondFrameCheckDisabled; +} + +- (void)disableFirstFrameCheck; +- (void)disableSecondFrameCheck; + +@end diff --git a/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageTwoPassFilter.h b/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageTwoPassFilter.h new file mode 100755 index 00000000..23087f35 --- /dev/null +++ b/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageTwoPassFilter.h @@ -0,0 +1,19 @@ +#import "GPUImageFilter.h" + +@interface GPUImageTwoPassFilter : GPUImageFilter +{ + GPUImageFramebuffer *secondOutputFramebuffer; + + GLProgram *secondFilterProgram; + GLint secondFilterPositionAttribute, secondFilterTextureCoordinateAttribute; + GLint secondFilterInputTextureUniform, secondFilterInputTextureUniform2; + + NSMutableDictionary *secondProgramUniformStateRestorationBlocks; +} + +// Initialization and teardown +- (id)initWithFirstStageVertexShaderFromString:(NSString *)firstStageVertexShaderString firstStageFragmentShaderFromString:(NSString *)firstStageFragmentShaderString secondStageVertexShaderFromString:(NSString *)secondStageVertexShaderString secondStageFragmentShaderFromString:(NSString *)secondStageFragmentShaderString; +- (id)initWithFirstStageFragmentShaderFromString:(NSString *)firstStageFragmentShaderString secondStageFragmentShaderFromString:(NSString *)secondStageFragmentShaderString; +- (void)initializeSecondaryAttributes; + +@end diff --git a/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageTwoPassTextureSamplingFilter.h b/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageTwoPassTextureSamplingFilter.h new file mode 100755 index 00000000..73ab79d3 --- /dev/null +++ b/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageTwoPassTextureSamplingFilter.h @@ -0,0 +1,13 @@ +#import "GPUImageTwoPassFilter.h" + +@interface GPUImageTwoPassTextureSamplingFilter : GPUImageTwoPassFilter +{ + GLint verticalPassTexelWidthOffsetUniform, verticalPassTexelHeightOffsetUniform, horizontalPassTexelWidthOffsetUniform, horizontalPassTexelHeightOffsetUniform; + GLfloat verticalPassTexelWidthOffset, verticalPassTexelHeightOffset, horizontalPassTexelWidthOffset, horizontalPassTexelHeightOffset; + CGFloat _verticalTexelSpacing, _horizontalTexelSpacing; +} + +// This sets the spacing between texels (in pixels) when sampling for the first. By default, this is 1.0 +@property(readwrite, nonatomic) CGFloat verticalTexelSpacing, horizontalTexelSpacing; + +@end diff --git a/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageUIElement.h b/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageUIElement.h new file mode 100755 index 00000000..984ff2ad --- /dev/null +++ b/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageUIElement.h @@ -0,0 +1,15 @@ +#import "GPUImageOutput.h" + +@interface GPUImageUIElement : GPUImageOutput + +// Initialization and teardown +- (id)initWithView:(UIView *)inputView; +- (id)initWithLayer:(CALayer *)inputLayer; + +// Layer management +- (CGSize)layerSizeInPixels; +- (void)update; +- (void)updateUsingCurrentTime; +- (void)updateWithTimestamp:(CMTime)frameTime; + +@end diff --git a/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageUnsharpMaskFilter.h b/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageUnsharpMaskFilter.h new file mode 100755 index 00000000..9d8aff01 --- /dev/null +++ b/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageUnsharpMaskFilter.h @@ -0,0 +1,16 @@ +#import "GPUImageFilterGroup.h" + +@class GPUImageGaussianBlurFilter; + +@interface GPUImageUnsharpMaskFilter : GPUImageFilterGroup +{ + GPUImageGaussianBlurFilter *blurFilter; + GPUImageFilter *unsharpMaskFilter; +} +// The blur radius of the underlying Gaussian blur. The default is 4.0. +@property (readwrite, nonatomic) CGFloat blurRadiusInPixels; + +// The strength of the sharpening, from 0.0 on up, with a default of 1.0 +@property(readwrite, nonatomic) CGFloat intensity; + +@end diff --git a/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageVideoCamera.h b/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageVideoCamera.h new file mode 100755 index 00000000..458020cf --- /dev/null +++ b/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageVideoCamera.h @@ -0,0 +1,156 @@ +#import +#import +#import +#import "GPUImageContext.h" +#import "GPUImageOutput.h" +#import "GPUImageColorConversion.h" + +//Optionally override the YUV to RGB matrices +void setColorConversion601( GLfloat conversionMatrix[9] ); +void setColorConversion601FullRange( GLfloat conversionMatrix[9] ); +void setColorConversion709( GLfloat conversionMatrix[9] ); + + +//Delegate Protocal for Face Detection. +@protocol GPUImageVideoCameraDelegate + +@optional +- (void)willOutputSampleBuffer:(CMSampleBufferRef)sampleBuffer; +@end + + +/** + A GPUImageOutput that provides frames from either camera +*/ +@interface GPUImageVideoCamera : GPUImageOutput +{ + NSUInteger numberOfFramesCaptured; + CGFloat totalFrameTimeDuringCapture; + + AVCaptureSession *_captureSession; + AVCaptureDevice *_inputCamera; + AVCaptureDevice *_microphone; + AVCaptureDeviceInput *videoInput; + AVCaptureVideoDataOutput *videoOutput; + + BOOL capturePaused; + GPUImageRotationMode outputRotation, internalRotation; + dispatch_semaphore_t frameRenderingSemaphore; + + BOOL captureAsYUV; + GLuint luminanceTexture, chrominanceTexture; + + __unsafe_unretained id _delegate; +} + +/// Whether or not the underlying AVCaptureSession is running +@property(readonly, nonatomic) BOOL isRunning; + +/// The AVCaptureSession used to capture from the camera +@property(readonly, retain, nonatomic) AVCaptureSession *captureSession; + +/// This enables the capture session preset to be changed on the fly +@property (readwrite, nonatomic, copy) NSString *captureSessionPreset; + +/// This sets the frame rate of the camera (iOS 5 and above only) +/** + Setting this to 0 or below will set the frame rate back to the default setting for a particular preset. + */ +@property (readwrite) int32_t frameRate; + +/// Easy way to tell which cameras are present on device +@property (readonly, getter = isFrontFacingCameraPresent) BOOL frontFacingCameraPresent; +@property (readonly, getter = isBackFacingCameraPresent) BOOL backFacingCameraPresent; + +/// This enables the benchmarking mode, which logs out instantaneous and average frame times to the console +@property(readwrite, nonatomic) BOOL runBenchmark; + +/// Use this property to manage camera settings. Focus point, exposure point, etc. +@property(readonly) AVCaptureDevice *inputCamera; + +/// This determines the rotation applied to the output image, based on the source material +@property(readwrite, nonatomic) UIInterfaceOrientation outputImageOrientation; + +/// These properties determine whether or not the two camera orientations should be mirrored. By default, both are NO. +@property(readwrite, nonatomic) BOOL horizontallyMirrorFrontFacingCamera, horizontallyMirrorRearFacingCamera; + +@property(nonatomic, assign) id delegate; + +/// @name Initialization and teardown + +/** Begin a capture session + + See AVCaptureSession for acceptable values + + @param sessionPreset Session preset to use + @param cameraPosition Camera to capture from + */ +- (id)initWithSessionPreset:(NSString *)sessionPreset cameraPosition:(AVCaptureDevicePosition)cameraPosition; + +/** Add audio capture to the session. Adding inputs and outputs freezes the capture session momentarily, so you + can use this method to add the audio inputs and outputs early, if you're going to set the audioEncodingTarget + later. Returns YES is the audio inputs and outputs were added, or NO if they had already been added. + */ +- (BOOL)addAudioInputsAndOutputs; + +/** Remove the audio capture inputs and outputs from this session. Returns YES if the audio inputs and outputs + were removed, or NO is they hadn't already been added. + */ +- (BOOL)removeAudioInputsAndOutputs; + +/** Tear down the capture session + */ +- (void)removeInputsAndOutputs; + +/// @name Manage the camera video stream + +/** Start camera capturing + */ +- (void)startCameraCapture; + +/** Stop camera capturing + */ +- (void)stopCameraCapture; + +/** Pause camera capturing + */ +- (void)pauseCameraCapture; + +/** Resume camera capturing + */ +- (void)resumeCameraCapture; + +/** Process a video sample + @param sampleBuffer Buffer to process + */ +- (void)processVideoSampleBuffer:(CMSampleBufferRef)sampleBuffer; + +/** Process an audio sample + @param sampleBuffer Buffer to process + */ +- (void)processAudioSampleBuffer:(CMSampleBufferRef)sampleBuffer; + +/** Get the position (front, rear) of the source camera + */ +- (AVCaptureDevicePosition)cameraPosition; + +/** Get the AVCaptureConnection of the source camera + */ +- (AVCaptureConnection *)videoCaptureConnection; + +/** This flips between the front and rear cameras + */ +- (void)rotateCamera; + +/// @name Benchmarking + +/** When benchmarking is enabled, this will keep a running average of the time from uploading, processing, and final recording or display + */ +- (CGFloat)averageFrameDurationDuringCapture; + +- (void)resetBenchmarkAverage; + ++ (BOOL)isBackFacingCameraPresent; ++ (BOOL)isFrontFacingCameraPresent; + +@end diff --git a/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageView.h b/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageView.h new file mode 100755 index 00000000..b42651d3 --- /dev/null +++ b/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageView.h @@ -0,0 +1,41 @@ +#import +#import "GPUImageContext.h" + +typedef NS_ENUM(NSUInteger, GPUImageFillModeType) { + kGPUImageFillModeStretch, // Stretch to fill the full view, which may distort the image outside of its normal aspect ratio + kGPUImageFillModePreserveAspectRatio, // Maintains the aspect ratio of the source image, adding bars of the specified background color + kGPUImageFillModePreserveAspectRatioAndFill // Maintains the aspect ratio of the source image, zooming in on its center to fill the view +}; + + + +/** + UIView subclass to use as an endpoint for displaying GPUImage outputs + */ +@interface GPUImageView : UIView +{ + GPUImageRotationMode inputRotation; +} + +/** The fill mode dictates how images are fit in the view, with the default being kGPUImageFillModePreserveAspectRatio + */ +@property(readwrite, nonatomic) GPUImageFillModeType fillMode; + +/** This calculates the current display size, in pixels, taking into account Retina scaling factors + */ +@property(readonly, nonatomic) CGSize sizeInPixels; + +@property(nonatomic) BOOL enabled; + +/** Handling fill mode + + @param redComponent Red component for background color + @param greenComponent Green component for background color + @param blueComponent Blue component for background color + @param alphaComponent Alpha component for background color + */ +- (void)setBackgroundColorRed:(GLfloat)redComponent green:(GLfloat)greenComponent blue:(GLfloat)blueComponent alpha:(GLfloat)alphaComponent; + +- (void)setCurrentlyReceivingMonochromeInput:(BOOL)newValue; + +@end diff --git a/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageVignetteFilter.h b/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageVignetteFilter.h new file mode 100755 index 00000000..37be9449 --- /dev/null +++ b/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageVignetteFilter.h @@ -0,0 +1,22 @@ +#import "GPUImageFilter.h" + +/** Performs a vignetting effect, fading out the image at the edges + */ +@interface GPUImageVignetteFilter : GPUImageFilter +{ + GLint vignetteCenterUniform, vignetteColorUniform, vignetteStartUniform, vignetteEndUniform; +} + +// the center for the vignette in tex coords (defaults to 0.5, 0.5) +@property (nonatomic, readwrite) CGPoint vignetteCenter; + +// The color to use for the Vignette (defaults to black) +@property (nonatomic, readwrite) GPUVector3 vignetteColor; + +// The normalized distance from the center where the vignette effect starts. Default of 0.5. +@property (nonatomic, readwrite) CGFloat vignetteStart; + +// The normalized distance from the center where the vignette effect ends. Default of 0.75. +@property (nonatomic, readwrite) CGFloat vignetteEnd; + +@end diff --git a/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageVoronoiConsumerFilter.h b/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageVoronoiConsumerFilter.h new file mode 100755 index 00000000..659e39d5 --- /dev/null +++ b/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageVoronoiConsumerFilter.h @@ -0,0 +1,10 @@ +#import "GPUImageTwoInputFilter.h" + +@interface GPUImageVoronoiConsumerFilter : GPUImageTwoInputFilter +{ + GLint sizeUniform; +} + +@property (nonatomic, readwrite) CGSize sizeInPixels; + +@end diff --git a/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageWeakPixelInclusionFilter.h b/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageWeakPixelInclusionFilter.h new file mode 100755 index 00000000..44b76c6a --- /dev/null +++ b/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageWeakPixelInclusionFilter.h @@ -0,0 +1,5 @@ +#import "GPUImage3x3TextureSamplingFilter.h" + +@interface GPUImageWeakPixelInclusionFilter : GPUImage3x3TextureSamplingFilter + +@end diff --git a/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageWhiteBalanceFilter.h b/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageWhiteBalanceFilter.h new file mode 100755 index 00000000..6b09c33d --- /dev/null +++ b/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageWhiteBalanceFilter.h @@ -0,0 +1,17 @@ +#import "GPUImageFilter.h" +/** + * Created by Alaric Cole + * Allows adjustment of color temperature in terms of what an image was effectively shot in. This means higher Kelvin values will warm the image, while lower values will cool it. + + */ +@interface GPUImageWhiteBalanceFilter : GPUImageFilter +{ + GLint temperatureUniform, tintUniform; +} +//choose color temperature, in degrees Kelvin +@property(readwrite, nonatomic) CGFloat temperature; + +//adjust tint to compensate +@property(readwrite, nonatomic) CGFloat tint; + +@end diff --git a/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageXYDerivativeFilter.h b/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageXYDerivativeFilter.h new file mode 100755 index 00000000..8db57457 --- /dev/null +++ b/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageXYDerivativeFilter.h @@ -0,0 +1,5 @@ +#import "GPUImageSobelEdgeDetectionFilter.h" + +@interface GPUImageXYDerivativeFilter : GPUImageSobelEdgeDetectionFilter + +@end diff --git a/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageZoomBlurFilter.h b/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageZoomBlurFilter.h new file mode 100755 index 00000000..744a72cb --- /dev/null +++ b/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageZoomBlurFilter.h @@ -0,0 +1,13 @@ +#import "GPUImageFilter.h" + +@interface GPUImageZoomBlurFilter : GPUImageFilter + +/** A multiplier for the blur size, ranging from 0.0 on up, with a default of 1.0 + */ +@property (readwrite, nonatomic) CGFloat blurSize; + +/** The normalized center of the blur. (0.5, 0.5) by default + */ +@property (readwrite, nonatomic) CGPoint blurCenter; + +@end diff --git a/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageiOSBlurFilter.h b/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageiOSBlurFilter.h new file mode 100755 index 00000000..261d0d7c --- /dev/null +++ b/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Headers/GPUImageiOSBlurFilter.h @@ -0,0 +1,31 @@ +#import "GPUImageFilterGroup.h" + +@class GPUImageSaturationFilter; +@class GPUImageGaussianBlurFilter; +@class GPUImageLuminanceRangeFilter; + +@interface GPUImageiOSBlurFilter : GPUImageFilterGroup +{ + GPUImageSaturationFilter *saturationFilter; + GPUImageGaussianBlurFilter *blurFilter; + GPUImageLuminanceRangeFilter *luminanceRangeFilter; +} + +/** A radius in pixels to use for the blur, with a default of 12.0. This adjusts the sigma variable in the Gaussian distribution function. + */ +@property (readwrite, nonatomic) CGFloat blurRadiusInPixels; + +/** Saturation ranges from 0.0 (fully desaturated) to 2.0 (max saturation), with 0.8 as the normal level + */ +@property (readwrite, nonatomic) CGFloat saturation; + +/** The degree to which to downsample, then upsample the incoming image to minimize computations within the Gaussian blur, default of 4.0 + */ +@property (readwrite, nonatomic) CGFloat downsampling; + + +/** The degree to reduce the luminance range, from 0.0 to 1.0. Default is 0.6. + */ +@property (readwrite, nonatomic) CGFloat rangeReductionFactor; + +@end diff --git a/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Info.plist b/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Info.plist new file mode 100644 index 00000000..f0d0b838 Binary files /dev/null and b/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Info.plist differ diff --git a/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Modules/module.modulemap b/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Modules/module.modulemap new file mode 100644 index 00000000..8b3de2aa --- /dev/null +++ b/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/Modules/module.modulemap @@ -0,0 +1,6 @@ +framework module GPUImage { + umbrella header "GPUImageFramework.h" + + export * + module * { export * } +} diff --git a/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/_CodeSignature/CodeDirectory b/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/_CodeSignature/CodeDirectory new file mode 100644 index 00000000..8fc3b9e0 Binary files /dev/null and b/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/_CodeSignature/CodeDirectory differ diff --git a/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/_CodeSignature/CodeRequirements b/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/_CodeSignature/CodeRequirements new file mode 100644 index 00000000..05a7c129 Binary files /dev/null and b/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/_CodeSignature/CodeRequirements differ diff --git a/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/_CodeSignature/CodeRequirements-1 b/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/_CodeSignature/CodeRequirements-1 new file mode 100644 index 00000000..0f99cb74 Binary files /dev/null and b/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/_CodeSignature/CodeRequirements-1 differ diff --git a/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/_CodeSignature/CodeResources b/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/_CodeSignature/CodeResources new file mode 100644 index 00000000..751b8105 --- /dev/null +++ b/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/_CodeSignature/CodeResources @@ -0,0 +1,2706 @@ + + + + + files + + Headers/GLProgram.h + + mxV0e3ySbX5wXHtFNuXmzouYzhg= + + Headers/GPUImage.h + + HUrEgiB6fAbHKKOhgpEMG/+gBtU= + + Headers/GPUImage3x3ConvolutionFilter.h + + 8dpkDAU1/CNJYbLCaopWMbtM9Wk= + + Headers/GPUImage3x3TextureSamplingFilter.h + + rmrLZgRfAct+MljSz+mZjuqx0Xc= + + Headers/GPUImageAdaptiveThresholdFilter.h + + j8TJ9SbuXJdDT6WeWbj67gedx0E= + + Headers/GPUImageAddBlendFilter.h + + ZqcgCRv7SDNUuNEWxmrvuwiJzs4= + + Headers/GPUImageAlphaBlendFilter.h + + 3+5qkq6u9LINJezWetcTsx/Hz4w= + + Headers/GPUImageAmatorkaFilter.h + + Jg2Vo6iBaPtVxTBtsPxFn2jUJvY= + + Headers/GPUImageAverageColor.h + + dm/LLHsaG/BYjGfGIJ+HVK85gjs= + + Headers/GPUImageAverageLuminanceThresholdFilter.h + + lfGX8xAQbjJzIZFxhCiFcAs7oy4= + + Headers/GPUImageBilateralFilter.h + + ZOYkrhlb8bo7XJYWCHKv8jDbGSw= + + Headers/GPUImageBoxBlurFilter.h + + 2IGx4AaFDNmXDeEMoT53K0JArEQ= + + Headers/GPUImageBrightnessFilter.h + + Ona6ET2F+oZePe4U8p1udhGII3Q= + + Headers/GPUImageBuffer.h + + JCpOP/4GQX0uEOQsJec2tEythNE= + + Headers/GPUImageBulgeDistortionFilter.h + + tLPJjW6QBH8Y8+nMB40CyTOjrIk= + + Headers/GPUImageCGAColorspaceFilter.h + + ZSc1+9LEc7ylEXYx6hfUlepSwbc= + + Headers/GPUImageCannyEdgeDetectionFilter.h + + RXd0CN9fZ1Mc2U4WEbfE5iLtv+A= + + Headers/GPUImageChromaKeyBlendFilter.h + + KE7yvI9BPOrZgZYWrjuxCZ8pVtA= + + Headers/GPUImageChromaKeyFilter.h + + NZEkB6hg/l9d0eeD8T5BIKeK/vA= + + Headers/GPUImageClosingFilter.h + + 8DaTIfa9mz8RZ8c7294Th71SvHE= + + Headers/GPUImageColorBlendFilter.h + + dMwymUIfKAFm83KD8q37++zNBWY= + + Headers/GPUImageColorBurnBlendFilter.h + + ZqWjCbNVUyVMyPHDsysdFsXHcd8= + + Headers/GPUImageColorConversion.h + + 85niOZxbuL7fm2tizONEMmbk5Go= + + Headers/GPUImageColorDodgeBlendFilter.h + + dyxixQU9GEwlWwohHx1TAxJJSCI= + + Headers/GPUImageColorInvertFilter.h + + BhDhrQlF0AE2zWv8hOsay7yd4P8= + + Headers/GPUImageColorLocalBinaryPatternFilter.h + + 9/Gb9ktJYdY40PRNmZK9G9kX0Qc= + + Headers/GPUImageColorMatrixFilter.h + + KRVW9ALkzhXgwAQQZ3WDkDENgr8= + + Headers/GPUImageColorPackingFilter.h + + WLiJEfbuwRZkJKU40m7s2pNU8z4= + + Headers/GPUImageColourFASTFeatureDetector.h + + GhE7L7L2F/nLxEjav9RYJLH+K1c= + + Headers/GPUImageColourFASTSamplingOperation.h + + /rRHQC73llgzJajpekh1DikWbVc= + + Headers/GPUImageContext.h + + crRuajGhAdPoHKDXPj2knPKAMQw= + + Headers/GPUImageContrastFilter.h + + yg9eIoi8mYMdPs664DRJY8fhCUE= + + Headers/GPUImageCropFilter.h + + GNsgNrng2NfpA6mZlL8mDRkO2Kk= + + Headers/GPUImageCrosshairGenerator.h + + XCPEj90Ghhdt475FjjXeQ17BWVE= + + Headers/GPUImageCrosshatchFilter.h + + X9+PdTNr6c59uDob6CaeLMBRh5w= + + Headers/GPUImageDarkenBlendFilter.h + + h2nCd0ZA9CpBgYaPiiCjWCXtjRQ= + + Headers/GPUImageDifferenceBlendFilter.h + + nQtt55uc8QDm8QAn4P3HCTlIsvA= + + Headers/GPUImageDilationFilter.h + + q1iT4ChRTeumN9ZpE6+lI+p82/E= + + Headers/GPUImageDirectionalNonMaximumSuppressionFilter.h + + YvyKHTi4RtM4TJCczJfI0VXbLpQ= + + Headers/GPUImageDirectionalSobelEdgeDetectionFilter.h + + c1sXRuGi690fcxh8OklQ07PGtJw= + + Headers/GPUImageDissolveBlendFilter.h + + 9F9Ov/HWqsMm5Xt1IssGPfrl2mc= + + Headers/GPUImageDivideBlendFilter.h + + RXn7OCQZLsvKTHiJbyHU79mrDKg= + + Headers/GPUImageEmbossFilter.h + + ihJeR7pFprPC2NrkgDGozQBoSKg= + + Headers/GPUImageErosionFilter.h + + kUdV57f6Lqf+cDNKhffApoWk71U= + + Headers/GPUImageExclusionBlendFilter.h + + 4gszly6+sRU6I+m8iNhlXab3Muw= + + Headers/GPUImageExposureFilter.h + + Pq0OBkMAQJfsz4c7axBaKguJuAM= + + Headers/GPUImageFASTCornerDetectionFilter.h + + y7bJW0+KUu7jyhck1iuVh/dMRSI= + + Headers/GPUImageFalseColorFilter.h + + FKHtRA6hwN4+v2+6syrGRpJs80s= + + Headers/GPUImageFilter.h + + RfmKJiQmvREjYI3efESP44q6HqY= + + Headers/GPUImageFilterGroup.h + + ci1P1K2/aqZPFXVlXh7s4sCxiDA= + + Headers/GPUImageFilterPipeline.h + + g8OwgwDaWscuTU8NSvFx3mW3Kyc= + + Headers/GPUImageFourInputFilter.h + + wi/A840uTQSq9r58rK6XxY2JrJQ= + + Headers/GPUImageFramebuffer.h + + IEeW8WJNFRGkd+ahOeP3W132M84= + + Headers/GPUImageFramebufferCache.h + + M1gALTDvDppaMmUPGKd9dcOy7ow= + + Headers/GPUImageFramework.h + + +epzM7KpjPip/rvReTzy3D1M8X8= + + Headers/GPUImageGammaFilter.h + + QXztmd+0AxvWQUgZGf/h/F5ogfA= + + Headers/GPUImageGaussianBlurFilter.h + + 7AyTt2ib3nefJBRgP9x0zMfaN7I= + + Headers/GPUImageGaussianBlurPositionFilter.h + + LPzQm8OikBgVvykqWgnGpCRjDeI= + + Headers/GPUImageGaussianSelectiveBlurFilter.h + + /JLdtp0oTNQDPqd78oh2Z6dRIQE= + + Headers/GPUImageGlassSphereFilter.h + + xNuoKVEKoDLca9saZMbO9t4O5nE= + + Headers/GPUImageGrayscaleFilter.h + + QyDCZY379dkN+s83dyiPuF1FTnE= + + Headers/GPUImageHSBFilter.h + + XAU4XGRlYmJJsdSYJv7DeCZyBaY= + + Headers/GPUImageHalftoneFilter.h + + Pr8rL4hd3Cy4Dk9j/sc+h1aDS4k= + + Headers/GPUImageHardLightBlendFilter.h + + jx/UK9UYuNtco7xUWs4u3jgihAs= + + Headers/GPUImageHarrisCornerDetectionFilter.h + + 2VBXLprDQkt75kNdsb2qiZMVBhI= + + Headers/GPUImageHazeFilter.h + + MKukhAyBDvtDmWfcqBB58cLUUtc= + + Headers/GPUImageHighPassFilter.h + + a6UTlsnfcqFwl7x5TmrswtX6TbQ= + + Headers/GPUImageHighlightShadowFilter.h + + RXF9rkKoFgO1yEf1lGYwnYVWaKA= + + Headers/GPUImageHistogramEqualizationFilter.h + + Jx3UmNICspUkpwl8TtCAJvOZlSM= + + Headers/GPUImageHistogramFilter.h + + +vKXk57tc2bLh6xg5saqO0gn0os= + + Headers/GPUImageHistogramGenerator.h + + pkT5KjxmW2JHBN0x1HaP4YPKIz8= + + Headers/GPUImageHoughTransformLineDetector.h + + wqP/sR0RJZhJw7q9kueAKfT4eIQ= + + Headers/GPUImageHueBlendFilter.h + + Gpv7ymmIGv+kMAvVjFn8/nzfGeo= + + Headers/GPUImageHueFilter.h + + KLyL+EyEdlFqtY6W60F0u++ky40= + + Headers/GPUImageJFAVoronoiFilter.h + + 3ui/efguz79qgvg0D6fqjAgh2Aw= + + Headers/GPUImageKuwaharaFilter.h + + fykYwSfuURCv41hLJGh5qBx057Q= + + Headers/GPUImageKuwaharaRadius3Filter.h + + nV+ZGOYZuJ3439z9GzV7yNfBHWg= + + Headers/GPUImageLanczosResamplingFilter.h + + +I/Oeo4QqenPG3rtjq44mj3ERB4= + + Headers/GPUImageLaplacianFilter.h + + RRZuKhYmTVGQDAcwMqlgQJbL8Do= + + Headers/GPUImageLevelsFilter.h + + Gza69S6pgnbnZlwHKqjYaYEM/Ls= + + Headers/GPUImageLightenBlendFilter.h + + hayBBt+FLU4U7NCnluqr5rS7xRk= + + Headers/GPUImageLineGenerator.h + + NQpyfhnEGd8NCcsAUYhjGqLSsv0= + + Headers/GPUImageLinearBurnBlendFilter.h + + MSZ5D8DfxhhcWSBE/dbyqIF1WXU= + + Headers/GPUImageLocalBinaryPatternFilter.h + + CoJvGvgmepvIE7xfBTmakrHwP/4= + + Headers/GPUImageLookupFilter.h + + w4z26ndizxXzKQJ88aVnAey4Fw0= + + Headers/GPUImageLowPassFilter.h + + 31VwJGSTw5Pk3rUIBteL3mS5Fco= + + Headers/GPUImageLuminanceRangeFilter.h + + 9bubuorseeL3CSW6/wDssVl51b0= + + Headers/GPUImageLuminanceThresholdFilter.h + + jriqFPHK7oD8U5a4NlRe5DAaCrE= + + Headers/GPUImageLuminosity.h + + D1xJBSH8RQe0r+tz433v5cooA4g= + + Headers/GPUImageLuminosityBlendFilter.h + + K9StpAOWlbVp000MEMTjrjPICtw= + + Headers/GPUImageMaskFilter.h + + 4me/bbKktSzR2tf91KFrCAFKpDw= + + Headers/GPUImageMedianFilter.h + + DCJ1QJxUxXII81YHvjbi2VxpGUY= + + Headers/GPUImageMissEtikateFilter.h + + eXaIKblZRY2u2zx4jbCECbbG5Vk= + + Headers/GPUImageMonochromeFilter.h + + w7+SR2N75c+NS0vIJnTpxjlcyCo= + + Headers/GPUImageMosaicFilter.h + + 4L1WsMRVAAen9AfkNC+gWJg+l5s= + + Headers/GPUImageMotionBlurFilter.h + + CxYZGDOwU5iVCUhz9pASd8U9E3k= + + Headers/GPUImageMotionDetector.h + + T38nrFQZbb4DT2gQK9w/CCUmglk= + + Headers/GPUImageMovie.h + + n79CDkhuW4T4K1DOrWsM+UlNvH4= + + Headers/GPUImageMovieComposition.h + + 9j3G+2oBkNiK1LmZya69OK7HPDw= + + Headers/GPUImageMovieWriter.h + + K/pCsJOeDezN4EvjevWNKuAoSBg= + + Headers/GPUImageMultiplyBlendFilter.h + + mKgyTRMmqRA8w9Xjc9C/f4ZwmAc= + + Headers/GPUImageNobleCornerDetectionFilter.h + + bv7MsymlAZaVPEyxgYOseUaQWBo= + + Headers/GPUImageNonMaximumSuppressionFilter.h + + RmDs6FthM8vOgj/yit6NluIJgVU= + + Headers/GPUImageNormalBlendFilter.h + + o+1YuPUIGNrBx31AftBi4v7uBsI= + + Headers/GPUImageOpacityFilter.h + + PWUf8xzWuDzIl6ozfDwkWo29bAY= + + Headers/GPUImageOpeningFilter.h + + f+ZpSToNCGDCmLBneSEM3GAGFkg= + + Headers/GPUImageOutput.h + + m3vHLviKj6yjen2H09FULLRYCCo= + + Headers/GPUImageOverlayBlendFilter.h + + 85PVdX0FilNUyQTKvAwCAs+CpgI= + + Headers/GPUImageParallelCoordinateLineTransformFilter.h + + pDJc3qAt8OZkni0KmcSGGZzeHdw= + + Headers/GPUImagePerlinNoiseFilter.h + + LEZfIm8tBunGxiLLQ2HpmDe2YFo= + + Headers/GPUImagePicture+TextureSubimage.h + + MTD+sWYHF3HDKTXOBU/4k+YtiPQ= + + Headers/GPUImagePicture.h + + YXNkWRwAyvK6BCCdUpyOohow230= + + Headers/GPUImagePinchDistortionFilter.h + + E5LEMQvCRVqxd6gsBT+AtZCkBUk= + + Headers/GPUImagePixellateFilter.h + + FHcv8OCM25q+A1skTZrcCx/Zu3Q= + + Headers/GPUImagePixellatePositionFilter.h + + Qz4V0yJTHDJTFP4omfEae9hrUmI= + + Headers/GPUImagePoissonBlendFilter.h + + lHLoDo44rTuaPiUPk4ND/XuE/qI= + + Headers/GPUImagePolarPixellateFilter.h + + 5aGVWSvzWEzu4viAYSY/9oiE3uI= + + Headers/GPUImagePolkaDotFilter.h + + SrpQ4VGsvj8g6sOzDJg/1KkQbgk= + + Headers/GPUImagePosterizeFilter.h + + cKYi3zjWrxNTAxMEKOr2dzuHkmc= + + Headers/GPUImagePrewittEdgeDetectionFilter.h + + N8toPrFwQ2Ugw+k+3OZuvSH/rM8= + + Headers/GPUImageRGBClosingFilter.h + + 0kDf1NDSmJa9qTXWXRJn0rqzVZM= + + Headers/GPUImageRGBDilationFilter.h + + ZR3Z5CpVv/S1H1a6U4H92d1XNuY= + + Headers/GPUImageRGBErosionFilter.h + + UGNRsq5EKscoJMw5AWmpNXYWTdM= + + Headers/GPUImageRGBFilter.h + + gkFaTAjOUwlssgYrnCqqNPqVZVQ= + + Headers/GPUImageRGBOpeningFilter.h + + a/PEfHNhIatpSnplj0x5m+Z/i0M= + + Headers/GPUImageRawDataInput.h + + bYPSXj/dY/MXY9pd631dd+SlD5Q= + + Headers/GPUImageRawDataOutput.h + + HI3YzUw4Cdi8JWb2rjQJQ/6EFew= + + Headers/GPUImageSaturationBlendFilter.h + + sVIc5ZOIrLTAYaM6iYDvrdQmllM= + + Headers/GPUImageSaturationFilter.h + + ArjLRNME7pbUYXWMMariBasSf2A= + + Headers/GPUImageScreenBlendFilter.h + + IlG+2VUkgjLPJPb6pjaf6qp8M7k= + + Headers/GPUImageSepiaFilter.h + + cersznQ+o5cekJw64xa6OobZLdw= + + Headers/GPUImageSharpenFilter.h + + V+QyaRQuTUpPftBbcZfmDw8wl64= + + Headers/GPUImageShiTomasiFeatureDetectionFilter.h + + pa7nhtULhfoyLOgoGvsm/+uhcfc= + + Headers/GPUImageSingleComponentGaussianBlurFilter.h + + 7/jSb9ceaMbbLIPMRzHvaXhXNXo= + + Headers/GPUImageSketchFilter.h + + kh4W2i34QVaPpUxLoB7QhmiZBMM= + + Headers/GPUImageSmoothToonFilter.h + + LBI7rJgJxalx0XL08kyxrw2i7dU= + + Headers/GPUImageSobelEdgeDetectionFilter.h + + rpWNWm5HHwlSq1ZQ1vaUiHShjhk= + + Headers/GPUImageSoftEleganceFilter.h + + NSpPLMjyIznNBnV+WlEbNU/JCrQ= + + Headers/GPUImageSoftLightBlendFilter.h + + LCmUXDPv2Y/1XTjM8l3xkfkTgjQ= + + Headers/GPUImageSolarizeFilter.h + + maBeg9l2rrPl76DuGl12ZFoyiro= + + Headers/GPUImageSolidColorGenerator.h + + obElPdknS4/M5NllFW4ou0UqW6k= + + Headers/GPUImageSourceOverBlendFilter.h + + dZ+4Jmo2+RTUBZ1ZwvOqklAUXNs= + + Headers/GPUImageSphereRefractionFilter.h + + /LGpL2OyUYK/pDU/r6rtolh+9HI= + + Headers/GPUImageStillCamera.h + + b1iHai/5pKKMH5szpPv1a8TqvHk= + + Headers/GPUImageStretchDistortionFilter.h + + dM2Pu4e4jVqbGEB/eTwojOVH/Oo= + + Headers/GPUImageSubtractBlendFilter.h + + 6eceNigAuB1MFFkkgb9wqH1cxts= + + Headers/GPUImageSwirlFilter.h + + W1EBsPkwgjRQ4g29xItEnYCj4m4= + + Headers/GPUImageTextureInput.h + + ZpUsaEiobJqk/ZWd2p34uo0Myk8= + + Headers/GPUImageTextureOutput.h + + FBr341QKXjYfCZRp9/tRKr7hPss= + + Headers/GPUImageThreeInputFilter.h + + O4NFo3F8qk6RKRe9vA4aN1nLcCo= + + Headers/GPUImageThresholdEdgeDetectionFilter.h + + 8XzR1Sd3L8iYTlhq4r1Iz+VQvOw= + + Headers/GPUImageThresholdSketchFilter.h + + qoUqrEAH1WyTko9oJYejdFlJ4vg= + + Headers/GPUImageThresholdedNonMaximumSuppressionFilter.h + + qlRa/0ARLN0BmYYIfBBscRL/laA= + + Headers/GPUImageTiltShiftFilter.h + + 2e6BVWefqZWB3q/boU0T3pywASk= + + Headers/GPUImageToneCurveFilter.h + + TUxmjstVUOFZkzUBdhC8py2pvlQ= + + Headers/GPUImageToonFilter.h + + IdFNHeEyRIrIFe7/BewlogHt6P8= + + Headers/GPUImageTransformFilter.h + + hYC1or0IxZQGx6tlTlsWGIEAGtg= + + Headers/GPUImageTwoInputCrossTextureSamplingFilter.h + + tTeOrYRvFnN+JRl1Zl1Pnx7WksM= + + Headers/GPUImageTwoInputFilter.h + + xYdAQuIcdQXjRF9BzTSZa6+epLY= + + Headers/GPUImageTwoPassFilter.h + + eIvODox9IFf/FwSDdwcO9QBlSuE= + + Headers/GPUImageTwoPassTextureSamplingFilter.h + + tJLxawc8sQqJNWN1mD+z/1HnW34= + + Headers/GPUImageUIElement.h + + gst311gU8Bppy9Y9ZJu1qsP15ig= + + Headers/GPUImageUnsharpMaskFilter.h + + tvbQ+h7cIOa1obTOfERZEKlMLgc= + + Headers/GPUImageVideoCamera.h + + ZJU1/2IWDnlHhL+SUU00uR55r1A= + + Headers/GPUImageView.h + + JttiO2LRvk7193e1j1cJBYNlqwc= + + Headers/GPUImageVignetteFilter.h + + 6/RMBS0wP+W+Qrdw9XbQFwR+A2U= + + Headers/GPUImageVoronoiConsumerFilter.h + + uRq8kWqFIpZtAzB8vM+lmf3/NqE= + + Headers/GPUImageWeakPixelInclusionFilter.h + + 7dtwUyahMxEVLznJA5pilE+TxIE= + + Headers/GPUImageWhiteBalanceFilter.h + + 0zBzM5GkMhSrWwtB//vJZzLVYDY= + + Headers/GPUImageXYDerivativeFilter.h + + s3VqLQtQvt8iRXqYCetH4F4V3/E= + + Headers/GPUImageZoomBlurFilter.h + + w0V2pYVUIFam3/3fhAX2qNtesCg= + + Headers/GPUImageiOSBlurFilter.h + + bq2sOdRJnN77Fv7I1e2CXZj/pFU= + + Info.plist + + w3jhhVVo7ss7Ny6+bhJfoPy0Zkg= + + Modules/module.modulemap + + R0/ACD1+K7JSlm2BJjfVTa4Z+LU= + + + files2 + + Headers/GLProgram.h + + hash + + mxV0e3ySbX5wXHtFNuXmzouYzhg= + + hash2 + + cFNmhWSDusMHEdqpJfIR7brb3prKF57vcZvlycZdoHI= + + + Headers/GPUImage.h + + hash + + HUrEgiB6fAbHKKOhgpEMG/+gBtU= + + hash2 + + gCGjyabgeFTu22qH526YkzarVuRd9yaX2OvJJ+Uev8E= + + + Headers/GPUImage3x3ConvolutionFilter.h + + hash + + 8dpkDAU1/CNJYbLCaopWMbtM9Wk= + + hash2 + + xW5JKVXtLwSIAOrNgUXYjc/T9F5+KEHtYly/uZYArp8= + + + Headers/GPUImage3x3TextureSamplingFilter.h + + hash + + rmrLZgRfAct+MljSz+mZjuqx0Xc= + + hash2 + + Me9DNBv+hsueQ9mH3bA/KkSdJbhip+b4FISjXoSHJlA= + + + Headers/GPUImageAdaptiveThresholdFilter.h + + hash + + j8TJ9SbuXJdDT6WeWbj67gedx0E= + + hash2 + + JCjHdq5EZY9TwTT1tO6Nrn0wWoNtN4QuwjM2LYKuzUs= + + + Headers/GPUImageAddBlendFilter.h + + hash + + ZqcgCRv7SDNUuNEWxmrvuwiJzs4= + + hash2 + + 7gmZKD4J/fSK0RH73+78MMXi2pGR/lX39LxhYuPIlkk= + + + Headers/GPUImageAlphaBlendFilter.h + + hash + + 3+5qkq6u9LINJezWetcTsx/Hz4w= + + hash2 + + bCTpScq9pex2+9XImOCbyBD/39vhUa+Cx6nlMoQqwNI= + + + Headers/GPUImageAmatorkaFilter.h + + hash + + Jg2Vo6iBaPtVxTBtsPxFn2jUJvY= + + hash2 + + 6Ou2XXACuqdDQD9WCPdBCcjkiH+60zgXW+s+gKKb7hA= + + + Headers/GPUImageAverageColor.h + + hash + + dm/LLHsaG/BYjGfGIJ+HVK85gjs= + + hash2 + + Pf20DWn4dVHN+h8pwCk3C92z9OgfdL7vGnXnIBY6LVM= + + + Headers/GPUImageAverageLuminanceThresholdFilter.h + + hash + + lfGX8xAQbjJzIZFxhCiFcAs7oy4= + + hash2 + + mdN2HqPP0Iy1htv3zhyvCc2JufGN0pzoU/qw3uTcs78= + + + Headers/GPUImageBilateralFilter.h + + hash + + ZOYkrhlb8bo7XJYWCHKv8jDbGSw= + + hash2 + + Nh6VMUmgAGF2QECzVLbt4EnbUSusVlDj9cz7GIid8oE= + + + Headers/GPUImageBoxBlurFilter.h + + hash + + 2IGx4AaFDNmXDeEMoT53K0JArEQ= + + hash2 + + LHpwW3ZUOsDNWkHX6KqdZCr/jSVkQcnK9lWRwHnOBxQ= + + + Headers/GPUImageBrightnessFilter.h + + hash + + Ona6ET2F+oZePe4U8p1udhGII3Q= + + hash2 + + uGqFvx3H/92XB/hy0e+pAbeYXXhGAhTpB2f1IEf0cpI= + + + Headers/GPUImageBuffer.h + + hash + + JCpOP/4GQX0uEOQsJec2tEythNE= + + hash2 + + yECIjMLc6eZvqNulDXpA3kaUruGk/heKH9aFvRsAZVA= + + + Headers/GPUImageBulgeDistortionFilter.h + + hash + + tLPJjW6QBH8Y8+nMB40CyTOjrIk= + + hash2 + + s/SegywwWdr1RgFqmEsPnRtWvhjBZNb1+yNzL8YgsEg= + + + Headers/GPUImageCGAColorspaceFilter.h + + hash + + ZSc1+9LEc7ylEXYx6hfUlepSwbc= + + hash2 + + /wXNLUCQLKq6PkKDK5WzjS2EfjjsQLYQFGQTZI+0xp8= + + + Headers/GPUImageCannyEdgeDetectionFilter.h + + hash + + RXd0CN9fZ1Mc2U4WEbfE5iLtv+A= + + hash2 + + tTJWe4zmN05lZmS4oOUx9CzBkknlq1xQebsvMK+FWfE= + + + Headers/GPUImageChromaKeyBlendFilter.h + + hash + + KE7yvI9BPOrZgZYWrjuxCZ8pVtA= + + hash2 + + geCwMVNljHatBw4YnXFM39Tgg7X1ql80uf3dQoZ8tSE= + + + Headers/GPUImageChromaKeyFilter.h + + hash + + NZEkB6hg/l9d0eeD8T5BIKeK/vA= + + hash2 + + LpBy1D6LazIVuHwutyP2+9sy/X1EudesfpEwL/A3f3M= + + + Headers/GPUImageClosingFilter.h + + hash + + 8DaTIfa9mz8RZ8c7294Th71SvHE= + + hash2 + + AKU1tHPVrLaDc9Om3PyocfDGl+9EfE+FkrlxwfGal6M= + + + Headers/GPUImageColorBlendFilter.h + + hash + + dMwymUIfKAFm83KD8q37++zNBWY= + + hash2 + + w+9krqv5lm0xceQzDfGv6SvE5xs7uQ5RlzfQAdd22EU= + + + Headers/GPUImageColorBurnBlendFilter.h + + hash + + ZqWjCbNVUyVMyPHDsysdFsXHcd8= + + hash2 + + tL4oNJsSrtqk0uuYJhz6F3vd3zb5I6yvXPbJDOUsn+A= + + + Headers/GPUImageColorConversion.h + + hash + + 85niOZxbuL7fm2tizONEMmbk5Go= + + hash2 + + 1eiW3wJuxOGdPQh7phrLdYIID/tXbV9HQoza42P9Sd8= + + + Headers/GPUImageColorDodgeBlendFilter.h + + hash + + dyxixQU9GEwlWwohHx1TAxJJSCI= + + hash2 + + 4DyV7HnuSnHa9ISHsFb9ssbUvfFaChCf5jyZ1tOsD/Q= + + + Headers/GPUImageColorInvertFilter.h + + hash + + BhDhrQlF0AE2zWv8hOsay7yd4P8= + + hash2 + + YzIi7FgNtWJvY7UadHf73R+UJGrIBYMUDsnEhXrALmg= + + + Headers/GPUImageColorLocalBinaryPatternFilter.h + + hash + + 9/Gb9ktJYdY40PRNmZK9G9kX0Qc= + + hash2 + + g12nU5fmJP26jKOflrDNLqy1D7mz0te3pV0t4hRQLLs= + + + Headers/GPUImageColorMatrixFilter.h + + hash + + KRVW9ALkzhXgwAQQZ3WDkDENgr8= + + hash2 + + aKcILwJL8gO1SrF/c2Va6w4btva79iDJbficZAGlvSQ= + + + Headers/GPUImageColorPackingFilter.h + + hash + + WLiJEfbuwRZkJKU40m7s2pNU8z4= + + hash2 + + JjNjSXZQDauyyyJgozL1X2j47VP9+PyplnrngANUZtc= + + + Headers/GPUImageColourFASTFeatureDetector.h + + hash + + GhE7L7L2F/nLxEjav9RYJLH+K1c= + + hash2 + + XMBOXATlzFJPD4KMuHOajY+wLHYmvMuRn1isVcsuV+0= + + + Headers/GPUImageColourFASTSamplingOperation.h + + hash + + /rRHQC73llgzJajpekh1DikWbVc= + + hash2 + + qlqgfFU/8J9oZakhbm5XGQyUJJcY5lI82b/jdRDoct0= + + + Headers/GPUImageContext.h + + hash + + crRuajGhAdPoHKDXPj2knPKAMQw= + + hash2 + + 5lhTPPG7u0ZF/HzISZlD6CDW5lOYJgNV96cFpybIz/4= + + + Headers/GPUImageContrastFilter.h + + hash + + yg9eIoi8mYMdPs664DRJY8fhCUE= + + hash2 + + 0R1BTRgbARY9QRcxVLfSDtpd3gaw4LuB+aiixCvk594= + + + Headers/GPUImageCropFilter.h + + hash + + GNsgNrng2NfpA6mZlL8mDRkO2Kk= + + hash2 + + kcGtgvGutsxitzptDWfaFTXBGAsXoDsd233MVZjcPrM= + + + Headers/GPUImageCrosshairGenerator.h + + hash + + XCPEj90Ghhdt475FjjXeQ17BWVE= + + hash2 + + gT23uANRS7CGGyQW2AOydCdcC5sn0TEMlnc2Kwx7FKg= + + + Headers/GPUImageCrosshatchFilter.h + + hash + + X9+PdTNr6c59uDob6CaeLMBRh5w= + + hash2 + + vjrwI6OkrAz4SafSmeRdbNKNlM7kSre6hNXZGtmZvyU= + + + Headers/GPUImageDarkenBlendFilter.h + + hash + + h2nCd0ZA9CpBgYaPiiCjWCXtjRQ= + + hash2 + + rmgMHzR/bDFTmL+v3NYIBDVdQiLxWJxifazlvhASvnk= + + + Headers/GPUImageDifferenceBlendFilter.h + + hash + + nQtt55uc8QDm8QAn4P3HCTlIsvA= + + hash2 + + nEqCeHYvdyuMkFu7YrCrXhXzV83fvTrPjyGKcLZfAkg= + + + Headers/GPUImageDilationFilter.h + + hash + + q1iT4ChRTeumN9ZpE6+lI+p82/E= + + hash2 + + QvhTeaaqUez5RfDJMS8vYpdepiHpSKIdg4kKywJewg4= + + + Headers/GPUImageDirectionalNonMaximumSuppressionFilter.h + + hash + + YvyKHTi4RtM4TJCczJfI0VXbLpQ= + + hash2 + + dCeafsRFlU7i9O1kaSmfyuRHj6F5YquWCBdiSq7WAt4= + + + Headers/GPUImageDirectionalSobelEdgeDetectionFilter.h + + hash + + c1sXRuGi690fcxh8OklQ07PGtJw= + + hash2 + + uPdVfsGl/X7FD2BGMS642EI7uG1oalencOFoC3ObP+g= + + + Headers/GPUImageDissolveBlendFilter.h + + hash + + 9F9Ov/HWqsMm5Xt1IssGPfrl2mc= + + hash2 + + MNLt4fDp6XW6DqRDI85xMY1R/cKWUtkYaZTZ4pQuvpI= + + + Headers/GPUImageDivideBlendFilter.h + + hash + + RXn7OCQZLsvKTHiJbyHU79mrDKg= + + hash2 + + eCt2yGUiNGSa4GgdpJc4TI+vTrzfRTpj2fm5x2z/jxk= + + + Headers/GPUImageEmbossFilter.h + + hash + + ihJeR7pFprPC2NrkgDGozQBoSKg= + + hash2 + + 3ZNWgV1K5avYl8YlY+CsJ8C3xNmJ3hhSGjg9d/jwNaw= + + + Headers/GPUImageErosionFilter.h + + hash + + kUdV57f6Lqf+cDNKhffApoWk71U= + + hash2 + + VN+FfhbJbATpqb/Zt36Q6I7Av1NlXPu8ixGtOww45bU= + + + Headers/GPUImageExclusionBlendFilter.h + + hash + + 4gszly6+sRU6I+m8iNhlXab3Muw= + + hash2 + + IIfleEt/GWWFwGvOXX6VNZUn3Rgl1FALo/JkTdEqo5A= + + + Headers/GPUImageExposureFilter.h + + hash + + Pq0OBkMAQJfsz4c7axBaKguJuAM= + + hash2 + + v+jxvlZLXa/megMUIqo1f6/tllfptDuH5bDPPeLEMZE= + + + Headers/GPUImageFASTCornerDetectionFilter.h + + hash + + y7bJW0+KUu7jyhck1iuVh/dMRSI= + + hash2 + + KwujAFPj/udiOqcNfT++Y2gj/dx6Ci+tZqwK5tRrF0Y= + + + Headers/GPUImageFalseColorFilter.h + + hash + + FKHtRA6hwN4+v2+6syrGRpJs80s= + + hash2 + + VXayiyCKId/QDh37LKNXJlIyo+A8BE5MSxqbISiNnCs= + + + Headers/GPUImageFilter.h + + hash + + RfmKJiQmvREjYI3efESP44q6HqY= + + hash2 + + NUHqU0nOp+NoUiS3HPIvn53NgAg2APxYxdcSRQ65x0M= + + + Headers/GPUImageFilterGroup.h + + hash + + ci1P1K2/aqZPFXVlXh7s4sCxiDA= + + hash2 + + BBet206JJrO7eVZdeqXGkNb5UYfRrpAuxsgf8yVKEW8= + + + Headers/GPUImageFilterPipeline.h + + hash + + g8OwgwDaWscuTU8NSvFx3mW3Kyc= + + hash2 + + 3VS3ydBqsnaNvP97vVq5t+f7V9iEPaPAY3tnwvXleVI= + + + Headers/GPUImageFourInputFilter.h + + hash + + wi/A840uTQSq9r58rK6XxY2JrJQ= + + hash2 + + 4K2xLfLw9Tiqe0cjNKRow0LFIXhwoHEv8KgkuRDm9JQ= + + + Headers/GPUImageFramebuffer.h + + hash + + IEeW8WJNFRGkd+ahOeP3W132M84= + + hash2 + + rILL0gnwCJdmxUK37k6p6pxsHtgxchCyvjaMs5Np8+o= + + + Headers/GPUImageFramebufferCache.h + + hash + + M1gALTDvDppaMmUPGKd9dcOy7ow= + + hash2 + + jZVzaFZNXSJra69NHUmnvNkM518xrWsdLgHdp4hiDEw= + + + Headers/GPUImageFramework.h + + hash + + +epzM7KpjPip/rvReTzy3D1M8X8= + + hash2 + + Hy7Qk9anT+/NGiw5Y8tMlFiEr0BREQnCdJ8P4jHCPFo= + + + Headers/GPUImageGammaFilter.h + + hash + + QXztmd+0AxvWQUgZGf/h/F5ogfA= + + hash2 + + d6yphF+YkjQyapKF4p0v1sehxDq9JdNJA9rdG6jwIRE= + + + Headers/GPUImageGaussianBlurFilter.h + + hash + + 7AyTt2ib3nefJBRgP9x0zMfaN7I= + + hash2 + + BfvGEIx+1dlAhgwIDHIlj1LxfmCnQMxOsX4xqfHmRLo= + + + Headers/GPUImageGaussianBlurPositionFilter.h + + hash + + LPzQm8OikBgVvykqWgnGpCRjDeI= + + hash2 + + HjHIlqBKW4z7oqciN28CigRuOEhzVdXI33UUKf+F9rM= + + + Headers/GPUImageGaussianSelectiveBlurFilter.h + + hash + + /JLdtp0oTNQDPqd78oh2Z6dRIQE= + + hash2 + + 5dvYm9rz3CrntpGwHQ9Vje5caa74MU4nxwp9vZlsoa8= + + + Headers/GPUImageGlassSphereFilter.h + + hash + + xNuoKVEKoDLca9saZMbO9t4O5nE= + + hash2 + + HLx07OX1tOjkv9AgOZ37yVaIYqSa5+1GeHmwm7JPnbk= + + + Headers/GPUImageGrayscaleFilter.h + + hash + + QyDCZY379dkN+s83dyiPuF1FTnE= + + hash2 + + cSF1cY/HMUoefh0hA89ESiTnQIRRDiDfXOuc3wRh9Qc= + + + Headers/GPUImageHSBFilter.h + + hash + + XAU4XGRlYmJJsdSYJv7DeCZyBaY= + + hash2 + + /QPQd9EBYsMD3Je+yMz3mwXN3mqoGpbIJgjyLDiJZgI= + + + Headers/GPUImageHalftoneFilter.h + + hash + + Pr8rL4hd3Cy4Dk9j/sc+h1aDS4k= + + hash2 + + 0rmSnGbEGIZCqfb7C41uZjOl4AH1okMgXitgsX7p+lY= + + + Headers/GPUImageHardLightBlendFilter.h + + hash + + jx/UK9UYuNtco7xUWs4u3jgihAs= + + hash2 + + k0z2X6+IzW8YoznhQuWaw6H5HLeJ81a+8lKBOK9zJdU= + + + Headers/GPUImageHarrisCornerDetectionFilter.h + + hash + + 2VBXLprDQkt75kNdsb2qiZMVBhI= + + hash2 + + +ndKqu6zsGSqdWNa2H98k/zAC2oYJ6nIipPi1hqM2yI= + + + Headers/GPUImageHazeFilter.h + + hash + + MKukhAyBDvtDmWfcqBB58cLUUtc= + + hash2 + + BtRO2EkDifu/sIz6DyA3UPMUD/qEVmPnLujzfTKcJQU= + + + Headers/GPUImageHighPassFilter.h + + hash + + a6UTlsnfcqFwl7x5TmrswtX6TbQ= + + hash2 + + o3gWBrT/dajIE/+vYmETUSxpjfADVsfbz7y8j2a+YdA= + + + Headers/GPUImageHighlightShadowFilter.h + + hash + + RXF9rkKoFgO1yEf1lGYwnYVWaKA= + + hash2 + + 4w2o4nmX6zOpST3S8mU8dK4iZJwQkNcZhr53zaIltK0= + + + Headers/GPUImageHistogramEqualizationFilter.h + + hash + + Jx3UmNICspUkpwl8TtCAJvOZlSM= + + hash2 + + VoJJwsDkAfvkWyOaqu0SJHsS3aDLHDA1rVnzuFM/vHU= + + + Headers/GPUImageHistogramFilter.h + + hash + + +vKXk57tc2bLh6xg5saqO0gn0os= + + hash2 + + lrTjAFYyDOUJbykNnEGVSbRI/lQ9uqdYkiPhkyVuugI= + + + Headers/GPUImageHistogramGenerator.h + + hash + + pkT5KjxmW2JHBN0x1HaP4YPKIz8= + + hash2 + + TH+SyM7VDsjCvWytqun/L+RNMb/yW4w46qAfQJdC9mc= + + + Headers/GPUImageHoughTransformLineDetector.h + + hash + + wqP/sR0RJZhJw7q9kueAKfT4eIQ= + + hash2 + + pPG/kQV3hj+bIftMmZjMZBoD29du0Q8iCiurodqgGDk= + + + Headers/GPUImageHueBlendFilter.h + + hash + + Gpv7ymmIGv+kMAvVjFn8/nzfGeo= + + hash2 + + kl8ox+bvHqgvOUyFz2QetP0TJHHYVe8XEXPWDa6QqXY= + + + Headers/GPUImageHueFilter.h + + hash + + KLyL+EyEdlFqtY6W60F0u++ky40= + + hash2 + + y0o6JOPH/m/bB9uNlglh1MevHb6WH6es9hkaHIL32y0= + + + Headers/GPUImageJFAVoronoiFilter.h + + hash + + 3ui/efguz79qgvg0D6fqjAgh2Aw= + + hash2 + + 2JBWIFLqAomN1KrRTWPmQIDiiJe+3FO+t++0+WGxFfs= + + + Headers/GPUImageKuwaharaFilter.h + + hash + + fykYwSfuURCv41hLJGh5qBx057Q= + + hash2 + + sA9k/oTgFK0Uh9Dwrm9QMzvWmkpAT0IzN55j46IA4kI= + + + Headers/GPUImageKuwaharaRadius3Filter.h + + hash + + nV+ZGOYZuJ3439z9GzV7yNfBHWg= + + hash2 + + BXRlHK84VKTiMfwvlN/9sPsMrs54z4nngEh3dEVnT/Y= + + + Headers/GPUImageLanczosResamplingFilter.h + + hash + + +I/Oeo4QqenPG3rtjq44mj3ERB4= + + hash2 + + nQo96CIDe70PPP87+55eqs6vsXAVYG6Rs6kesPKSHFM= + + + Headers/GPUImageLaplacianFilter.h + + hash + + RRZuKhYmTVGQDAcwMqlgQJbL8Do= + + hash2 + + AF5wFEcKGWxvjjaveKJL4VaaIDbmSCIqtnmidc+aGLw= + + + Headers/GPUImageLevelsFilter.h + + hash + + Gza69S6pgnbnZlwHKqjYaYEM/Ls= + + hash2 + + aXA3DT9RZIr1T8Lb0MCEZtLkiHvmIZg+CBoO6J6NzLY= + + + Headers/GPUImageLightenBlendFilter.h + + hash + + hayBBt+FLU4U7NCnluqr5rS7xRk= + + hash2 + + ET8UyfBJmI72Y0s5rM8klqi/Jj+k8wrgia73aZEmOKE= + + + Headers/GPUImageLineGenerator.h + + hash + + NQpyfhnEGd8NCcsAUYhjGqLSsv0= + + hash2 + + MRGJih9v1PrQu3DCpQahMSa9E/GXpIXk10vMwJfqY24= + + + Headers/GPUImageLinearBurnBlendFilter.h + + hash + + MSZ5D8DfxhhcWSBE/dbyqIF1WXU= + + hash2 + + dIOIlj7F3HMneuRTcj5d9sNyw0qwwN0gS0jLl3PD/Ro= + + + Headers/GPUImageLocalBinaryPatternFilter.h + + hash + + CoJvGvgmepvIE7xfBTmakrHwP/4= + + hash2 + + R0t/ozlZz3TZNGjRJpNzuKLF7bax6SJwHhw8J5sYSXU= + + + Headers/GPUImageLookupFilter.h + + hash + + w4z26ndizxXzKQJ88aVnAey4Fw0= + + hash2 + + E3Qynm/Y9oW7yvkOxIzcFvGI5vO8e8BTUysXDxuB468= + + + Headers/GPUImageLowPassFilter.h + + hash + + 31VwJGSTw5Pk3rUIBteL3mS5Fco= + + hash2 + + JRwsk35Z93O3p1peS2R7IhojSxfaZ2BxY/TSK236zcg= + + + Headers/GPUImageLuminanceRangeFilter.h + + hash + + 9bubuorseeL3CSW6/wDssVl51b0= + + hash2 + + /NchnrcZU2Ddo9+BtBg71GduPyrLT9To5nlH7E4v7dA= + + + Headers/GPUImageLuminanceThresholdFilter.h + + hash + + jriqFPHK7oD8U5a4NlRe5DAaCrE= + + hash2 + + aCceuVzAuSv+gOY8IpiNBS4vKYcncCjY1iW16gtj2bA= + + + Headers/GPUImageLuminosity.h + + hash + + D1xJBSH8RQe0r+tz433v5cooA4g= + + hash2 + + UZ6egL2OTEHOYc7SbGFL5mFB89UIMBS6mnepqLs/B68= + + + Headers/GPUImageLuminosityBlendFilter.h + + hash + + K9StpAOWlbVp000MEMTjrjPICtw= + + hash2 + + gY3eod3igaQlf72xEVrKGHfgy3JhIYMdHtuB3OXhDkw= + + + Headers/GPUImageMaskFilter.h + + hash + + 4me/bbKktSzR2tf91KFrCAFKpDw= + + hash2 + + 44fLCgJZ3nhCD3I7K7dXE3LD8R1B+4HUcpLAZqxrb5k= + + + Headers/GPUImageMedianFilter.h + + hash + + DCJ1QJxUxXII81YHvjbi2VxpGUY= + + hash2 + + JgHNxoUacL1AoxlIyZmiBnOquVjx9E2dRNNF0Lnl9ZU= + + + Headers/GPUImageMissEtikateFilter.h + + hash + + eXaIKblZRY2u2zx4jbCECbbG5Vk= + + hash2 + + LN9dNAxJG2g52O8M5SXg1afyFd4sQLoR9NC2pv1SYqQ= + + + Headers/GPUImageMonochromeFilter.h + + hash + + w7+SR2N75c+NS0vIJnTpxjlcyCo= + + hash2 + + uu8UF8NzH4i5tzau8UgDGqBvvhfgQoJf7w2B/LQKdsQ= + + + Headers/GPUImageMosaicFilter.h + + hash + + 4L1WsMRVAAen9AfkNC+gWJg+l5s= + + hash2 + + vpR3pcz7VW5jYrsmx1tIfg79EG31heIYqzwKeSAxM1M= + + + Headers/GPUImageMotionBlurFilter.h + + hash + + CxYZGDOwU5iVCUhz9pASd8U9E3k= + + hash2 + + kP+MzWFY5m1pGKfRWkFtEk5OfcxJVeXsCwObUknkp6E= + + + Headers/GPUImageMotionDetector.h + + hash + + T38nrFQZbb4DT2gQK9w/CCUmglk= + + hash2 + + XeBbcomtRo0PFMPiJnYn8h+2BCGhE1sGab6QYnDqAio= + + + Headers/GPUImageMovie.h + + hash + + n79CDkhuW4T4K1DOrWsM+UlNvH4= + + hash2 + + J9fI4lSsBinopjsPyjcN2QjqT7oZUmMzsL7A/vxh0DE= + + + Headers/GPUImageMovieComposition.h + + hash + + 9j3G+2oBkNiK1LmZya69OK7HPDw= + + hash2 + + aaw9hmnu18hWgAIEZZ9MxM3EVW02tzTcE4d18AZbigI= + + + Headers/GPUImageMovieWriter.h + + hash + + K/pCsJOeDezN4EvjevWNKuAoSBg= + + hash2 + + Oc4EIGiCqCU9k52XDAonto6br6IQsE0dNiacgjD6yew= + + + Headers/GPUImageMultiplyBlendFilter.h + + hash + + mKgyTRMmqRA8w9Xjc9C/f4ZwmAc= + + hash2 + + 9VW9vhsoZhmlS5i+ZTPdztkJz1vHh0+7KiComOfMSSE= + + + Headers/GPUImageNobleCornerDetectionFilter.h + + hash + + bv7MsymlAZaVPEyxgYOseUaQWBo= + + hash2 + + AMu9H7HP3AMOA6XRPwGWJOFEmaOu8bDY6ENZTn4S4Lk= + + + Headers/GPUImageNonMaximumSuppressionFilter.h + + hash + + RmDs6FthM8vOgj/yit6NluIJgVU= + + hash2 + + MOpciC/fDhr5mzbhVwjdtqfJjB8050Lc7fxLCqTOaoo= + + + Headers/GPUImageNormalBlendFilter.h + + hash + + o+1YuPUIGNrBx31AftBi4v7uBsI= + + hash2 + + KWYr1P82qvyRov0sPsAt7wgrEPS66a0CS2VX/l9O2mU= + + + Headers/GPUImageOpacityFilter.h + + hash + + PWUf8xzWuDzIl6ozfDwkWo29bAY= + + hash2 + + YU2SITgJxfijq4dMwA1rn+ap7ofJ4GZApfBODdnWz6k= + + + Headers/GPUImageOpeningFilter.h + + hash + + f+ZpSToNCGDCmLBneSEM3GAGFkg= + + hash2 + + iupkkLTpcTlVCCHR/Z+AjzpWBD0hiZ3OL0MUyGI3dts= + + + Headers/GPUImageOutput.h + + hash + + m3vHLviKj6yjen2H09FULLRYCCo= + + hash2 + + eNV7T+Ps5995UCwfqui5bOWl4jfSdJGrdfIAuj84Rvk= + + + Headers/GPUImageOverlayBlendFilter.h + + hash + + 85PVdX0FilNUyQTKvAwCAs+CpgI= + + hash2 + + 8jf5Nau0HK2mRHlKn2bsZ4tpnqUpaAxE+jTcDAuLbRo= + + + Headers/GPUImageParallelCoordinateLineTransformFilter.h + + hash + + pDJc3qAt8OZkni0KmcSGGZzeHdw= + + hash2 + + z/fymwIbzghrhsMaUBiU7mpMVgBOJEZ/+mg6edKFbOg= + + + Headers/GPUImagePerlinNoiseFilter.h + + hash + + LEZfIm8tBunGxiLLQ2HpmDe2YFo= + + hash2 + + SQdXvQUqxGOC4T1eQioh3t92KeSssTu4dCc0OJbKVas= + + + Headers/GPUImagePicture+TextureSubimage.h + + hash + + MTD+sWYHF3HDKTXOBU/4k+YtiPQ= + + hash2 + + 5ZfRJAF6cru81m3JCVLq64ZBuCS44FLHA6dK4jZacYc= + + + Headers/GPUImagePicture.h + + hash + + YXNkWRwAyvK6BCCdUpyOohow230= + + hash2 + + S7E95qShrP+xcVb0AoVzHEvOhXej5NBk3is3iciYdk8= + + + Headers/GPUImagePinchDistortionFilter.h + + hash + + E5LEMQvCRVqxd6gsBT+AtZCkBUk= + + hash2 + + hKVURpakr3W8xaLY6RniEcb4RtnaM2lqZ3kvUGX81ic= + + + Headers/GPUImagePixellateFilter.h + + hash + + FHcv8OCM25q+A1skTZrcCx/Zu3Q= + + hash2 + + zg1aFxBRXQuzEXKYLhw6AIoOPagEXlkQcmDsBvbZ6bE= + + + Headers/GPUImagePixellatePositionFilter.h + + hash + + Qz4V0yJTHDJTFP4omfEae9hrUmI= + + hash2 + + ZyjKNlPPzw2jpVYF2N6aSTwWVBAf493YJvwaJEE3mgU= + + + Headers/GPUImagePoissonBlendFilter.h + + hash + + lHLoDo44rTuaPiUPk4ND/XuE/qI= + + hash2 + + DIu/PL3Z/lwkNnrm/eb9Zr3CHUIbNOd1joQVqSRoj4E= + + + Headers/GPUImagePolarPixellateFilter.h + + hash + + 5aGVWSvzWEzu4viAYSY/9oiE3uI= + + hash2 + + V2t+bRltNSBKaGn4RiSK3i6rzfXQDN5sEGXlQLBCVvs= + + + Headers/GPUImagePolkaDotFilter.h + + hash + + SrpQ4VGsvj8g6sOzDJg/1KkQbgk= + + hash2 + + cOe85ACBynlEg6fXjt3/UWUDN0THJCa7xNPQdRRJZzg= + + + Headers/GPUImagePosterizeFilter.h + + hash + + cKYi3zjWrxNTAxMEKOr2dzuHkmc= + + hash2 + + lw0hmuQnnzI/WHe0bkUJRJbR6ywZKAK0rBNgceNhQ4o= + + + Headers/GPUImagePrewittEdgeDetectionFilter.h + + hash + + N8toPrFwQ2Ugw+k+3OZuvSH/rM8= + + hash2 + + GgmG5NLg6kFpZARGa9HrYAWjTJ8rAVojkF2BGCZ8l6w= + + + Headers/GPUImageRGBClosingFilter.h + + hash + + 0kDf1NDSmJa9qTXWXRJn0rqzVZM= + + hash2 + + c0+MFJk161JMv3y3sze/mDS2hDNRDRBe+z7mI1nyJGA= + + + Headers/GPUImageRGBDilationFilter.h + + hash + + ZR3Z5CpVv/S1H1a6U4H92d1XNuY= + + hash2 + + iGqoh0JYt8UbB3Lt8xW39hKGIqXE2q5FQKn6jhYbfsk= + + + Headers/GPUImageRGBErosionFilter.h + + hash + + UGNRsq5EKscoJMw5AWmpNXYWTdM= + + hash2 + + fsgqB8hh8oihlpdu33ab0FKwexgQhHhB6wZ/pXHM7j8= + + + Headers/GPUImageRGBFilter.h + + hash + + gkFaTAjOUwlssgYrnCqqNPqVZVQ= + + hash2 + + JwGWLCiHtrpt8JoE/FPaguX+O/UnPMEyhq2TQ+g8J/0= + + + Headers/GPUImageRGBOpeningFilter.h + + hash + + a/PEfHNhIatpSnplj0x5m+Z/i0M= + + hash2 + + wPibkpF3L/UUegJv1oHN7YzItjd1POfuS32ti6ZFUE8= + + + Headers/GPUImageRawDataInput.h + + hash + + bYPSXj/dY/MXY9pd631dd+SlD5Q= + + hash2 + + zzOxphZH2h5xHQG/SkKtkp9sbn9E4NGwZTdpP+VQr70= + + + Headers/GPUImageRawDataOutput.h + + hash + + HI3YzUw4Cdi8JWb2rjQJQ/6EFew= + + hash2 + + Wdvq2164pOjm+QdkxG3JRdwbOP1AViTbcDaDts4m+OU= + + + Headers/GPUImageSaturationBlendFilter.h + + hash + + sVIc5ZOIrLTAYaM6iYDvrdQmllM= + + hash2 + + j5Xw76lCYYHHF0OCr5buwU5buMO721YBeFBC4LTDfd8= + + + Headers/GPUImageSaturationFilter.h + + hash + + ArjLRNME7pbUYXWMMariBasSf2A= + + hash2 + + kTfjt6W8zKzvySulYNsAi2GO5FIqcalE8T2q9Osm+SA= + + + Headers/GPUImageScreenBlendFilter.h + + hash + + IlG+2VUkgjLPJPb6pjaf6qp8M7k= + + hash2 + + zRoyxXOR4v+JabDEN8AScZH9i7NHO9EXGh3dg4iVF0c= + + + Headers/GPUImageSepiaFilter.h + + hash + + cersznQ+o5cekJw64xa6OobZLdw= + + hash2 + + EOFwAQk6nmGdliRc3qoILx10b2LVlWnuJRGDmt+Mo+s= + + + Headers/GPUImageSharpenFilter.h + + hash + + V+QyaRQuTUpPftBbcZfmDw8wl64= + + hash2 + + MWQp5QmDIl7folDxjAjYqzY4ExDcYNxXDQ5BT2Zf5Fg= + + + Headers/GPUImageShiTomasiFeatureDetectionFilter.h + + hash + + pa7nhtULhfoyLOgoGvsm/+uhcfc= + + hash2 + + hckgWZWzeoGiwik1hozEhEZV0oyDDd/L5lJADeqJUUw= + + + Headers/GPUImageSingleComponentGaussianBlurFilter.h + + hash + + 7/jSb9ceaMbbLIPMRzHvaXhXNXo= + + hash2 + + yjGn49aEMOyI+uL9JLS6k+5jy3jFjYXkvMiF0+OrqiQ= + + + Headers/GPUImageSketchFilter.h + + hash + + kh4W2i34QVaPpUxLoB7QhmiZBMM= + + hash2 + + 9bX46choNKf3/pNqSfKi0ZRjVp3fwoE+FOraWoXT5U8= + + + Headers/GPUImageSmoothToonFilter.h + + hash + + LBI7rJgJxalx0XL08kyxrw2i7dU= + + hash2 + + n3c9Dpr6M6F5vnRxsRRM/Xs/pSCHdeW8agCaw/VhdtM= + + + Headers/GPUImageSobelEdgeDetectionFilter.h + + hash + + rpWNWm5HHwlSq1ZQ1vaUiHShjhk= + + hash2 + + vUe/xIvG0/XHntNgdHn/UZJ1UIrEGV3LpwC/5WyP8FY= + + + Headers/GPUImageSoftEleganceFilter.h + + hash + + NSpPLMjyIznNBnV+WlEbNU/JCrQ= + + hash2 + + rRxPvkX+g8XECQXRtpzE4LDHM05y38HkJtm8v+IQpbw= + + + Headers/GPUImageSoftLightBlendFilter.h + + hash + + LCmUXDPv2Y/1XTjM8l3xkfkTgjQ= + + hash2 + + zx5jAItoAxN4cpOM7q/5bGu+3KZkWHG9YCPm+3qm/Do= + + + Headers/GPUImageSolarizeFilter.h + + hash + + maBeg9l2rrPl76DuGl12ZFoyiro= + + hash2 + + X/gAHJd5EBZWZ5EpyJOq3SAOCpmfJn+V0ygY7DedRuo= + + + Headers/GPUImageSolidColorGenerator.h + + hash + + obElPdknS4/M5NllFW4ou0UqW6k= + + hash2 + + N4bXTgVq0M+q6ebq+5jIKzZHNoIRnI8m4hK+yc+hZBI= + + + Headers/GPUImageSourceOverBlendFilter.h + + hash + + dZ+4Jmo2+RTUBZ1ZwvOqklAUXNs= + + hash2 + + L6DvPi/MXUnI57bPnCK7yJhWRbcz+UTssUeKoFRi7wQ= + + + Headers/GPUImageSphereRefractionFilter.h + + hash + + /LGpL2OyUYK/pDU/r6rtolh+9HI= + + hash2 + + IKSKm4l8karsOC8//09n3U4n0/D4MWY/9hZd7ucXYTE= + + + Headers/GPUImageStillCamera.h + + hash + + b1iHai/5pKKMH5szpPv1a8TqvHk= + + hash2 + + O8/dgEjSaZqkBxS9d/Cu8O9TfON8T5YLSMpAl0lpjHY= + + + Headers/GPUImageStretchDistortionFilter.h + + hash + + dM2Pu4e4jVqbGEB/eTwojOVH/Oo= + + hash2 + + N+Food7xczbywFGgKdlBT0YerM9AdnHwDXTbJXxINGQ= + + + Headers/GPUImageSubtractBlendFilter.h + + hash + + 6eceNigAuB1MFFkkgb9wqH1cxts= + + hash2 + + q6PvLPwaNqoHWXR2qFBIBzuX5CtbGH5QCJq/lyC3tug= + + + Headers/GPUImageSwirlFilter.h + + hash + + W1EBsPkwgjRQ4g29xItEnYCj4m4= + + hash2 + + gJbbUid87G8hYGaiJzjcdUKCg51Ml9P4WvOVQIFxXH8= + + + Headers/GPUImageTextureInput.h + + hash + + ZpUsaEiobJqk/ZWd2p34uo0Myk8= + + hash2 + + PpUr8cpxdLNEx0EmKVjGH+LFkPgbwR+hZYhJAaFqMS4= + + + Headers/GPUImageTextureOutput.h + + hash + + FBr341QKXjYfCZRp9/tRKr7hPss= + + hash2 + + B9+caOoMwnej6JBzj6LYBeCEERU9aEuc1WKXzVHukY8= + + + Headers/GPUImageThreeInputFilter.h + + hash + + O4NFo3F8qk6RKRe9vA4aN1nLcCo= + + hash2 + + SOfrv/URsFozR9VcwGsqbbKPKnXUZ1QUXMkksdGTCjs= + + + Headers/GPUImageThresholdEdgeDetectionFilter.h + + hash + + 8XzR1Sd3L8iYTlhq4r1Iz+VQvOw= + + hash2 + + Qa8DBG/NW9e/RUwZNhIeUkU14CXlD/lczigMJUrienY= + + + Headers/GPUImageThresholdSketchFilter.h + + hash + + qoUqrEAH1WyTko9oJYejdFlJ4vg= + + hash2 + + 30KG9/JXFlgwAPZfb45q8G1U9k5TQASuJ0fqa2MA3Dk= + + + Headers/GPUImageThresholdedNonMaximumSuppressionFilter.h + + hash + + qlRa/0ARLN0BmYYIfBBscRL/laA= + + hash2 + + ZBR5uOGseMKjNnCQHgtsMAdVnk6ur2SsxZkr2V21VMo= + + + Headers/GPUImageTiltShiftFilter.h + + hash + + 2e6BVWefqZWB3q/boU0T3pywASk= + + hash2 + + 5riLyAkS5NqMszJpHMYIp3nKke/8DbLH1iPSQILEDPs= + + + Headers/GPUImageToneCurveFilter.h + + hash + + TUxmjstVUOFZkzUBdhC8py2pvlQ= + + hash2 + + N9zDY7hAy5HZMyYbdca2Iue0igCNIpRhzKESgj9Ea9I= + + + Headers/GPUImageToonFilter.h + + hash + + IdFNHeEyRIrIFe7/BewlogHt6P8= + + hash2 + + cOTltWGPEhT/cO+57ACQlz1kN4YRzTF+9PYxnRuij8M= + + + Headers/GPUImageTransformFilter.h + + hash + + hYC1or0IxZQGx6tlTlsWGIEAGtg= + + hash2 + + uTs9cKEsBvpuOCy3AKTaQ/yW0+AOcQOOGFxhVJICyfU= + + + Headers/GPUImageTwoInputCrossTextureSamplingFilter.h + + hash + + tTeOrYRvFnN+JRl1Zl1Pnx7WksM= + + hash2 + + DHHFuOrA6opK/k2Xf6TqWvaeCNqypU4ni+Xtp4aSfaw= + + + Headers/GPUImageTwoInputFilter.h + + hash + + xYdAQuIcdQXjRF9BzTSZa6+epLY= + + hash2 + + wTMtDJ7dagkp3XU4G5GMzKDEw7nd4IFKTSrhpiI9ixk= + + + Headers/GPUImageTwoPassFilter.h + + hash + + eIvODox9IFf/FwSDdwcO9QBlSuE= + + hash2 + + SagpZ7zCovvMLtAZO5NgpY8Uau+JaMrAvdCv9L4ikm4= + + + Headers/GPUImageTwoPassTextureSamplingFilter.h + + hash + + tJLxawc8sQqJNWN1mD+z/1HnW34= + + hash2 + + 1ZXpcyRsASuwbTJv9gUkW5kOzjOm7BSeHLCGSnVX20Q= + + + Headers/GPUImageUIElement.h + + hash + + gst311gU8Bppy9Y9ZJu1qsP15ig= + + hash2 + + yaQMsskSlJGUlmmsWQIlemOdJr8w2x544SvX3K4X3OE= + + + Headers/GPUImageUnsharpMaskFilter.h + + hash + + tvbQ+h7cIOa1obTOfERZEKlMLgc= + + hash2 + + hjJzJqo1V3NzioKoh8RUxrv7ocAuPWwt42fJn9P+pxs= + + + Headers/GPUImageVideoCamera.h + + hash + + ZJU1/2IWDnlHhL+SUU00uR55r1A= + + hash2 + + IK85izbvkukB3otOJPCfbzu4xT89NMju/fLvmXHT2HA= + + + Headers/GPUImageView.h + + hash + + JttiO2LRvk7193e1j1cJBYNlqwc= + + hash2 + + uzK5RM09dP1YQyShaelRxyx96hsXq7+nuFe3RiMTOGQ= + + + Headers/GPUImageVignetteFilter.h + + hash + + 6/RMBS0wP+W+Qrdw9XbQFwR+A2U= + + hash2 + + KUx+kPEOujDg1vEHKNxCJ/IpKNQqqCcgbFwhzkfYZ/o= + + + Headers/GPUImageVoronoiConsumerFilter.h + + hash + + uRq8kWqFIpZtAzB8vM+lmf3/NqE= + + hash2 + + Wkb3AFqrlTm2PlWiJmV/l2fmzwUfqHHNNwBgYwkT08Q= + + + Headers/GPUImageWeakPixelInclusionFilter.h + + hash + + 7dtwUyahMxEVLznJA5pilE+TxIE= + + hash2 + + jeUFEwTVEJIJ+vvpp1F4D9WcxtGDRopCuyIFOVjZNNg= + + + Headers/GPUImageWhiteBalanceFilter.h + + hash + + 0zBzM5GkMhSrWwtB//vJZzLVYDY= + + hash2 + + 6+iCbOlWI+6MQRp1hkJP3UAp//Zy2lAkhCVOa8B0cdM= + + + Headers/GPUImageXYDerivativeFilter.h + + hash + + s3VqLQtQvt8iRXqYCetH4F4V3/E= + + hash2 + + 42JierB3Feua24ZX4cPf4ntsfK2QPveQlVJ5L1tmX7o= + + + Headers/GPUImageZoomBlurFilter.h + + hash + + w0V2pYVUIFam3/3fhAX2qNtesCg= + + hash2 + + v4JMN9d0pq+IQA7BT48+iOMT5UTyQ1OQ/aa63dBW5s0= + + + Headers/GPUImageiOSBlurFilter.h + + hash + + bq2sOdRJnN77Fv7I1e2CXZj/pFU= + + hash2 + + ZIpPOgWu86QLBgDlCCnH6BFoTKNxHbGuNIblBFuoJ3c= + + + Modules/module.modulemap + + hash + + R0/ACD1+K7JSlm2BJjfVTa4Z+LU= + + hash2 + + 2s78k1ou/hrQ+/btMmSKO1GX/hH0oV4uaGcScKVpFyA= + + + + rules + + ^ + + ^.*\.lproj/ + + optional + + weight + 1000 + + ^.*\.lproj/locversion.plist$ + + omit + + weight + 1100 + + ^version.plist$ + + + rules2 + + .*\.dSYM($|/) + + weight + 11 + + ^ + + weight + 20 + + ^(.*/)?\.DS_Store$ + + omit + + weight + 2000 + + ^(Frameworks|SharedFrameworks|PlugIns|Plug-ins|XPCServices|Helpers|MacOS|Library/(Automator|Spotlight|LoginItems))/ + + nested + + weight + 10 + + ^.* + + ^.*\.lproj/ + + optional + + weight + 1000 + + ^.*\.lproj/locversion.plist$ + + omit + + weight + 1100 + + ^Info\.plist$ + + omit + + weight + 20 + + ^PkgInfo$ + + omit + + weight + 20 + + ^[^/]+$ + + nested + + weight + 10 + + ^embedded\.provisionprofile$ + + weight + 20 + + ^version\.plist$ + + weight + 20 + + + + diff --git a/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/_CodeSignature/CodeSignature b/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/_CodeSignature/CodeSignature new file mode 100644 index 00000000..ccf87fae Binary files /dev/null and b/samples/LFLiveKitFrameworkDemo/vendors/GPUImage.framework/_CodeSignature/CodeSignature differ diff --git a/samples/LFLiveKitFrameworkDemo/vendors/pili-librtmp.framework/Headers/amf.h b/samples/LFLiveKitFrameworkDemo/vendors/pili-librtmp.framework/Headers/amf.h new file mode 100755 index 00000000..77f93e84 --- /dev/null +++ b/samples/LFLiveKitFrameworkDemo/vendors/pili-librtmp.framework/Headers/amf.h @@ -0,0 +1,180 @@ +#ifndef __AMF_H__ +#define __AMF_H__ +/* + * Copyright (C) 2005-2008 Team XBMC + * http://www.xbmc.org + * Copyright (C) 2008-2009 Andrej Stepanchuk + * Copyright (C) 2009-2010 Howard Chu + * + * This file is part of librtmp. + * + * librtmp is free software; you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation; either version 2.1, + * or (at your option) any later version. + * + * librtmp is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with librtmp see the file COPYING. If not, write to + * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. + * http://www.gnu.org/copyleft/lgpl.html + */ + +#include + +#ifndef TRUE +#define TRUE 1 +#define FALSE 0 +#endif + +#ifdef __cplusplus +extern "C" { +#endif + +typedef enum { + AMF_NUMBER = 0, + AMF_BOOLEAN, + AMF_STRING, + AMF_OBJECT, + AMF_MOVIECLIP, /* reserved, not used */ + AMF_NULL, + AMF_UNDEFINED, + AMF_REFERENCE, + AMF_ECMA_ARRAY, + AMF_OBJECT_END, + AMF_STRICT_ARRAY, + AMF_DATE, + AMF_LONG_STRING, + AMF_UNSUPPORTED, + AMF_RECORDSET, /* reserved, not used */ + AMF_XML_DOC, + AMF_TYPED_OBJECT, + AMF_AVMPLUS, /* switch to AMF3 */ + AMF_INVALID = 0xff +} AMFDataType; + +typedef enum { + AMF3_UNDEFINED = 0, + AMF3_NULL, + AMF3_FALSE, + AMF3_TRUE, + AMF3_INTEGER, + AMF3_DOUBLE, + AMF3_STRING, + AMF3_XML_DOC, + AMF3_DATE, + AMF3_ARRAY, + AMF3_OBJECT, + AMF3_XML, + AMF3_BYTE_ARRAY +} AMF3DataType; + +typedef struct AVal { + char *av_val; + int av_len; +} AVal; +#define AVC(str) \ + { str, sizeof(str) - 1 } +#define AVMATCH(a1, a2) \ + ((a1)->av_len == (a2)->av_len && \ + !memcmp((a1)->av_val, (a2)->av_val, (a1)->av_len)) + +struct AMFObjectProperty; + +typedef struct AMFObject { + int o_num; + struct AMFObjectProperty *o_props; +} AMFObject; + +typedef struct AMFObjectProperty { + AVal p_name; + AMFDataType p_type; + union { + double p_number; + AVal p_aval; + AMFObject p_object; + } p_vu; + int16_t p_UTCoffset; +} AMFObjectProperty; + +char *AMF_EncodeString(char *output, char *outend, const AVal *str); +char *AMF_EncodeNumber(char *output, char *outend, double dVal); +char *AMF_EncodeInt16(char *output, char *outend, short nVal); +char *AMF_EncodeInt24(char *output, char *outend, int nVal); +char *AMF_EncodeInt32(char *output, char *outend, int nVal); +char *AMF_EncodeBoolean(char *output, char *outend, int bVal); + +/* Shortcuts for AMFProp_Encode */ +char *AMF_EncodeNamedString(char *output, char *outend, const AVal *name, + const AVal *value); +char *AMF_EncodeNamedNumber(char *output, char *outend, const AVal *name, + double dVal); +char *AMF_EncodeNamedBoolean(char *output, char *outend, const AVal *name, + int bVal); + +unsigned short AMF_DecodeInt16(const char *data); +unsigned int AMF_DecodeInt24(const char *data); +unsigned int AMF_DecodeInt32(const char *data); +void AMF_DecodeString(const char *data, AVal *str); +void AMF_DecodeLongString(const char *data, AVal *str); +int AMF_DecodeBoolean(const char *data); +double AMF_DecodeNumber(const char *data); + +char *AMF_Encode(AMFObject *obj, char *pBuffer, char *pBufEnd); +int AMF_Decode(AMFObject *obj, const char *pBuffer, int nSize, int bDecodeName); +int AMF_DecodeArray(AMFObject *obj, const char *pBuffer, int nSize, + int nArrayLen, int bDecodeName); +int AMF3_Decode(AMFObject *obj, const char *pBuffer, int nSize, + int bDecodeName); +void AMF_Dump(AMFObject *obj); +void AMF_Reset(AMFObject *obj); + +void AMF_AddProp(AMFObject *obj, const AMFObjectProperty *prop); +int AMF_CountProp(AMFObject *obj); +AMFObjectProperty *AMF_GetProp(AMFObject *obj, const AVal *name, int nIndex); + +AMFDataType AMFProp_GetType(AMFObjectProperty *prop); +void AMFProp_SetNumber(AMFObjectProperty *prop, double dval); +void AMFProp_SetBoolean(AMFObjectProperty *prop, int bflag); +void AMFProp_SetString(AMFObjectProperty *prop, AVal *str); +void AMFProp_SetObject(AMFObjectProperty *prop, AMFObject *obj); + +void AMFProp_GetName(AMFObjectProperty *prop, AVal *name); +void AMFProp_SetName(AMFObjectProperty *prop, AVal *name); +double AMFProp_GetNumber(AMFObjectProperty *prop); +int AMFProp_GetBoolean(AMFObjectProperty *prop); +void AMFProp_GetString(AMFObjectProperty *prop, AVal *str); +void AMFProp_GetObject(AMFObjectProperty *prop, AMFObject *obj); + +int AMFProp_IsValid(AMFObjectProperty *prop); + +char *AMFProp_Encode(AMFObjectProperty *prop, char *pBuffer, char *pBufEnd); +int AMF3Prop_Decode(AMFObjectProperty *prop, const char *pBuffer, int nSize, + int bDecodeName); +int AMFProp_Decode(AMFObjectProperty *prop, const char *pBuffer, int nSize, + int bDecodeName); + +void AMFProp_Dump(AMFObjectProperty *prop); +void AMFProp_Reset(AMFObjectProperty *prop); + +typedef struct AMF3ClassDef { + AVal cd_name; + char cd_externalizable; + char cd_dynamic; + int cd_num; + AVal *cd_props; +} AMF3ClassDef; + +void AMF3CD_AddProp(AMF3ClassDef *cd, AVal *prop); +AVal *AMF3CD_GetProp(AMF3ClassDef *cd, int idx); + +#ifdef __cplusplus +} +#endif + +#endif /* __AMF_H__ */ diff --git a/samples/LFLiveKitFrameworkDemo/vendors/pili-librtmp.framework/Headers/bytes.h b/samples/LFLiveKitFrameworkDemo/vendors/pili-librtmp.framework/Headers/bytes.h new file mode 100755 index 00000000..87221cf1 --- /dev/null +++ b/samples/LFLiveKitFrameworkDemo/vendors/pili-librtmp.framework/Headers/bytes.h @@ -0,0 +1,91 @@ +/* + * Copyright (C) 2005-2008 Team XBMC + * http://www.xbmc.org + * Copyright (C) 2008-2009 Andrej Stepanchuk + * Copyright (C) 2009-2010 Howard Chu + * + * This file is part of librtmp. + * + * librtmp is free software; you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation; either version 2.1, + * or (at your option) any later version. + * + * librtmp is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with librtmp see the file COPYING. If not, write to + * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. + * http://www.gnu.org/copyleft/lgpl.html + */ + +#ifndef __BYTES_H__ +#define __BYTES_H__ + +#include + +#ifdef _WIN32 +/* Windows is little endian only */ +#define __LITTLE_ENDIAN 1234 +#define __BIG_ENDIAN 4321 +#define __BYTE_ORDER __LITTLE_ENDIAN +#define __FLOAT_WORD_ORDER __BYTE_ORDER + +typedef unsigned char uint8_t; + +#else /* !_WIN32 */ + +#include + +#if defined(BYTE_ORDER) && !defined(__BYTE_ORDER) +#define __BYTE_ORDER BYTE_ORDER +#endif + +#if defined(BIG_ENDIAN) && !defined(__BIG_ENDIAN) +#define __BIG_ENDIAN BIG_ENDIAN +#endif + +#if defined(LITTLE_ENDIAN) && !defined(__LITTLE_ENDIAN) +#define __LITTLE_ENDIAN LITTLE_ENDIAN +#endif + +#endif /* !_WIN32 */ + +/* define default endianness */ +#ifndef __LITTLE_ENDIAN +#define __LITTLE_ENDIAN 1234 +#endif + +#ifndef __BIG_ENDIAN +#define __BIG_ENDIAN 4321 +#endif + +#ifndef __BYTE_ORDER +#warning "Byte order not defined on your system, assuming little endian!" +#define __BYTE_ORDER __LITTLE_ENDIAN +#endif + +/* ok, we assume to have the same float word order and byte order if float word + * order is not defined */ +#ifndef __FLOAT_WORD_ORDER +#warning "Float word order not defined, assuming the same as byte order!" +#define __FLOAT_WORD_ORDER __BYTE_ORDER +#endif + +#if !defined(__BYTE_ORDER) || !defined(__FLOAT_WORD_ORDER) +#error "Undefined byte or float word order!" +#endif + +#if __FLOAT_WORD_ORDER != __BIG_ENDIAN && __FLOAT_WORD_ORDER != __LITTLE_ENDIAN +#error "Unknown/unsupported float word order!" +#endif + +#if __BYTE_ORDER != __BIG_ENDIAN && __BYTE_ORDER != __LITTLE_ENDIAN +#error "Unknown/unsupported byte order!" +#endif + +#endif diff --git a/samples/LFLiveKitFrameworkDemo/vendors/pili-librtmp.framework/Headers/dh.h b/samples/LFLiveKitFrameworkDemo/vendors/pili-librtmp.framework/Headers/dh.h new file mode 100755 index 00000000..d7aeb5a5 --- /dev/null +++ b/samples/LFLiveKitFrameworkDemo/vendors/pili-librtmp.framework/Headers/dh.h @@ -0,0 +1,345 @@ +/* RTMPDump - Diffie-Hellmann Key Exchange + * Copyright (C) 2009 Andrej Stepanchuk + * Copyright (C) 2009-2010 Howard Chu + * + * This file is part of librtmp. + * + * librtmp is free software; you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation; either version 2.1, + * or (at your option) any later version. + * + * librtmp is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with librtmp see the file COPYING. If not, write to + * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. + * http://www.gnu.org/copyleft/lgpl.html + */ + +#include +#include +#include +#include +#include + +#ifdef USE_POLARSSL +#include +typedef mpi *MP_t; +#define MP_new(m) \ + m = malloc(sizeof(mpi)); \ + mpi_init(m, NULL) +#define MP_set_w(mpi, w) mpi_lset(mpi, w) +#define MP_cmp(u, v) mpi_cmp_mpi(u, v) +#define MP_set(u, v) mpi_copy(u, v) +#define MP_sub_w(mpi, w) mpi_sub_int(mpi, mpi, w) +#define MP_cmp_1(mpi) mpi_cmp_int(mpi, 1) +#define MP_modexp(r, y, q, p) mpi_exp_mod(r, y, q, p, NULL) +#define MP_free(mpi) \ + mpi_free(mpi, NULL); \ + free(mpi) +#define MP_gethex(u, hex, res) \ + MP_new(u); \ + res = mpi_read_string(u, 16, hex) == 0 +#define MP_bytes(u) mpi_size(u) +#define MP_setbin(u, buf, len) mpi_write_binary(u, buf, len) +#define MP_getbin(u, buf, len) \ + MP_new(u); \ + mpi_read_binary(u, buf, len) + +typedef struct MDH { + MP_t p; + MP_t g; + MP_t pub_key; + MP_t priv_key; + long length; + dhm_context ctx; +} MDH; + +#define MDH_new() calloc(1, sizeof(MDH)) +#define MDH_free(vp) \ + { \ + MDH *dh = vp; \ + dhm_free(&dh->ctx); \ + MP_free(dh->p); \ + MP_free(dh->g); \ + MP_free(dh->pub_key); \ + MP_free(dh->priv_key); \ + free(dh); \ + } + +static int MDH_generate_key(MDH *dh) { + unsigned char out[2]; + MP_set(&dh->ctx.P, dh->p); + MP_set(&dh->ctx.G, dh->g); + dh->ctx.len = 128; + dhm_make_public(&dh->ctx, 1024, out, 1, havege_rand, &RTMP_TLS_ctx->hs); + MP_new(dh->pub_key); + MP_new(dh->priv_key); + MP_set(dh->pub_key, &dh->ctx.GX); + MP_set(dh->priv_key, &dh->ctx.X); + return 1; +} + +static int MDH_compute_key(uint8_t *secret, size_t len, MP_t pub, MDH *dh) { + int n = len; + MP_set(&dh->ctx.GY, pub); + dhm_calc_secret(&dh->ctx, secret, &n); + return 0; +} + +#elif defined(USE_GNUTLS) +#include +typedef gcry_mpi_t MP_t; +#define MP_new(m) m = gcry_mpi_new(1) +#define MP_set_w(mpi, w) gcry_mpi_set_ui(mpi, w) +#define MP_cmp(u, v) gcry_mpi_cmp(u, v) +#define MP_set(u, v) gcry_mpi_set(u, v) +#define MP_sub_w(mpi, w) gcry_mpi_sub_ui(mpi, mpi, w) +#define MP_cmp_1(mpi) gcry_mpi_cmp_ui(mpi, 1) +#define MP_modexp(r, y, q, p) gcry_mpi_powm(r, y, q, p) +#define MP_free(mpi) gcry_mpi_release(mpi) +#define MP_gethex(u, hex, res) \ + res = (gcry_mpi_scan(&u, GCRYMPI_FMT_HEX, hex, 0, 0) == 0) +#define MP_bytes(u) (gcry_mpi_get_nbits(u) + 7) / 8 +#define MP_setbin(u, buf, len) \ + gcry_mpi_print(GCRYMPI_FMT_USG, buf, len, NULL, u) +#define MP_getbin(u, buf, len) \ + gcry_mpi_scan(&u, GCRYMPI_FMT_USG, buf, len, NULL) + +typedef struct MDH { + MP_t p; + MP_t g; + MP_t pub_key; + MP_t priv_key; + long length; +} MDH; + +#define MDH_new() calloc(1, sizeof(MDH)) +#define MDH_free(dh) \ + do { \ + MP_free(((MDH *)(dh))->p); \ + MP_free(((MDH *)(dh))->g); \ + MP_free(((MDH *)(dh))->pub_key); \ + MP_free(((MDH *)(dh))->priv_key); \ + free(dh); \ + } while (0) + +extern MP_t gnutls_calc_dh_secret(MP_t *priv, MP_t g, MP_t p); +extern MP_t gnutls_calc_dh_key(MP_t y, MP_t x, MP_t p); + +#define MDH_generate_key(dh) \ + (dh->pub_key = gnutls_calc_dh_secret(&dh->priv_key, dh->g, dh->p)) +static int MDH_compute_key(uint8_t *secret, size_t len, MP_t pub, MDH *dh) { + MP_t sec = gnutls_calc_dh_key(pub, dh->priv_key, dh->p); + if (sec) { + MP_setbin(sec, secret, len); + MP_free(sec); + return 0; + } else + return -1; +} + +#else /* USE_OPENSSL */ +#include +#include + +typedef BIGNUM *MP_t; +#define MP_new(m) m = BN_new() +#define MP_set_w(mpi, w) BN_set_word(mpi, w) +#define MP_cmp(u, v) BN_cmp(u, v) +#define MP_set(u, v) BN_copy(u, v) +#define MP_sub_w(mpi, w) BN_sub_word(mpi, w) +#define MP_cmp_1(mpi) BN_cmp(mpi, BN_value_one()) +#define MP_modexp(r, y, q, p) \ + do { \ + BN_CTX *ctx = BN_CTX_new(); \ + BN_mod_exp(r, y, q, p, ctx); \ + BN_CTX_free(ctx); \ + } while (0) +#define MP_free(mpi) BN_free(mpi) +#define MP_gethex(u, hex, res) res = BN_hex2bn(&u, hex) +#define MP_bytes(u) BN_num_bytes(u) +#define MP_setbin(u, buf, len) BN_bn2bin(u, buf) +#define MP_getbin(u, buf, len) u = BN_bin2bn(buf, len, 0) + +#define MDH DH +#define MDH_new() DH_new() +#define MDH_free(dh) DH_free(dh) +#define MDH_generate_key(dh) DH_generate_key(dh) +#define MDH_compute_key(secret, seclen, pub, dh) DH_compute_key(secret, pub, dh) + +#endif + +#include "dhgroups.h" +#include "log.h" + +/* RFC 2631, Section 2.1.5, http://www.ietf.org/rfc/rfc2631.txt */ +static int isValidPublicKey(MP_t y, MP_t p, MP_t q) { + int ret = TRUE; + MP_t bn; + assert(y); + + MP_new(bn); + assert(bn); + + /* y must lie in [2,p-1] */ + MP_set_w(bn, 1); + if (MP_cmp(y, bn) < 0) { + RTMP_Log(RTMP_LOGERROR, "DH public key must be at least 2"); + ret = FALSE; + goto failed; + } + + /* bn = p-2 */ + MP_set(bn, p); + MP_sub_w(bn, 1); + if (MP_cmp(y, bn) > 0) { + RTMP_Log(RTMP_LOGERROR, "DH public key must be at most p-2"); + ret = FALSE; + goto failed; + } + + /* Verify with Sophie-Germain prime + * + * This is a nice test to make sure the public key position is calculated + * correctly. This test will fail in about 50% of the cases if applied to + * random data. + */ + if (q) { + /* y must fulfill y^q mod p = 1 */ + MP_modexp(bn, y, q, p); + + if (MP_cmp_1(bn) != 0) { + RTMP_Log(RTMP_LOGWARNING, "DH public key does not fulfill y^q mod p = 1"); + } + } + +failed: + MP_free(bn); + return ret; +} + +static MDH *DHInit(int nKeyBits) { + size_t res; + MDH *dh = MDH_new(); + + if (!dh) + goto failed; + + MP_new(dh->g); + + if (!dh->g) + goto failed; + + MP_gethex(dh->p, P1024, res); /* prime P1024, see dhgroups.h */ + if (!res) { + goto failed; + } + + MP_set_w(dh->g, 2); /* base 2 */ + + dh->length = nKeyBits; + return dh; + +failed: + if (dh) + MDH_free(dh); + + return 0; +} + +static int DHGenerateKey(MDH *dh) { + size_t res = 0; + if (!dh) + return 0; + + while (!res) { + MP_t q1 = NULL; + + if (!MDH_generate_key(dh)) + return 0; + + MP_gethex(q1, Q1024, res); + assert(res); + + res = isValidPublicKey(dh->pub_key, dh->p, q1); + if (!res) { + MP_free(dh->pub_key); + MP_free(dh->priv_key); + dh->pub_key = dh->priv_key = 0; + } + + MP_free(q1); + } + return 1; +} + +/* fill pubkey with the public key in BIG ENDIAN order + * 00 00 00 00 00 x1 x2 x3 ..... + */ + +static int DHGetPublicKey(MDH *dh, uint8_t *pubkey, size_t nPubkeyLen) { + int len; + if (!dh || !dh->pub_key) + return 0; + + len = MP_bytes(dh->pub_key); + if (len <= 0 || len > (int)nPubkeyLen) + return 0; + + memset(pubkey, 0, nPubkeyLen); + MP_setbin(dh->pub_key, pubkey + (nPubkeyLen - len), len); + return 1; +} + +#if 0 /* unused */ +static int +DHGetPrivateKey(MDH *dh, uint8_t *privkey, size_t nPrivkeyLen) +{ + if (!dh || !dh->priv_key) + return 0; + + int len = MP_bytes(dh->priv_key); + if (len <= 0 || len > (int) nPrivkeyLen) + return 0; + + memset(privkey, 0, nPrivkeyLen); + MP_setbin(dh->priv_key, privkey + (nPrivkeyLen - len), len); + return 1; +} +#endif + +/* computes the shared secret key from the private MDH value and the + * other party's public key (pubkey) + */ +static int DHComputeSharedSecretKey(MDH *dh, uint8_t *pubkey, size_t nPubkeyLen, + uint8_t *secret) { + MP_t q1 = NULL, pubkeyBn = NULL; + size_t len; + int res; + + if (!dh || !secret || nPubkeyLen >= INT_MAX) + return -1; + + MP_getbin(pubkeyBn, pubkey, nPubkeyLen); + if (!pubkeyBn) + return -1; + + MP_gethex(q1, Q1024, len); + assert(len); + + if (isValidPublicKey(pubkeyBn, dh->p, q1)) + res = MDH_compute_key(secret, nPubkeyLen, pubkeyBn, dh); + else + res = -1; + + MP_free(q1); + MP_free(pubkeyBn); + + return res; +} diff --git a/samples/LFLiveKitFrameworkDemo/vendors/pili-librtmp.framework/Headers/dhgroups.h b/samples/LFLiveKitFrameworkDemo/vendors/pili-librtmp.framework/Headers/dhgroups.h new file mode 100755 index 00000000..f3d0293f --- /dev/null +++ b/samples/LFLiveKitFrameworkDemo/vendors/pili-librtmp.framework/Headers/dhgroups.h @@ -0,0 +1,198 @@ +/* librtmp - Diffie-Hellmann Key Exchange + * Copyright (C) 2009 Andrej Stepanchuk + * + * This file is part of librtmp. + * + * librtmp is free software; you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation; either version 2.1, + * or (at your option) any later version. + * + * librtmp is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with librtmp see the file COPYING. If not, write to + * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. + * http://www.gnu.org/copyleft/lgpl.html + */ + +/* from RFC 3526, see http://www.ietf.org/rfc/rfc3526.txt */ + +/* 2^768 - 2 ^704 - 1 + 2^64 * { [2^638 pi] + 149686 } */ +#define P768 \ + "FFFFFFFFFFFFFFFFC90FDAA22168C234C4C6628B80DC1CD1" \ + "29024E088A67CC74020BBEA63B139B22514A08798E3404DD" \ + "EF9519B3CD3A431B302B0A6DF25F14374FE1356D6D51C245" \ + "E485B576625E7EC6F44C42E9A63A3620FFFFFFFFFFFFFFFF" + +/* 2^1024 - 2^960 - 1 + 2^64 * { [2^894 pi] + 129093 } */ +#define P1024 \ + "FFFFFFFFFFFFFFFFC90FDAA22168C234C4C6628B80DC1CD1" \ + "29024E088A67CC74020BBEA63B139B22514A08798E3404DD" \ + "EF9519B3CD3A431B302B0A6DF25F14374FE1356D6D51C245" \ + "E485B576625E7EC6F44C42E9A637ED6B0BFF5CB6F406B7ED" \ + "EE386BFB5A899FA5AE9F24117C4B1FE649286651ECE65381" \ + "FFFFFFFFFFFFFFFF" + +/* Group morder largest prime factor: */ +#define Q1024 \ + "7FFFFFFFFFFFFFFFE487ED5110B4611A62633145C06E0E68" \ + "948127044533E63A0105DF531D89CD9128A5043CC71A026E" \ + "F7CA8CD9E69D218D98158536F92F8A1BA7F09AB6B6A8E122" \ + "F242DABB312F3F637A262174D31BF6B585FFAE5B7A035BF6" \ + "F71C35FDAD44CFD2D74F9208BE258FF324943328F67329C0" \ + "FFFFFFFFFFFFFFFF" + +/* 2^1536 - 2^1472 - 1 + 2^64 * { [2^1406 pi] + 741804 } */ +#define P1536 \ + "FFFFFFFFFFFFFFFFC90FDAA22168C234C4C6628B80DC1CD1" \ + "29024E088A67CC74020BBEA63B139B22514A08798E3404DD" \ + "EF9519B3CD3A431B302B0A6DF25F14374FE1356D6D51C245" \ + "E485B576625E7EC6F44C42E9A637ED6B0BFF5CB6F406B7ED" \ + "EE386BFB5A899FA5AE9F24117C4B1FE649286651ECE45B3D" \ + "C2007CB8A163BF0598DA48361C55D39A69163FA8FD24CF5F" \ + "83655D23DCA3AD961C62F356208552BB9ED529077096966D" \ + "670C354E4ABC9804F1746C08CA237327FFFFFFFFFFFFFFFF" + +/* 2^2048 - 2^1984 - 1 + 2^64 * { [2^1918 pi] + 124476 } */ +#define P2048 \ + "FFFFFFFFFFFFFFFFC90FDAA22168C234C4C6628B80DC1CD1" \ + "29024E088A67CC74020BBEA63B139B22514A08798E3404DD" \ + "EF9519B3CD3A431B302B0A6DF25F14374FE1356D6D51C245" \ + "E485B576625E7EC6F44C42E9A637ED6B0BFF5CB6F406B7ED" \ + "EE386BFB5A899FA5AE9F24117C4B1FE649286651ECE45B3D" \ + "C2007CB8A163BF0598DA48361C55D39A69163FA8FD24CF5F" \ + "83655D23DCA3AD961C62F356208552BB9ED529077096966D" \ + "670C354E4ABC9804F1746C08CA18217C32905E462E36CE3B" \ + "E39E772C180E86039B2783A2EC07A28FB5C55DF06F4C52C9" \ + "DE2BCBF6955817183995497CEA956AE515D2261898FA0510" \ + "15728E5A8AACAA68FFFFFFFFFFFFFFFF" + +/* 2^3072 - 2^3008 - 1 + 2^64 * { [2^2942 pi] + 1690314 } */ +#define P3072 \ + "FFFFFFFFFFFFFFFFC90FDAA22168C234C4C6628B80DC1CD1" \ + "29024E088A67CC74020BBEA63B139B22514A08798E3404DD" \ + "EF9519B3CD3A431B302B0A6DF25F14374FE1356D6D51C245" \ + "E485B576625E7EC6F44C42E9A637ED6B0BFF5CB6F406B7ED" \ + "EE386BFB5A899FA5AE9F24117C4B1FE649286651ECE45B3D" \ + "C2007CB8A163BF0598DA48361C55D39A69163FA8FD24CF5F" \ + "83655D23DCA3AD961C62F356208552BB9ED529077096966D" \ + "670C354E4ABC9804F1746C08CA18217C32905E462E36CE3B" \ + "E39E772C180E86039B2783A2EC07A28FB5C55DF06F4C52C9" \ + "DE2BCBF6955817183995497CEA956AE515D2261898FA0510" \ + "15728E5A8AAAC42DAD33170D04507A33A85521ABDF1CBA64" \ + "ECFB850458DBEF0A8AEA71575D060C7DB3970F85A6E1E4C7" \ + "ABF5AE8CDB0933D71E8C94E04A25619DCEE3D2261AD2EE6B" \ + "F12FFA06D98A0864D87602733EC86A64521F2B18177B200C" \ + "BBE117577A615D6C770988C0BAD946E208E24FA074E5AB31" \ + "43DB5BFCE0FD108E4B82D120A93AD2CAFFFFFFFFFFFFFFFF" + +/* 2^4096 - 2^4032 - 1 + 2^64 * { [2^3966 pi] + 240904 } */ +#define P4096 \ + "FFFFFFFFFFFFFFFFC90FDAA22168C234C4C6628B80DC1CD1" \ + "29024E088A67CC74020BBEA63B139B22514A08798E3404DD" \ + "EF9519B3CD3A431B302B0A6DF25F14374FE1356D6D51C245" \ + "E485B576625E7EC6F44C42E9A637ED6B0BFF5CB6F406B7ED" \ + "EE386BFB5A899FA5AE9F24117C4B1FE649286651ECE45B3D" \ + "C2007CB8A163BF0598DA48361C55D39A69163FA8FD24CF5F" \ + "83655D23DCA3AD961C62F356208552BB9ED529077096966D" \ + "670C354E4ABC9804F1746C08CA18217C32905E462E36CE3B" \ + "E39E772C180E86039B2783A2EC07A28FB5C55DF06F4C52C9" \ + "DE2BCBF6955817183995497CEA956AE515D2261898FA0510" \ + "15728E5A8AAAC42DAD33170D04507A33A85521ABDF1CBA64" \ + "ECFB850458DBEF0A8AEA71575D060C7DB3970F85A6E1E4C7" \ + "ABF5AE8CDB0933D71E8C94E04A25619DCEE3D2261AD2EE6B" \ + "F12FFA06D98A0864D87602733EC86A64521F2B18177B200C" \ + "BBE117577A615D6C770988C0BAD946E208E24FA074E5AB31" \ + "43DB5BFCE0FD108E4B82D120A92108011A723C12A787E6D7" \ + "88719A10BDBA5B2699C327186AF4E23C1A946834B6150BDA" \ + "2583E9CA2AD44CE8DBBBC2DB04DE8EF92E8EFC141FBECAA6" \ + "287C59474E6BC05D99B2964FA090C3A2233BA186515BE7ED" \ + "1F612970CEE2D7AFB81BDD762170481CD0069127D5B05AA9" \ + "93B4EA988D8FDDC186FFB7DC90A6C08F4DF435C934063199" \ + "FFFFFFFFFFFFFFFF" + +/* 2^6144 - 2^6080 - 1 + 2^64 * { [2^6014 pi] + 929484 } */ +#define P6144 \ + "FFFFFFFFFFFFFFFFC90FDAA22168C234C4C6628B80DC1CD1" \ + "29024E088A67CC74020BBEA63B139B22514A08798E3404DD" \ + "EF9519B3CD3A431B302B0A6DF25F14374FE1356D6D51C245" \ + "E485B576625E7EC6F44C42E9A637ED6B0BFF5CB6F406B7ED" \ + "EE386BFB5A899FA5AE9F24117C4B1FE649286651ECE45B3D" \ + "C2007CB8A163BF0598DA48361C55D39A69163FA8FD24CF5F" \ + "83655D23DCA3AD961C62F356208552BB9ED529077096966D" \ + "670C354E4ABC9804F1746C08CA18217C32905E462E36CE3B" \ + "E39E772C180E86039B2783A2EC07A28FB5C55DF06F4C52C9" \ + "DE2BCBF6955817183995497CEA956AE515D2261898FA0510" \ + "15728E5A8AAAC42DAD33170D04507A33A85521ABDF1CBA64" \ + "ECFB850458DBEF0A8AEA71575D060C7DB3970F85A6E1E4C7" \ + "ABF5AE8CDB0933D71E8C94E04A25619DCEE3D2261AD2EE6B" \ + "F12FFA06D98A0864D87602733EC86A64521F2B18177B200C" \ + "BBE117577A615D6C770988C0BAD946E208E24FA074E5AB31" \ + "43DB5BFCE0FD108E4B82D120A92108011A723C12A787E6D7" \ + "88719A10BDBA5B2699C327186AF4E23C1A946834B6150BDA" \ + "2583E9CA2AD44CE8DBBBC2DB04DE8EF92E8EFC141FBECAA6" \ + "287C59474E6BC05D99B2964FA090C3A2233BA186515BE7ED" \ + "1F612970CEE2D7AFB81BDD762170481CD0069127D5B05AA9" \ + "93B4EA988D8FDDC186FFB7DC90A6C08F4DF435C934028492" \ + "36C3FAB4D27C7026C1D4DCB2602646DEC9751E763DBA37BD" \ + "F8FF9406AD9E530EE5DB382F413001AEB06A53ED9027D831" \ + "179727B0865A8918DA3EDBEBCF9B14ED44CE6CBACED4BB1B" \ + "DB7F1447E6CC254B332051512BD7AF426FB8F401378CD2BF" \ + "5983CA01C64B92ECF032EA15D1721D03F482D7CE6E74FEF6" \ + "D55E702F46980C82B5A84031900B1C9E59E7C97FBEC7E8F3" \ + "23A97A7E36CC88BE0F1D45B7FF585AC54BD407B22B4154AA" \ + "CC8F6D7EBF48E1D814CC5ED20F8037E0A79715EEF29BE328" \ + "06A1D58BB7C5DA76F550AA3D8A1FBFF0EB19CCB1A313D55C" \ + "DA56C9EC2EF29632387FE8D76E3C0468043E8F663F4860EE" \ + "12BF2D5B0B7474D6E694F91E6DCC4024FFFFFFFFFFFFFFFF" + +/* 2^8192 - 2^8128 - 1 + 2^64 * { [2^8062 pi] + 4743158 } */ +#define P8192 \ + "FFFFFFFFFFFFFFFFC90FDAA22168C234C4C6628B80DC1CD1" \ + "29024E088A67CC74020BBEA63B139B22514A08798E3404DD" \ + "EF9519B3CD3A431B302B0A6DF25F14374FE1356D6D51C245" \ + "E485B576625E7EC6F44C42E9A637ED6B0BFF5CB6F406B7ED" \ + "EE386BFB5A899FA5AE9F24117C4B1FE649286651ECE45B3D" \ + "C2007CB8A163BF0598DA48361C55D39A69163FA8FD24CF5F" \ + "83655D23DCA3AD961C62F356208552BB9ED529077096966D" \ + "670C354E4ABC9804F1746C08CA18217C32905E462E36CE3B" \ + "E39E772C180E86039B2783A2EC07A28FB5C55DF06F4C52C9" \ + "DE2BCBF6955817183995497CEA956AE515D2261898FA0510" \ + "15728E5A8AAAC42DAD33170D04507A33A85521ABDF1CBA64" \ + "ECFB850458DBEF0A8AEA71575D060C7DB3970F85A6E1E4C7" \ + "ABF5AE8CDB0933D71E8C94E04A25619DCEE3D2261AD2EE6B" \ + "F12FFA06D98A0864D87602733EC86A64521F2B18177B200C" \ + "BBE117577A615D6C770988C0BAD946E208E24FA074E5AB31" \ + "43DB5BFCE0FD108E4B82D120A92108011A723C12A787E6D7" \ + "88719A10BDBA5B2699C327186AF4E23C1A946834B6150BDA" \ + "2583E9CA2AD44CE8DBBBC2DB04DE8EF92E8EFC141FBECAA6" \ + "287C59474E6BC05D99B2964FA090C3A2233BA186515BE7ED" \ + "1F612970CEE2D7AFB81BDD762170481CD0069127D5B05AA9" \ + "93B4EA988D8FDDC186FFB7DC90A6C08F4DF435C934028492" \ + "36C3FAB4D27C7026C1D4DCB2602646DEC9751E763DBA37BD" \ + "F8FF9406AD9E530EE5DB382F413001AEB06A53ED9027D831" \ + "179727B0865A8918DA3EDBEBCF9B14ED44CE6CBACED4BB1B" \ + "DB7F1447E6CC254B332051512BD7AF426FB8F401378CD2BF" \ + "5983CA01C64B92ECF032EA15D1721D03F482D7CE6E74FEF6" \ + "D55E702F46980C82B5A84031900B1C9E59E7C97FBEC7E8F3" \ + "23A97A7E36CC88BE0F1D45B7FF585AC54BD407B22B4154AA" \ + "CC8F6D7EBF48E1D814CC5ED20F8037E0A79715EEF29BE328" \ + "06A1D58BB7C5DA76F550AA3D8A1FBFF0EB19CCB1A313D55C" \ + "DA56C9EC2EF29632387FE8D76E3C0468043E8F663F4860EE" \ + "12BF2D5B0B7474D6E694F91E6DBE115974A3926F12FEE5E4" \ + "38777CB6A932DF8CD8BEC4D073B931BA3BC832B68D9DD300" \ + "741FA7BF8AFC47ED2576F6936BA424663AAB639C5AE4F568" \ + "3423B4742BF1C978238F16CBE39D652DE3FDB8BEFC848AD9" \ + "22222E04A4037C0713EB57A81A23F0C73473FC646CEA306B" \ + "4BCBC8862F8385DDFA9D4B7FA2C087E879683303ED5BDD3A" \ + "062B3CF5B3A278A66D2A13F83F44F82DDF310EE074AB6A36" \ + "4597E899A0255DC164F31CC50846851DF9AB48195DED7EA1" \ + "B1D510BD7EE74D73FAF36BC31ECFA268359046F4EB879F92" \ + "4009438B481C6CD7889A002ED5EE382BC9190DA6FC026E47" \ + "9558E4475677E9AA9E3050E2765694DFC81F56E880B96E71" \ + "60C980DD98EDD3DFFFFFFFFFFFFFFFFF" diff --git a/samples/LFLiveKitFrameworkDemo/vendors/pili-librtmp.framework/Headers/error.h b/samples/LFLiveKitFrameworkDemo/vendors/pili-librtmp.framework/Headers/error.h new file mode 100755 index 00000000..6a8dcbe4 --- /dev/null +++ b/samples/LFLiveKitFrameworkDemo/vendors/pili-librtmp.framework/Headers/error.h @@ -0,0 +1,46 @@ +#ifndef __ERROR_H__ +#define __ERROR_H__ + +#include + +typedef struct RTMPError { + int code; + char *message; +} RTMPError; + +void RTMPError_Alloc(RTMPError *error, size_t msg_size); +void RTMPError_Free(RTMPError *error); +void RTMPError_Message(RTMPError *error, int code, const char *message); + +// error defines +enum { + RTMPErrorUnknow = -1, // "Unknow error" + RTMPErrorUnknowOption = -999, // "Unknown option %s" + RTMPErrorAccessDNSFailed = -1000, // "Failed to access the DNS. (addr: %s)" + RTMPErrorFailedToConnectSocket = + -1001, // "Failed to connect socket. %d (%s)" + RTMPErrorSocksNegotiationFailed = -1002, // "Socks negotiation failed" + RTMPErrorFailedToCreateSocket = + -1003, // "Failed to create socket. %d (%s)" + RTMPErrorHandshakeFailed = -1004, // "Handshake failed" + RTMPErrorRTMPConnectFailed = -1005, // "RTMP connect failed" + RTMPErrorSendFailed = -1006, // "Send error %d (%s), (%d bytes)" + RTMPErrorServerRequestedClose = -1007, // "RTMP server requested close" + RTMPErrorNetStreamFailed = -1008, // "NetStream failed" + RTMPErrorNetStreamPlayFailed = -1009, // "NetStream play failed" + RTMPErrorNetStreamPlayStreamNotFound = + -1010, // "NetStream play stream not found" + RTMPErrorNetConnectionConnectInvalidApp = + -1011, // "NetConnection connect invalip app" + RTMPErrorSanityFailed = + -1012, // "Sanity failed. Trying to send header of type: 0x%02X" + RTMPErrorSocketClosedByPeer = -1013, // "RTMP socket closed by peer" + RTMPErrorRTMPConnectStreamFailed = -1014, // "RTMP connect stream failed" + RTMPErrorSocketTimeout = -1015, // "RTMP socket timeout" + + // SSL errors + RTMPErrorTLSConnectFailed = -1200, // "TLS_Connect failed" + RTMPErrorNoSSLOrTLSSupport = -1201, // "No SSL/TLS support" +}; + +#endif diff --git a/samples/LFLiveKitFrameworkDemo/vendors/pili-librtmp.framework/Headers/handshake.h b/samples/LFLiveKitFrameworkDemo/vendors/pili-librtmp.framework/Headers/handshake.h new file mode 100755 index 00000000..f791cf74 --- /dev/null +++ b/samples/LFLiveKitFrameworkDemo/vendors/pili-librtmp.framework/Headers/handshake.h @@ -0,0 +1,1034 @@ +/* + * Copyright (C) 2008-2009 Andrej Stepanchuk + * Copyright (C) 2009-2010 Howard Chu + * Copyright (C) 2010 + * 2a665470ced7adb7156fcef47f8199a6371c117b8a79e399a2771e0b36384090 + * + * This file is part of librtmp. + * + * librtmp is free software; you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation; either version 2.1, + * or (at your option) any later version. + * + * librtmp is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with librtmp see the file COPYING. If not, write to + * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. + * http://www.gnu.org/copyleft/lgpl.html + */ + +/* This file is #included in rtmp.c, it is not meant to be compiled alone */ + +#ifdef USE_POLARSSL +#include +#include +#ifndef SHA256_DIGEST_LENGTH +#define SHA256_DIGEST_LENGTH 32 +#endif +#define HMAC_CTX sha2_context +#define HMAC_setup(ctx, key, len) \ + sha2_hmac_starts(&ctx, (unsigned char *)key, len, 0) +#define HMAC_crunch(ctx, buf, len) sha2_hmac_update(&ctx, buf, len) +#define HMAC_finish(ctx, dig, dlen) \ + dlen = SHA256_DIGEST_LENGTH; \ + sha2_hmac_finish(&ctx, dig) + +typedef arc4_context *RC4_handle; +#define RC4_alloc(h) *h = malloc(sizeof(arc4_context)) +#define RC4_setkey(h, l, k) arc4_setup(h, k, l) +#define RC4_encrypt(h, l, d) \ + arc4_crypt(h, l, (unsigned char *)d, (unsigned char *)d) +#define RC4_encrypt2(h, l, s, d) \ + arc4_crypt(h, l, (unsigned char *)s, (unsigned char *)d) +#define RC4_free(h) free(h) + +#elif defined(USE_GNUTLS) +#include +#ifndef SHA256_DIGEST_LENGTH +#define SHA256_DIGEST_LENGTH 32 +#endif +#define HMAC_CTX gcry_md_hd_t +#define HMAC_setup(ctx, key, len) \ + gcry_md_open(&ctx, GCRY_MD_SHA256, GCRY_MD_FLAG_HMAC); \ + gcry_md_setkey(ctx, key, len) +#define HMAC_crunch(ctx, buf, len) gcry_md_write(ctx, buf, len) +#define HMAC_finish(ctx, dig, dlen) \ + dlen = SHA256_DIGEST_LENGTH; \ + memcpy(dig, gcry_md_read(ctx, 0), dlen); \ + gcry_md_close(ctx) + +typedef gcry_cipher_hd_t RC4_handle; +#define RC4_alloc(h) \ + gcry_cipher_open(h, GCRY_CIPHER_ARCFOUR, GCRY_CIPHER_MODE_STREAM, 0) +#define RC4_setkey(h, l, k) gcry_cipher_setkey(h, k, l) +#define RC4_encrypt(h, l, d) gcry_cipher_encrypt(h, (void *)d, l, NULL, 0) +#define RC4_encrypt2(h, l, s, d) \ + gcry_cipher_encrypt(h, (void *)d, l, (void *)s, l) +#define RC4_free(h) gcry_cipher_close(h) + +#else /* USE_OPENSSL */ +#include +#include +#include +#if OPENSSL_VERSION_NUMBER < 0x0090800 || !defined(SHA256_DIGEST_LENGTH) +#error Your OpenSSL is too old, need 0.9.8 or newer with SHA256 +#endif +#define HMAC_setup(ctx, key, len) \ + HMAC_CTX_init(&ctx); \ + HMAC_Init_ex(&ctx, key, len, EVP_sha256(), 0) +#define HMAC_crunch(ctx, buf, len) HMAC_Update(&ctx, buf, len) +#define HMAC_finish(ctx, dig, dlen) \ + HMAC_Final(&ctx, dig, &dlen); \ + HMAC_CTX_cleanup(&ctx) + +typedef RC4_KEY *RC4_handle; +#define RC4_alloc(h) *h = malloc(sizeof(RC4_KEY)) +#define RC4_setkey(h, l, k) RC4_set_key(h, l, k) +#define RC4_encrypt(h, l, d) RC4(h, l, (uint8_t *)d, (uint8_t *)d) +#define RC4_encrypt2(h, l, s, d) RC4(h, l, (uint8_t *)s, (uint8_t *)d) +#define RC4_free(h) free(h) +#endif + +#define FP10 + +#include "dh.h" + +static const uint8_t GenuineFMSKey[] = { + 0x47, 0x65, 0x6e, 0x75, 0x69, 0x6e, 0x65, 0x20, 0x41, 0x64, 0x6f, + 0x62, 0x65, 0x20, 0x46, 0x6c, 0x61, 0x73, 0x68, 0x20, 0x4d, 0x65, + 0x64, 0x69, 0x61, 0x20, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x20, + 0x30, 0x30, 0x31, /* Genuine Adobe Flash Media Server 001 */ + + 0xf0, 0xee, 0xc2, 0x4a, 0x80, 0x68, 0xbe, 0xe8, 0x2e, 0x00, 0xd0, + 0xd1, 0x02, 0x9e, 0x7e, 0x57, 0x6e, 0xec, 0x5d, 0x2d, 0x29, 0x80, + 0x6f, 0xab, 0x93, 0xb8, 0xe6, 0x36, 0xcf, 0xeb, 0x31, 0xae}; /* 68 */ + +static const uint8_t GenuineFPKey[] = { + 0x47, 0x65, 0x6E, 0x75, 0x69, 0x6E, 0x65, 0x20, 0x41, 0x64, 0x6F, + 0x62, 0x65, 0x20, 0x46, 0x6C, 0x61, 0x73, 0x68, 0x20, 0x50, 0x6C, + 0x61, 0x79, 0x65, 0x72, 0x20, 0x30, 0x30, 0x31, /* Genuine Adobe Flash + Player 001 */ + 0xF0, 0xEE, 0xC2, 0x4A, 0x80, 0x68, 0xBE, 0xE8, 0x2E, 0x00, 0xD0, + 0xD1, 0x02, 0x9E, 0x7E, 0x57, 0x6E, 0xEC, 0x5D, 0x2D, 0x29, 0x80, + 0x6F, 0xAB, 0x93, 0xB8, 0xE6, 0x36, 0xCF, 0xEB, 0x31, 0xAE}; /* 62 */ + +static void InitRC4Encryption(uint8_t *secretKey, uint8_t *pubKeyIn, + uint8_t *pubKeyOut, RC4_handle *rc4keyIn, + RC4_handle *rc4keyOut) { + uint8_t digest[SHA256_DIGEST_LENGTH]; + unsigned int digestLen = 0; + HMAC_CTX ctx; + + RC4_alloc(rc4keyIn); + RC4_alloc(rc4keyOut); + + HMAC_setup(ctx, secretKey, 128); + HMAC_crunch(ctx, pubKeyIn, 128); + HMAC_finish(ctx, digest, digestLen); + + RTMP_Log(RTMP_LOGDEBUG, "RC4 Out Key: "); + RTMP_LogHex(RTMP_LOGDEBUG, digest, 16); + + RC4_setkey(*rc4keyOut, 16, digest); + + HMAC_setup(ctx, secretKey, 128); + HMAC_crunch(ctx, pubKeyOut, 128); + HMAC_finish(ctx, digest, digestLen); + + RTMP_Log(RTMP_LOGDEBUG, "RC4 In Key: "); + RTMP_LogHex(RTMP_LOGDEBUG, digest, 16); + + RC4_setkey(*rc4keyIn, 16, digest); +} + +typedef unsigned int(getoff)(uint8_t *buf, unsigned int len); + +static unsigned int GetDHOffset2(uint8_t *handshake, unsigned int len) { + unsigned int offset = 0; + uint8_t *ptr = handshake + 768; + unsigned int res; + + assert(RTMP_SIG_SIZE <= len); + + offset += (*ptr); + ptr++; + offset += (*ptr); + ptr++; + offset += (*ptr); + ptr++; + offset += (*ptr); + + res = (offset % 632) + 8; + + if (res + 128 > 767) { + RTMP_Log(RTMP_LOGERROR, + "%s: Couldn't calculate correct DH offset (got %d), exiting!", + __FUNCTION__, res); + exit(1); + } + return res; +} + +static unsigned int GetDigestOffset2(uint8_t *handshake, unsigned int len) { + unsigned int offset = 0; + uint8_t *ptr = handshake + 772; + unsigned int res; + + offset += (*ptr); + ptr++; + offset += (*ptr); + ptr++; + offset += (*ptr); + ptr++; + offset += (*ptr); + + res = (offset % 728) + 776; + + if (res + 32 > 1535) { + RTMP_Log(RTMP_LOGERROR, + "%s: Couldn't calculate correct digest offset (got %d), exiting", + __FUNCTION__, res); + exit(1); + } + return res; +} + +static unsigned int GetDHOffset1(uint8_t *handshake, unsigned int len) { + unsigned int offset = 0; + uint8_t *ptr = handshake + 1532; + unsigned int res; + + assert(RTMP_SIG_SIZE <= len); + + offset += (*ptr); + ptr++; + offset += (*ptr); + ptr++; + offset += (*ptr); + ptr++; + offset += (*ptr); + + res = (offset % 632) + 772; + + if (res + 128 > 1531) { + RTMP_Log(RTMP_LOGERROR, + "%s: Couldn't calculate DH offset (got %d), exiting!", + __FUNCTION__, res); + exit(1); + } + + return res; +} + +static unsigned int GetDigestOffset1(uint8_t *handshake, unsigned int len) { + unsigned int offset = 0; + uint8_t *ptr = handshake + 8; + unsigned int res; + + assert(12 <= len); + + offset += (*ptr); + ptr++; + offset += (*ptr); + ptr++; + offset += (*ptr); + ptr++; + offset += (*ptr); + + res = (offset % 728) + 12; + + if (res + 32 > 771) { + RTMP_Log(RTMP_LOGERROR, + "%s: Couldn't calculate digest offset (got %d), exiting!", + __FUNCTION__, res); + exit(1); + } + + return res; +} + +static getoff *digoff[] = {GetDigestOffset1, GetDigestOffset2}; +static getoff *dhoff[] = {GetDHOffset1, GetDHOffset2}; + +static void HMACsha256(const uint8_t *message, size_t messageLen, + const uint8_t *key, size_t keylen, uint8_t *digest) { + unsigned int digestLen; + HMAC_CTX ctx; + + HMAC_setup(ctx, key, keylen); + HMAC_crunch(ctx, message, messageLen); + HMAC_finish(ctx, digest, digestLen); + + assert(digestLen == 32); +} + +static void CalculateDigest(unsigned int digestPos, uint8_t *handshakeMessage, + const uint8_t *key, size_t keyLen, + uint8_t *digest) { + const int messageLen = RTMP_SIG_SIZE - SHA256_DIGEST_LENGTH; + uint8_t message[RTMP_SIG_SIZE - SHA256_DIGEST_LENGTH]; + + memcpy(message, handshakeMessage, digestPos); + memcpy(message + digestPos, + &handshakeMessage[digestPos + SHA256_DIGEST_LENGTH], + messageLen - digestPos); + + HMACsha256(message, messageLen, key, keyLen, digest); +} + +static int VerifyDigest(unsigned int digestPos, uint8_t *handshakeMessage, + const uint8_t *key, size_t keyLen) { + uint8_t calcDigest[SHA256_DIGEST_LENGTH]; + + CalculateDigest(digestPos, handshakeMessage, key, keyLen, calcDigest); + + return memcmp(&handshakeMessage[digestPos], calcDigest, + SHA256_DIGEST_LENGTH) == 0; +} + +/* handshake + * + * Type = [1 bytes] plain: 0x03, encrypted: 0x06, 0x08, 0x09 + * -------------------------------------------------------------------- [1536 + * bytes] + * Uptime = [4 bytes] big endian unsigned number, uptime + * Version = [4 bytes] each byte represents a version number, e.g. + * 9.0.124.0 + * ... + * + */ + +static const uint32_t rtmpe8_keys[16][4] = { + {0xbff034b2, 0x11d9081f, 0xccdfb795, 0x748de732}, + {0x086a5eb6, 0x1743090e, 0x6ef05ab8, 0xfe5a39e2}, + {0x7b10956f, 0x76ce0521, 0x2388a73a, 0x440149a1}, + {0xa943f317, 0xebf11bb2, 0xa691a5ee, 0x17f36339}, + {0x7a30e00a, 0xb529e22c, 0xa087aea5, 0xc0cb79ac}, + {0xbdce0c23, 0x2febdeff, 0x1cfaae16, 0x1123239d}, + {0x55dd3f7b, 0x77e7e62e, 0x9bb8c499, 0xc9481ee4}, + {0x407bb6b4, 0x71e89136, 0xa7aebf55, 0xca33b839}, + {0xfcf6bdc3, 0xb63c3697, 0x7ce4f825, 0x04d959b2}, + {0x28e091fd, 0x41954c4c, 0x7fb7db00, 0xe3a066f8}, + {0x57845b76, 0x4f251b03, 0x46d45bcd, 0xa2c30d29}, + {0x0acceef8, 0xda55b546, 0x03473452, 0x5863713b}, + {0xb82075dc, 0xa75f1fee, 0xd84268e8, 0xa72a44cc}, + {0x07cf6e9e, 0xa16d7b25, 0x9fa7ae6c, 0xd92f5629}, + {0xfeb1eae4, 0x8c8c3ce1, 0x4e0064a7, 0x6a387c2a}, + {0x893a9427, 0xcc3013a2, 0xf106385b, 0xa829f927}}; + +/* RTMPE type 8 uses XTEA on the regular signature + * http://en.wikipedia.org/wiki/XTEA + */ +static void rtmpe8_sig(uint8_t *in, uint8_t *out, int keyid) { + unsigned int i, num_rounds = 32; + uint32_t v0, v1, sum = 0, delta = 0x9E3779B9; + uint32_t const *k; + + v0 = in[0] | (in[1] << 8) | (in[2] << 16) | (in[3] << 24); + v1 = in[4] | (in[5] << 8) | (in[6] << 16) | (in[7] << 24); + k = rtmpe8_keys[keyid]; + + for (i = 0; i < num_rounds; i++) { + v0 += (((v1 << 4) ^ (v1 >> 5)) + v1) ^ (sum + k[sum & 3]); + sum += delta; + v1 += (((v0 << 4) ^ (v0 >> 5)) + v0) ^ (sum + k[(sum >> 11) & 3]); + } + + out[0] = v0; + v0 >>= 8; + out[1] = v0; + v0 >>= 8; + out[2] = v0; + v0 >>= 8; + out[3] = v0; + + out[4] = v1; + v1 >>= 8; + out[5] = v1; + v1 >>= 8; + out[6] = v1; + v1 >>= 8; + out[7] = v1; +} + +static int HandShake(RTMP *r, int FP9HandShake) { + int i, offalg = 0; + int dhposClient = 0; + int digestPosClient = 0; + int encrypted = r->Link.protocol & RTMP_FEATURE_ENC; + + RC4_handle keyIn = 0; + RC4_handle keyOut = 0; + + int32_t *ip; + uint32_t uptime; + + uint8_t clientbuf[RTMP_SIG_SIZE + 4], *clientsig = clientbuf + 4; + uint8_t serversig[RTMP_SIG_SIZE], client2[RTMP_SIG_SIZE], *reply; + uint8_t type; + getoff *getdh = NULL, *getdig = NULL; + + if (encrypted || r->Link.SWFSize) + FP9HandShake = TRUE; + else + FP9HandShake = FALSE; + + r->Link.rc4keyIn = r->Link.rc4keyOut = 0; + + if (encrypted) { + clientsig[-1] = 0x06; /* 0x08 is RTMPE as well */ + offalg = 1; + } else + clientsig[-1] = 0x03; + + uptime = htonl(RTMP_GetTime()); + memcpy(clientsig, &uptime, 4); + + if (FP9HandShake) { + /* set version to at least 9.0.115.0 */ + if (encrypted) { + clientsig[4] = 128; + clientsig[6] = 3; + } else { + clientsig[4] = 10; + clientsig[6] = 45; + } + clientsig[5] = 0; + clientsig[7] = 2; + + RTMP_Log(RTMP_LOGDEBUG, "%s: Client type: %02X", __FUNCTION__, + clientsig[-1]); + getdig = digoff[offalg]; + getdh = dhoff[offalg]; + } else { + memset(&clientsig[4], 0, 4); + } + +/* generate random data */ +#ifdef _DEBUG + memset(clientsig + 8, 0, RTMP_SIG_SIZE - 8); +#else + ip = (int32_t *)(clientsig + 8); + for (i = 2; i < RTMP_SIG_SIZE / 4; i++) + *ip++ = rand(); +#endif + + /* set handshake digest */ + if (FP9HandShake) { + if (encrypted) { + /* generate Diffie-Hellmann parameters */ + r->Link.dh = DHInit(1024); + if (!r->Link.dh) { + RTMP_Log(RTMP_LOGERROR, "%s: Couldn't initialize Diffie-Hellmann!", + __FUNCTION__); + return FALSE; + } + + dhposClient = getdh(clientsig, RTMP_SIG_SIZE); + RTMP_Log(RTMP_LOGDEBUG, "%s: DH pubkey position: %d", __FUNCTION__, + dhposClient); + + if (!DHGenerateKey(r->Link.dh)) { + RTMP_Log(RTMP_LOGERROR, + "%s: Couldn't generate Diffie-Hellmann public key!", + __FUNCTION__); + return FALSE; + } + + if (!DHGetPublicKey(r->Link.dh, &clientsig[dhposClient], 128)) { + RTMP_Log(RTMP_LOGERROR, "%s: Couldn't write public key!", __FUNCTION__); + return FALSE; + } + } + + digestPosClient = + getdig(clientsig, RTMP_SIG_SIZE); /* reuse this value in verification */ + RTMP_Log(RTMP_LOGDEBUG, "%s: Client digest offset: %d", __FUNCTION__, + digestPosClient); + + CalculateDigest(digestPosClient, clientsig, GenuineFPKey, 30, + &clientsig[digestPosClient]); + + RTMP_Log(RTMP_LOGDEBUG, "%s: Initial client digest: ", __FUNCTION__); + RTMP_LogHex(RTMP_LOGDEBUG, clientsig + digestPosClient, + SHA256_DIGEST_LENGTH); + } + +#ifdef _DEBUG + RTMP_Log(RTMP_LOGDEBUG, "Clientsig: "); + RTMP_LogHex(RTMP_LOGDEBUG, clientsig, RTMP_SIG_SIZE); +#endif + + if (!WriteN(r, (char *)clientsig - 1, RTMP_SIG_SIZE + 1)) + return FALSE; + + if (ReadN(r, (char *)&type, 1) != 1) /* 0x03 or 0x06 */ + return FALSE; + + RTMP_Log(RTMP_LOGDEBUG, "%s: Type Answer : %02X", __FUNCTION__, type); + + if (type != clientsig[-1]) + RTMP_Log(RTMP_LOGWARNING, + "%s: Type mismatch: client sent %d, server answered %d", + __FUNCTION__, clientsig[-1], type); + + if (ReadN(r, (char *)serversig, RTMP_SIG_SIZE) != RTMP_SIG_SIZE) + return FALSE; + + /* decode server response */ + memcpy(&uptime, serversig, 4); + uptime = ntohl(uptime); + + RTMP_Log(RTMP_LOGDEBUG, "%s: Server Uptime : %d", __FUNCTION__, uptime); + RTMP_Log(RTMP_LOGDEBUG, "%s: FMS Version : %d.%d.%d.%d", __FUNCTION__, + serversig[4], serversig[5], serversig[6], serversig[7]); + + if (FP9HandShake && type == 3 && !serversig[4]) + FP9HandShake = FALSE; + +#ifdef _DEBUG + RTMP_Log(RTMP_LOGDEBUG, "Server signature:"); + RTMP_LogHex(RTMP_LOGDEBUG, serversig, RTMP_SIG_SIZE); +#endif + + if (FP9HandShake) { + uint8_t digestResp[SHA256_DIGEST_LENGTH]; + uint8_t *signatureResp = NULL; + + /* we have to use this signature now to find the correct algorithms for + * getting the digest and DH positions */ + int digestPosServer = getdig(serversig, RTMP_SIG_SIZE); + + if (!VerifyDigest(digestPosServer, serversig, GenuineFMSKey, 36)) { + RTMP_Log(RTMP_LOGWARNING, "Trying different position for server digest!"); + offalg ^= 1; + getdig = digoff[offalg]; + getdh = dhoff[offalg]; + digestPosServer = getdig(serversig, RTMP_SIG_SIZE); + + if (!VerifyDigest(digestPosServer, serversig, GenuineFMSKey, 36)) { + RTMP_Log( + RTMP_LOGERROR, + "Couldn't verify the server digest"); /* continuing anyway will + probably fail */ + return FALSE; + } + } + + /* generate SWFVerification token (SHA256 HMAC hash of decompressed SWF, key + * are the last 32 bytes of the server handshake) */ + if (r->Link.SWFSize) { + const char swfVerify[] = {0x01, 0x01}; + char *vend = r->Link.SWFVerificationResponse + + sizeof(r->Link.SWFVerificationResponse); + + memcpy(r->Link.SWFVerificationResponse, swfVerify, 2); + AMF_EncodeInt32(&r->Link.SWFVerificationResponse[2], vend, + r->Link.SWFSize); + AMF_EncodeInt32(&r->Link.SWFVerificationResponse[6], vend, + r->Link.SWFSize); + HMACsha256(r->Link.SWFHash, SHA256_DIGEST_LENGTH, + &serversig[RTMP_SIG_SIZE - SHA256_DIGEST_LENGTH], + SHA256_DIGEST_LENGTH, + (uint8_t *)&r->Link.SWFVerificationResponse[10]); + } + + /* do Diffie-Hellmann Key exchange for encrypted RTMP */ + if (encrypted) { + /* compute secret key */ + uint8_t secretKey[128] = {0}; + int len, dhposServer; + + dhposServer = getdh(serversig, RTMP_SIG_SIZE); + RTMP_Log(RTMP_LOGDEBUG, "%s: Server DH public key offset: %d", + __FUNCTION__, dhposServer); + len = DHComputeSharedSecretKey(r->Link.dh, &serversig[dhposServer], 128, + secretKey); + if (len < 0) { + RTMP_Log(RTMP_LOGDEBUG, "%s: Wrong secret key position!", __FUNCTION__); + return FALSE; + } + + RTMP_Log(RTMP_LOGDEBUG, "%s: Secret key: ", __FUNCTION__); + RTMP_LogHex(RTMP_LOGDEBUG, secretKey, 128); + + InitRC4Encryption(secretKey, (uint8_t *)&serversig[dhposServer], + (uint8_t *)&clientsig[dhposClient], &keyIn, &keyOut); + } + + reply = client2; +#ifdef _DEBUG + memset(reply, 0xff, RTMP_SIG_SIZE); +#else + ip = (int32_t *)reply; + for (i = 0; i < RTMP_SIG_SIZE / 4; i++) + *ip++ = rand(); +#endif + /* calculate response now */ + signatureResp = reply + RTMP_SIG_SIZE - SHA256_DIGEST_LENGTH; + + HMACsha256(&serversig[digestPosServer], SHA256_DIGEST_LENGTH, GenuineFPKey, + sizeof(GenuineFPKey), digestResp); + HMACsha256(reply, RTMP_SIG_SIZE - SHA256_DIGEST_LENGTH, digestResp, + SHA256_DIGEST_LENGTH, signatureResp); + + /* some info output */ + RTMP_Log(RTMP_LOGDEBUG, + "%s: Calculated digest key from secure key and server digest: ", + __FUNCTION__); + RTMP_LogHex(RTMP_LOGDEBUG, digestResp, SHA256_DIGEST_LENGTH); + +#ifdef FP10 + if (type == 8) { + uint8_t *dptr = digestResp; + uint8_t *sig = signatureResp; + /* encrypt signatureResp */ + for (i = 0; i < SHA256_DIGEST_LENGTH; i += 8) + rtmpe8_sig(sig + i, sig + i, dptr[i] % 15); + } +#if 0 + else if (type == 9)) + { + uint8_t *dptr = digestResp; + uint8_t *sig = signatureResp; + /* encrypt signatureResp */ + for (i=0; iLink.rc4keyIn = keyIn; + r->Link.rc4keyOut = keyOut; + + /* update the keystreams */ + if (r->Link.rc4keyIn) { + RC4_encrypt(r->Link.rc4keyIn, RTMP_SIG_SIZE, (uint8_t *)buff); + } + + if (r->Link.rc4keyOut) { + RC4_encrypt(r->Link.rc4keyOut, RTMP_SIG_SIZE, (uint8_t *)buff); + } + } + } else { + if (memcmp(serversig, clientsig, RTMP_SIG_SIZE) != 0) { + RTMP_Log(RTMP_LOGWARNING, "%s: client signature does not match!", + __FUNCTION__); + } + } + + RTMP_Log(RTMP_LOGDEBUG, "%s: Handshaking finished....", __FUNCTION__); + return TRUE; +} + +static int SHandShake(RTMP *r) { + int i, offalg = 0; + int dhposServer = 0; + int digestPosServer = 0; + RC4_handle keyIn = 0; + RC4_handle keyOut = 0; + int FP9HandShake = FALSE; + int encrypted; + int32_t *ip; + + uint8_t clientsig[RTMP_SIG_SIZE]; + uint8_t serverbuf[RTMP_SIG_SIZE + 4], *serversig = serverbuf + 4; + uint8_t type; + uint32_t uptime; + getoff *getdh = NULL, *getdig = NULL; + + if (ReadN(r, (char *)&type, 1) != 1) /* 0x03 or 0x06 */ + return FALSE; + + if (ReadN(r, (char *)clientsig, RTMP_SIG_SIZE) != RTMP_SIG_SIZE) + return FALSE; + + RTMP_Log(RTMP_LOGDEBUG, "%s: Type Requested : %02X", __FUNCTION__, type); + RTMP_LogHex(RTMP_LOGDEBUG2, clientsig, RTMP_SIG_SIZE); + + if (type == 3) { + encrypted = FALSE; + } else if (type == 6 || type == 8) { + offalg = 1; + encrypted = TRUE; + FP9HandShake = TRUE; + r->Link.protocol |= RTMP_FEATURE_ENC; + /* use FP10 if client is capable */ + if (clientsig[4] == 128) + type = 8; + } else { + RTMP_Log(RTMP_LOGERROR, "%s: Unknown version %02x", __FUNCTION__, type); + return FALSE; + } + + if (!FP9HandShake && clientsig[4]) + FP9HandShake = TRUE; + + serversig[-1] = type; + + r->Link.rc4keyIn = r->Link.rc4keyOut = 0; + + uptime = htonl(RTMP_GetTime()); + memcpy(serversig, &uptime, 4); + + if (FP9HandShake) { + /* Server version */ + serversig[4] = 3; + serversig[5] = 5; + serversig[6] = 1; + serversig[7] = 1; + + getdig = digoff[offalg]; + getdh = dhoff[offalg]; + } else { + memset(&serversig[4], 0, 4); + } + +/* generate random data */ +#ifdef _DEBUG + memset(serversig + 8, 0, RTMP_SIG_SIZE - 8); +#else + ip = (int32_t *)(serversig + 8); + for (i = 2; i < RTMP_SIG_SIZE / 4; i++) + *ip++ = rand(); +#endif + + /* set handshake digest */ + if (FP9HandShake) { + if (encrypted) { + /* generate Diffie-Hellmann parameters */ + r->Link.dh = DHInit(1024); + if (!r->Link.dh) { + RTMP_Log(RTMP_LOGERROR, "%s: Couldn't initialize Diffie-Hellmann!", + __FUNCTION__); + return FALSE; + } + + dhposServer = getdh(serversig, RTMP_SIG_SIZE); + RTMP_Log(RTMP_LOGDEBUG, "%s: DH pubkey position: %d", __FUNCTION__, + dhposServer); + + if (!DHGenerateKey(r->Link.dh)) { + RTMP_Log(RTMP_LOGERROR, + "%s: Couldn't generate Diffie-Hellmann public key!", + __FUNCTION__); + return FALSE; + } + + if (!DHGetPublicKey(r->Link.dh, (uint8_t *)&serversig[dhposServer], + 128)) { + RTMP_Log(RTMP_LOGERROR, "%s: Couldn't write public key!", __FUNCTION__); + return FALSE; + } + } + + digestPosServer = + getdig(serversig, RTMP_SIG_SIZE); /* reuse this value in verification */ + RTMP_Log(RTMP_LOGDEBUG, "%s: Server digest offset: %d", __FUNCTION__, + digestPosServer); + + CalculateDigest(digestPosServer, serversig, GenuineFMSKey, 36, + &serversig[digestPosServer]); + + RTMP_Log(RTMP_LOGDEBUG, "%s: Initial server digest: ", __FUNCTION__); + RTMP_LogHex(RTMP_LOGDEBUG, serversig + digestPosServer, + SHA256_DIGEST_LENGTH); + } + + RTMP_Log(RTMP_LOGDEBUG2, "Serversig: "); + RTMP_LogHex(RTMP_LOGDEBUG2, serversig, RTMP_SIG_SIZE); + + if (!WriteN(r, (char *)serversig - 1, RTMP_SIG_SIZE + 1)) + return FALSE; + + /* decode client response */ + memcpy(&uptime, clientsig, 4); + uptime = ntohl(uptime); + + RTMP_Log(RTMP_LOGDEBUG, "%s: Client Uptime : %d", __FUNCTION__, uptime); + RTMP_Log(RTMP_LOGDEBUG, "%s: Player Version: %d.%d.%d.%d", __FUNCTION__, + clientsig[4], clientsig[5], clientsig[6], clientsig[7]); + + if (FP9HandShake) { + uint8_t digestResp[SHA256_DIGEST_LENGTH]; + uint8_t *signatureResp = NULL; + + /* we have to use this signature now to find the correct algorithms for + * getting the digest and DH positions */ + int digestPosClient = getdig(clientsig, RTMP_SIG_SIZE); + + if (!VerifyDigest(digestPosClient, clientsig, GenuineFPKey, 30)) { + RTMP_Log(RTMP_LOGWARNING, "Trying different position for client digest!"); + offalg ^= 1; + getdig = digoff[offalg]; + getdh = dhoff[offalg]; + + digestPosClient = getdig(clientsig, RTMP_SIG_SIZE); + + if (!VerifyDigest(digestPosClient, clientsig, GenuineFPKey, 30)) { + RTMP_Log( + RTMP_LOGERROR, + "Couldn't verify the client digest"); /* continuing anyway will + probably fail */ + return FALSE; + } + } + + /* generate SWFVerification token (SHA256 HMAC hash of decompressed SWF, key + * are the last 32 bytes of the server handshake) */ + if (r->Link.SWFSize) { + const char swfVerify[] = {0x01, 0x01}; + char *vend = r->Link.SWFVerificationResponse + + sizeof(r->Link.SWFVerificationResponse); + + memcpy(r->Link.SWFVerificationResponse, swfVerify, 2); + AMF_EncodeInt32(&r->Link.SWFVerificationResponse[2], vend, + r->Link.SWFSize); + AMF_EncodeInt32(&r->Link.SWFVerificationResponse[6], vend, + r->Link.SWFSize); + HMACsha256(r->Link.SWFHash, SHA256_DIGEST_LENGTH, + &serversig[RTMP_SIG_SIZE - SHA256_DIGEST_LENGTH], + SHA256_DIGEST_LENGTH, + (uint8_t *)&r->Link.SWFVerificationResponse[10]); + } + + /* do Diffie-Hellmann Key exchange for encrypted RTMP */ + if (encrypted) { + int dhposClient, len; + /* compute secret key */ + uint8_t secretKey[128] = {0}; + + dhposClient = getdh(clientsig, RTMP_SIG_SIZE); + RTMP_Log(RTMP_LOGDEBUG, "%s: Client DH public key offset: %d", + __FUNCTION__, dhposClient); + len = DHComputeSharedSecretKey( + r->Link.dh, (uint8_t *)&clientsig[dhposClient], 128, secretKey); + if (len < 0) { + RTMP_Log(RTMP_LOGDEBUG, "%s: Wrong secret key position!", __FUNCTION__); + return FALSE; + } + + RTMP_Log(RTMP_LOGDEBUG, "%s: Secret key: ", __FUNCTION__); + RTMP_LogHex(RTMP_LOGDEBUG, secretKey, 128); + + InitRC4Encryption(secretKey, (uint8_t *)&clientsig[dhposClient], + (uint8_t *)&serversig[dhposServer], &keyIn, &keyOut); + } + + /* calculate response now */ + signatureResp = clientsig + RTMP_SIG_SIZE - SHA256_DIGEST_LENGTH; + + HMACsha256(&clientsig[digestPosClient], SHA256_DIGEST_LENGTH, GenuineFMSKey, + sizeof(GenuineFMSKey), digestResp); + HMACsha256(clientsig, RTMP_SIG_SIZE - SHA256_DIGEST_LENGTH, digestResp, + SHA256_DIGEST_LENGTH, signatureResp); +#ifdef FP10 + if (type == 8) { + uint8_t *dptr = digestResp; + uint8_t *sig = signatureResp; + /* encrypt signatureResp */ + for (i = 0; i < SHA256_DIGEST_LENGTH; i += 8) + rtmpe8_sig(sig + i, sig + i, dptr[i] % 15); + } +#if 0 + else if (type == 9)) + { + uint8_t *dptr = digestResp; + uint8_t *sig = signatureResp; + /* encrypt signatureResp */ + for (i=0; iLink.rc4keyIn = keyIn; + r->Link.rc4keyOut = keyOut; + + /* update the keystreams */ + if (r->Link.rc4keyIn) { + RC4_encrypt(r->Link.rc4keyIn, RTMP_SIG_SIZE, (uint8_t *)buff); + } + + if (r->Link.rc4keyOut) { + RC4_encrypt(r->Link.rc4keyOut, RTMP_SIG_SIZE, (uint8_t *)buff); + } + } + } else { + if (memcmp(serversig, clientsig, RTMP_SIG_SIZE) != 0) { + RTMP_Log(RTMP_LOGWARNING, "%s: client signature does not match!", + __FUNCTION__); + } + } + + RTMP_Log(RTMP_LOGDEBUG, "%s: Handshaking finished....", __FUNCTION__); + return TRUE; +} diff --git a/samples/LFLiveKitFrameworkDemo/vendors/pili-librtmp.framework/Headers/http.h b/samples/LFLiveKitFrameworkDemo/vendors/pili-librtmp.framework/Headers/http.h new file mode 100755 index 00000000..1eb7a462 --- /dev/null +++ b/samples/LFLiveKitFrameworkDemo/vendors/pili-librtmp.framework/Headers/http.h @@ -0,0 +1,49 @@ +#ifndef __RTMP_HTTP_H__ +#define __RTMP_HTTP_H__ +/* + * Copyright (C) 2010 Howard Chu + * Copyright (C) 2010 Antti Ajanki + * + * This file is part of librtmp. + * + * librtmp is free software; you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation; either version 2.1, + * or (at your option) any later version. + * + * librtmp is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with librtmp see the file COPYING. If not, write to + * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. + * http://www.gnu.org/copyleft/lgpl.html + */ + +typedef enum { + HTTPRES_OK, /* result OK */ + HTTPRES_OK_NOT_MODIFIED, /* not modified since last request */ + HTTPRES_NOT_FOUND, /* not found */ + HTTPRES_BAD_REQUEST, /* client error */ + HTTPRES_SERVER_ERROR, /* server reported an error */ + HTTPRES_REDIRECTED, /* resource has been moved */ + HTTPRES_LOST_CONNECTION /* connection lost while waiting for data */ +} HTTPResult; + +struct HTTP_ctx { + char *date; + int size; + int status; + void *data; +}; + +typedef size_t(HTTP_read_callback)(void *ptr, size_t size, size_t nmemb, + void *stream); + +HTTPResult HTTP_get(struct HTTP_ctx *http, const char *url, + HTTP_read_callback *cb); + +#endif diff --git a/samples/LFLiveKitFrameworkDemo/vendors/pili-librtmp.framework/Headers/log.h b/samples/LFLiveKitFrameworkDemo/vendors/pili-librtmp.framework/Headers/log.h new file mode 100755 index 00000000..f7daf375 --- /dev/null +++ b/samples/LFLiveKitFrameworkDemo/vendors/pili-librtmp.framework/Headers/log.h @@ -0,0 +1,68 @@ +/* + * Copyright (C) 2008-2009 Andrej Stepanchuk + * Copyright (C) 2009-2010 Howard Chu + * + * This file is part of librtmp. + * + * librtmp is free software; you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation; either version 2.1, + * or (at your option) any later version. + * + * librtmp is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with librtmp see the file COPYING. If not, write to + * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. + * http://www.gnu.org/copyleft/lgpl.html + */ + +#ifndef __RTMP_LOG_H__ +#define __RTMP_LOG_H__ + +#include +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif +/* Enable this to get full debugging output */ +/* #define _DEBUG */ + +#ifdef _DEBUG +#undef NODEBUG +#endif + +typedef enum { + RTMP_LOGCRIT = 0, + RTMP_LOGERROR, + RTMP_LOGWARNING, + RTMP_LOGINFO, + RTMP_LOGDEBUG, + RTMP_LOGDEBUG2, + RTMP_LOGALL +} RTMP_LogLevel; + +extern RTMP_LogLevel RTMP_debuglevel; + +typedef void(RTMP_LogCallback)(int level, const char *fmt, va_list); +void RTMP_LogSetCallback(RTMP_LogCallback *cb); +void RTMP_LogSetOutput(FILE *file); +void RTMP_LogPrintf(const char *format, ...); +void RTMP_LogStatus(const char *format, ...); +void RTMP_Log(int level, const char *format, ...); +void RTMP_LogHex(int level, const uint8_t *data, unsigned long len); +void RTMP_LogHexString(int level, const uint8_t *data, unsigned long len); +void RTMP_LogSetLevel(RTMP_LogLevel lvl); +RTMP_LogLevel RTMP_LogGetLevel(void); + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/samples/LFLiveKitFrameworkDemo/vendors/pili-librtmp.framework/Headers/rtmp.h b/samples/LFLiveKitFrameworkDemo/vendors/pili-librtmp.framework/Headers/rtmp.h new file mode 100755 index 00000000..d3879c01 --- /dev/null +++ b/samples/LFLiveKitFrameworkDemo/vendors/pili-librtmp.framework/Headers/rtmp.h @@ -0,0 +1,366 @@ +#ifndef __RTMP_H__ +#define __RTMP_H__ +/* + * Copyright (C) 2005-2008 Team XBMC + * http://www.xbmc.org + * Copyright (C) 2008-2009 Andrej Stepanchuk + * Copyright (C) 2009-2010 Howard Chu + * + * This file is part of librtmp. + * + * librtmp is free software; you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation; either version 2.1, + * or (at your option) any later version. + * + * librtmp is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with librtmp see the file COPYING. If not, write to + * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. + * http://www.gnu.org/copyleft/lgpl.html + */ + +#define NO_CRYPTO + +#if !defined(NO_CRYPTO) && !defined(CRYPTO) +#define CRYPTO +#endif + +#include +#include +#include + +#include "amf.h" +#include "error.h" + +#ifdef __cplusplus +extern "C" { +#endif + +#define RTMP_LIB_VERSION 0x020300 /* 2.3 */ + +#define RTMP_FEATURE_HTTP 0x01 +#define RTMP_FEATURE_ENC 0x02 +#define RTMP_FEATURE_SSL 0x04 +#define RTMP_FEATURE_MFP 0x08 /* not yet supported */ +#define RTMP_FEATURE_WRITE 0x10 /* publish, not play */ +#define RTMP_FEATURE_HTTP2 0x20 /* server-side rtmpt */ +//#define RTMP_FEATURE_NONBLOCK 0x40 /* non block socket */ + +#define RTMP_PROTOCOL_UNDEFINED -1 +#define RTMP_PROTOCOL_RTMP 0 +#define RTMP_PROTOCOL_RTMPE RTMP_FEATURE_ENC +#define RTMP_PROTOCOL_RTMPT RTMP_FEATURE_HTTP +#define RTMP_PROTOCOL_RTMPS RTMP_FEATURE_SSL +#define RTMP_PROTOCOL_RTMPTE (RTMP_FEATURE_HTTP | RTMP_FEATURE_ENC) +#define RTMP_PROTOCOL_RTMPTS (RTMP_FEATURE_HTTP | RTMP_FEATURE_SSL) +#define RTMP_PROTOCOL_RTMFP RTMP_FEATURE_MFP + +#define RTMP_DEFAULT_CHUNKSIZE 128 + +/* needs to fit largest number of bytes recv() may return */ +#define RTMP_BUFFER_CACHE_SIZE (16 * 1024) + +#define RTMP_CHANNELS 65600 + +extern const char PILI_RTMPProtocolStringsLower[][7]; +extern const AVal PILI_RTMP_DefaultFlashVer; +extern int PILI_RTMP_ctrlC; + +uint32_t PILI_RTMP_GetTime(void); + +#define RTMP_PACKET_TYPE_AUDIO 0x08 +#define RTMP_PACKET_TYPE_VIDEO 0x09 +#define RTMP_PACKET_TYPE_INFO 0x12 + +#define RTMP_MAX_HEADER_SIZE 18 + +#define RTMP_PACKET_SIZE_LARGE 0 +#define RTMP_PACKET_SIZE_MEDIUM 1 +#define RTMP_PACKET_SIZE_SMALL 2 +#define RTMP_PACKET_SIZE_MINIMUM 3 + +typedef struct PILI_RTMPChunk { + int c_headerSize; + int c_chunkSize; + char *c_chunk; + char c_header[RTMP_MAX_HEADER_SIZE]; +} PILI_RTMPChunk; + +typedef struct PILI_RTMPPacket { + uint8_t m_headerType; + uint8_t m_packetType; + uint8_t m_hasAbsTimestamp; /* timestamp absolute or relative? */ + int m_nChannel; + uint32_t m_nTimeStamp; /* timestamp */ + int32_t m_nInfoField2; /* last 4 bytes in a long header */ + uint32_t m_nBodySize; + uint32_t m_nBytesRead; + PILI_RTMPChunk *m_chunk; + char *m_body; + int m_useExtTimestamp; +} PILI_RTMPPacket; + +typedef struct PILI_RTMPSockBuf { + int sb_socket; + int sb_size; /* number of unprocessed bytes in buffer */ + char *sb_start; /* pointer into sb_pBuffer of next byte to process */ + char sb_buf[RTMP_BUFFER_CACHE_SIZE]; /* data read from socket */ + int sb_timedout; + void *sb_ssl; +} PILI_RTMPSockBuf; + +void PILI_RTMPPacket_Reset(PILI_RTMPPacket *p); +void PILI_RTMPPacket_Dump(PILI_RTMPPacket *p); +int PILI_RTMPPacket_Alloc(PILI_RTMPPacket *p, int nSize); +void PILI_RTMPPacket_Free(PILI_RTMPPacket *p); + +#define RTMPPacket_IsReady(a) ((a)->m_nBytesRead == (a)->m_nBodySize) + +typedef struct PILI_RTMP_LNK { + AVal hostname; + AVal domain; + AVal sockshost; + + AVal playpath0; /* parsed from URL */ + AVal playpath; /* passed in explicitly */ + AVal tcUrl; + AVal swfUrl; + AVal pageUrl; + AVal app; + AVal auth; + AVal flashVer; + AVal subscribepath; + AVal token; + AMFObject extras; + int edepth; + + int seekTime; + int stopTime; + +#define RTMP_LF_AUTH 0x0001 /* using auth param */ +#define RTMP_LF_LIVE 0x0002 /* stream is live */ +#define RTMP_LF_SWFV 0x0004 /* do SWF verification */ +#define RTMP_LF_PLST 0x0008 /* send playlist before play */ +#define RTMP_LF_BUFX 0x0010 /* toggle stream on BufferEmpty msg */ +#define RTMP_LF_FTCU 0x0020 /* free tcUrl on close */ + int lFlags; + + int swfAge; + + int protocol; + int timeout; /* connection timeout in seconds */ + int send_timeout; /* send data timeout */ + + unsigned short socksport; + unsigned short port; + +#ifdef CRYPTO +#define RTMP_SWF_HASHLEN 32 + void *dh; /* for encryption */ + void *rc4keyIn; + void *rc4keyOut; + + uint32_t SWFSize; + uint8_t SWFHash[RTMP_SWF_HASHLEN]; + char SWFVerificationResponse[RTMP_SWF_HASHLEN + 10]; +#endif +} PILI_RTMP_LNK; + +/* state for read() wrapper */ +typedef struct PILI_RTMP_READ { + char *buf; + char *bufpos; + unsigned int buflen; + uint32_t timestamp; + uint8_t dataType; + uint8_t flags; +#define RTMP_READ_HEADER 0x01 +#define RTMP_READ_RESUME 0x02 +#define RTMP_READ_NO_IGNORE 0x04 +#define RTMP_READ_GOTKF 0x08 +#define RTMP_READ_GOTFLVK 0x10 +#define RTMP_READ_SEEKING 0x20 + int8_t status; +#define RTMP_READ_COMPLETE -3 +#define RTMP_READ_ERROR -2 +#define RTMP_READ_EOF -1 +#define RTMP_READ_IGNORE 0 + + /* if bResume == TRUE */ + uint8_t initialFrameType; + uint32_t nResumeTS; + char *metaHeader; + char *initialFrame; + uint32_t nMetaHeaderSize; + uint32_t nInitialFrameSize; + uint32_t nIgnoredFrameCounter; + uint32_t nIgnoredFlvFrameCounter; +} PILI_RTMP_READ; + +typedef struct PILI_RTMP_METHOD { + AVal name; + int num; +} PILI_RTMP_METHOD; + +typedef void (*PILI_RTMPErrorCallback)(RTMPError *error, void *userData); + +typedef struct PILI_CONNECTION_TIME { + uint32_t connect_time; + uint32_t handshake_time; +} PILI_CONNECTION_TIME; + +typedef void (*PILI_RTMP_ConnectionTimeCallback)( + PILI_CONNECTION_TIME *conn_time, void *userData); + +typedef struct PILI_RTMP { + int m_inChunkSize; + int m_outChunkSize; + int m_nBWCheckCounter; + int m_nBytesIn; + int m_nBytesInSent; + int m_nBufferMS; + int m_stream_id; /* returned in _result from createStream */ + int m_mediaChannel; + uint32_t m_mediaStamp; + uint32_t m_pauseStamp; + int m_pausing; + int m_nServerBW; + int m_nClientBW; + uint8_t m_nClientBW2; + uint8_t m_bPlaying; + uint8_t m_bSendEncoding; + uint8_t m_bSendCounter; + + int m_numInvokes; + int m_numCalls; + PILI_RTMP_METHOD *m_methodCalls; /* remote method calls queue */ + + PILI_RTMPPacket *m_vecChannelsIn[RTMP_CHANNELS]; + PILI_RTMPPacket *m_vecChannelsOut[RTMP_CHANNELS]; + int m_channelTimestamp[RTMP_CHANNELS]; /* abs timestamp of last packet */ + + double m_fAudioCodecs; /* audioCodecs for the connect packet */ + double m_fVideoCodecs; /* videoCodecs for the connect packet */ + double m_fEncoding; /* AMF0 or AMF3 */ + + double m_fDuration; /* duration of stream in seconds */ + + int m_msgCounter; /* RTMPT stuff */ + int m_polling; + int m_resplen; + int m_unackd; + AVal m_clientID; + + PILI_RTMP_READ m_read; + PILI_RTMPPacket m_write; + PILI_RTMPSockBuf m_sb; + PILI_RTMP_LNK Link; + + PILI_RTMPErrorCallback m_errorCallback; + PILI_RTMP_ConnectionTimeCallback m_connCallback; + RTMPError *m_error; + void *m_userData; + int m_is_closing; + int m_tcp_nodelay; + uint32_t ip; +} PILI_RTMP; + +int PILI_RTMP_ParseURL(const char *url, int *protocol, AVal *host, + unsigned int *port, AVal *playpath, AVal *app); + +int PILI_RTMP_ParseURL2(const char *url, int *protocol, AVal *host, + unsigned int *port, AVal *playpath, AVal *app, AVal *domain); + +void PILI_RTMP_ParsePlaypath(AVal *in, AVal *out); +void PILI_RTMP_SetBufferMS(PILI_RTMP *r, int size); +void PILI_RTMP_UpdateBufferMS(PILI_RTMP *r, RTMPError *error); + +int PILI_RTMP_SetOpt(PILI_RTMP *r, const AVal *opt, AVal *arg, + RTMPError *error); +int PILI_RTMP_SetupURL(PILI_RTMP *r, const char *url, RTMPError *error); +void PILI_RTMP_SetupStream(PILI_RTMP *r, int protocol, AVal *hostname, + unsigned int port, AVal *sockshost, AVal *playpath, + AVal *tcUrl, AVal *swfUrl, AVal *pageUrl, AVal *app, + AVal *auth, AVal *swfSHA256Hash, uint32_t swfSize, + AVal *flashVer, AVal *subscribepath, int dStart, + int dStop, int bLiveStream, long int timeout); + +int PILI_RTMP_Connect(PILI_RTMP *r, PILI_RTMPPacket *cp, RTMPError *error); +struct sockaddr; +int PILI_RTMP_Connect0(PILI_RTMP *r, struct addrinfo *ai, unsigned short port, + RTMPError *error); +int PILI_RTMP_Connect1(PILI_RTMP *r, PILI_RTMPPacket *cp, RTMPError *error); +int PILI_RTMP_Serve(PILI_RTMP *r, RTMPError *error); + +int PILI_RTMP_ReadPacket(PILI_RTMP *r, PILI_RTMPPacket *packet); +int PILI_RTMP_SendPacket(PILI_RTMP *r, PILI_RTMPPacket *packet, int queue, + RTMPError *error); +int PILI_RTMP_SendChunk(PILI_RTMP *r, PILI_RTMPChunk *chunk, RTMPError *error); +int PILI_RTMP_IsConnected(PILI_RTMP *r); +int PILI_RTMP_Socket(PILI_RTMP *r); +int PILI_RTMP_IsTimedout(PILI_RTMP *r); +double PILI_RTMP_GetDuration(PILI_RTMP *r); +int PILI_RTMP_ToggleStream(PILI_RTMP *r, RTMPError *error); + +int PILI_RTMP_ConnectStream(PILI_RTMP *r, int seekTime, RTMPError *error); +int PILI_RTMP_ReconnectStream(PILI_RTMP *r, int seekTime, RTMPError *error); +void PILI_RTMP_DeleteStream(PILI_RTMP *r, RTMPError *error); +int PILI_RTMP_GetNextMediaPacket(PILI_RTMP *r, PILI_RTMPPacket *packet); +int PILI_RTMP_ClientPacket(PILI_RTMP *r, PILI_RTMPPacket *packet); + +void PILI_RTMP_Init(PILI_RTMP *r); +void PILI_RTMP_Close(PILI_RTMP *r, RTMPError *error); +PILI_RTMP *PILI_RTMP_Alloc(void); +void PILI_RTMP_Free(PILI_RTMP *r); +void PILI_RTMP_EnableWrite(PILI_RTMP *r); + +int PILI_RTMP_LibVersion(void); +void PILI_RTMP_UserInterrupt(void); /* user typed Ctrl-C */ + +int PILI_RTMP_SendCtrl(PILI_RTMP *r, short nType, unsigned int nObject, + unsigned int nTime, RTMPError *error); + +/* caller probably doesn't know current timestamp, should + * just use RTMP_Pause instead + */ +int PILI_RTMP_SendPause(PILI_RTMP *r, int DoPause, int dTime, RTMPError *error); +int PILI_RTMP_Pause(PILI_RTMP *r, int DoPause, RTMPError *error); + +int PILI_RTMP_FindFirstMatchingProperty(AMFObject *obj, const AVal *name, + AMFObjectProperty *p); + +int PILI_RTMPSockBuf_Fill(PILI_RTMPSockBuf *sb, int timeout); +int PILI_RTMPSockBuf_Send(PILI_RTMPSockBuf *sb, const char *buf, int len); +int PILI_RTMPSockBuf_Close(PILI_RTMPSockBuf *sb); + +int PILI_RTMP_SendCreateStream(PILI_RTMP *r, RTMPError *error); +int PILI_RTMP_SendSeek(PILI_RTMP *r, int dTime, RTMPError *error); +int PILI_RTMP_SendServerBW(PILI_RTMP *r, RTMPError *error); +int PILI_RTMP_SendClientBW(PILI_RTMP *r, RTMPError *error); +void PILI_RTMP_DropRequest(PILI_RTMP *r, int i, int freeit); +int PILI_RTMP_Read(PILI_RTMP *r, char *buf, int size); +int PILI_RTMP_Write(PILI_RTMP *r, const char *buf, int size, RTMPError *error); + +#define MAJOR 1 +#define MINOR 0 +#define PATCH 4 + +int PILI_RTMP_Version(); + +const char * PILI_RTMP_GetReqId(); + +/* hashswf.c */ +int PILI_RTMP_HashSWF(const char *url, unsigned int *size, unsigned char *hash, + int age); + +#ifdef __cplusplus +}; +#endif + +#endif diff --git a/samples/LFLiveKitFrameworkDemo/vendors/pili-librtmp.framework/Headers/rtmp_sys.h b/samples/LFLiveKitFrameworkDemo/vendors/pili-librtmp.framework/Headers/rtmp_sys.h new file mode 100755 index 00000000..880457c3 --- /dev/null +++ b/samples/LFLiveKitFrameworkDemo/vendors/pili-librtmp.framework/Headers/rtmp_sys.h @@ -0,0 +1,123 @@ +#ifndef __RTMP_SYS_H__ +#define __RTMP_SYS_H__ +/* + * Copyright (C) 2010 Howard Chu + * + * This file is part of librtmp. + * + * librtmp is free software; you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation; either version 2.1, + * or (at your option) any later version. + * + * librtmp is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with librtmp see the file COPYING. If not, write to + * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. + * http://www.gnu.org/copyleft/lgpl.html + */ + +#ifdef _WIN32 + +#ifdef _XBOX +#include +#include +#define snprintf _snprintf +#define strcasecmp stricmp +#define strncasecmp strnicmp +#define vsnprintf _vsnprintf + +#else /* !_XBOX */ +#include +#include +#endif + +#define GetSockError() WSAGetLastError() +#define SetSockError(e) WSASetLastError(e) +#define setsockopt(a, b, c, d, e) (setsockopt)(a, b, c, (const char *)d, (int)e) +#define EWOULDBLOCK \ + WSAETIMEDOUT /* we don't use nonblocking, but we do use timeouts */ +#define sleep(n) Sleep(n * 1000) +#define msleep(n) Sleep(n) +#define SET_RCVTIMEO(tv, s) int tv = s * 1000 +#else /* !_WIN32 */ +#include +#include +#include +#include +#include +#include +#include +#include +#define GetSockError() errno +#define SetSockError(e) errno = e +#undef closesocket +#define closesocket(s) close(s) +#define msleep(n) usleep(n * 1000) +#define SET_RCVTIMEO(tv, s) struct timeval tv = {s, 0} +#endif + +#include "rtmp.h" + +#ifdef USE_POLARSSL +#include +#include +#include +typedef struct tls_ctx { + havege_state hs; + ssl_session ssn; +} tls_ctx; +#define TLS_CTX tls_ctx * +#define TLS_client(ctx, s) \ + s = malloc(sizeof(ssl_context)); \ + ssl_init(s); \ + ssl_set_endpoint(s, SSL_IS_CLIENT); \ + ssl_set_authmode(s, SSL_VERIFY_NONE); \ + ssl_set_rng(s, havege_rand, &ctx->hs); \ + ssl_set_ciphers(s, ssl_default_ciphers); \ + ssl_set_session(s, 1, 600, &ctx->ssn) +#define TLS_setfd(s, fd) ssl_set_bio(s, net_recv, &fd, net_send, &fd) +#define TLS_connect(s) ssl_handshake(s) +#define TLS_read(s, b, l) ssl_read(s, (unsigned char *)b, l) +#define TLS_write(s, b, l) ssl_write(s, (unsigned char *)b, l) +#define TLS_shutdown(s) ssl_close_notify(s) +#define TLS_close(s) \ + ssl_free(s); \ + free(s) + +#elif defined(USE_GNUTLS) +#include +typedef struct tls_ctx { + gnutls_certificate_credentials_t cred; + gnutls_priority_t prios; +} tls_ctx; +#define TLS_CTX tls_ctx * +#define TLS_client(ctx, s) \ + gnutls_init((gnutls_session_t *)(&s), GNUTLS_CLIENT); \ + gnutls_priority_set(s, ctx->prios); \ + gnutls_credentials_set(s, GNUTLS_CRD_CERTIFICATE, ctx->cred) +#define TLS_setfd(s, fd) \ + gnutls_transport_set_ptr(s, (gnutls_transport_ptr_t)(long)fd) +#define TLS_connect(s) gnutls_handshake(s) +#define TLS_read(s, b, l) gnutls_record_recv(s, b, l) +#define TLS_write(s, b, l) gnutls_record_send(s, b, l) +#define TLS_shutdown(s) gnutls_bye(s, GNUTLS_SHUT_RDWR) +#define TLS_close(s) gnutls_deinit(s) + +#else /* USE_OPENSSL */ +#define TLS_CTX SSL_CTX * +#define TLS_client(ctx, s) s = SSL_new(ctx) +#define TLS_setfd(s, fd) SSL_set_fd(s, fd) +#define TLS_connect(s) SSL_connect(s) +#define TLS_read(s, b, l) SSL_read(s, b, l) +#define TLS_write(s, b, l) SSL_write(s, b, l) +#define TLS_shutdown(s) SSL_shutdown(s) +#define TLS_close(s) SSL_free(s) + +#endif +#endif diff --git a/samples/LFLiveKitFrameworkDemo/vendors/pili-librtmp.framework/Info.plist b/samples/LFLiveKitFrameworkDemo/vendors/pili-librtmp.framework/Info.plist new file mode 100644 index 00000000..2fb44429 Binary files /dev/null and b/samples/LFLiveKitFrameworkDemo/vendors/pili-librtmp.framework/Info.plist differ diff --git a/samples/LFLiveKitFrameworkDemo/vendors/pili-librtmp.framework/_CodeSignature/CodeDirectory b/samples/LFLiveKitFrameworkDemo/vendors/pili-librtmp.framework/_CodeSignature/CodeDirectory new file mode 100644 index 00000000..3b56c5d7 Binary files /dev/null and b/samples/LFLiveKitFrameworkDemo/vendors/pili-librtmp.framework/_CodeSignature/CodeDirectory differ diff --git a/samples/LFLiveKitFrameworkDemo/vendors/pili-librtmp.framework/_CodeSignature/CodeRequirements b/samples/LFLiveKitFrameworkDemo/vendors/pili-librtmp.framework/_CodeSignature/CodeRequirements new file mode 100644 index 00000000..cb010c30 Binary files /dev/null and b/samples/LFLiveKitFrameworkDemo/vendors/pili-librtmp.framework/_CodeSignature/CodeRequirements differ diff --git a/samples/LFLiveKitFrameworkDemo/vendors/pili-librtmp.framework/_CodeSignature/CodeRequirements-1 b/samples/LFLiveKitFrameworkDemo/vendors/pili-librtmp.framework/_CodeSignature/CodeRequirements-1 new file mode 100644 index 00000000..f74186e1 Binary files /dev/null and b/samples/LFLiveKitFrameworkDemo/vendors/pili-librtmp.framework/_CodeSignature/CodeRequirements-1 differ diff --git a/samples/LFLiveKitFrameworkDemo/vendors/pili-librtmp.framework/_CodeSignature/CodeResources b/samples/LFLiveKitFrameworkDemo/vendors/pili-librtmp.framework/_CodeSignature/CodeResources new file mode 100644 index 00000000..4248fdcd --- /dev/null +++ b/samples/LFLiveKitFrameworkDemo/vendors/pili-librtmp.framework/_CodeSignature/CodeResources @@ -0,0 +1,261 @@ + + + + + files + + Headers/amf.h + + kGNvjJIoCw7nJy3kjjy6bgjrbVM= + + Headers/bytes.h + + rf2XeRlX/rLrVwSO4ygxJ9qcGGs= + + Headers/dh.h + + EZYLNyDbk3Xey+pkbfmAjzAsn1Q= + + Headers/dhgroups.h + + 1PArWQd8m0VVGjppiS9eF+7GqZQ= + + Headers/error.h + + BmXYGUcz+qLEYHOmNWm5iZs1cT0= + + Headers/handshake.h + + JSTLeAOP5Ux5RV0MuT6OlTWeM50= + + Headers/http.h + + D+7YvQh17K8IEHx9uY5mQkRolrQ= + + Headers/log.h + + smAML5qh1lQsa5O141/avkVpW/0= + + Headers/rtmp.h + + qjxjEHhY+ET2K4I9Fkp5NWvQ1ak= + + Headers/rtmp_sys.h + + h5aG2dXtze3bb6Ni5AzBEFNAIlw= + + Info.plist + + jBTUuQpeANWyu36KXLiUdaEFXR8= + + + files2 + + Headers/amf.h + + hash + + kGNvjJIoCw7nJy3kjjy6bgjrbVM= + + hash2 + + IwCiI2tTa5UbNIqujHh0Gat+ENoUqs0pfJQRlTgCXLI= + + + Headers/bytes.h + + hash + + rf2XeRlX/rLrVwSO4ygxJ9qcGGs= + + hash2 + + VdhSAgCQvn5k65JqlJ4XKX78jg0y4zj/eoIfVYxhU+c= + + + Headers/dh.h + + hash + + EZYLNyDbk3Xey+pkbfmAjzAsn1Q= + + hash2 + + pu/JXkXrTPMO789L5OBFn4sDi5H1Lnc0Af0i/w6lIuk= + + + Headers/dhgroups.h + + hash + + 1PArWQd8m0VVGjppiS9eF+7GqZQ= + + hash2 + + Sa1jUlQTNigFKQYgAVHsE9si09vjh5nGBAArSX7dLwU= + + + Headers/error.h + + hash + + BmXYGUcz+qLEYHOmNWm5iZs1cT0= + + hash2 + + 3L44UXfV0Oi5SY8OQh4tg9nOamJ5LfT5c+m5LOKs1f8= + + + Headers/handshake.h + + hash + + JSTLeAOP5Ux5RV0MuT6OlTWeM50= + + hash2 + + wYq3SY2KdCFex18QI6sRapiwAkCtOQpXtlExS884zUU= + + + Headers/http.h + + hash + + D+7YvQh17K8IEHx9uY5mQkRolrQ= + + hash2 + + KogyAaqwVHvADAzf/kuUHnDWbhuoYhTOV47tGjE5oCM= + + + Headers/log.h + + hash + + smAML5qh1lQsa5O141/avkVpW/0= + + hash2 + + 61apJ7aiRVG2Ojkg5hnHlkaiWGvXIiCySunTTfE7O64= + + + Headers/rtmp.h + + hash + + qjxjEHhY+ET2K4I9Fkp5NWvQ1ak= + + hash2 + + 5K1oNfNpC8lmSejtzpJAMPGKDRLYDF8UNJ2ZdFbMDhQ= + + + Headers/rtmp_sys.h + + hash + + h5aG2dXtze3bb6Ni5AzBEFNAIlw= + + hash2 + + qc8QOVfQ/MtdV8QCXQ27QID1M5nTNH13iWsGr2r8jSg= + + + + rules + + ^ + + ^.*\.lproj/ + + optional + + weight + 1000 + + ^.*\.lproj/locversion.plist$ + + omit + + weight + 1100 + + ^version.plist$ + + + rules2 + + .*\.dSYM($|/) + + weight + 11 + + ^ + + weight + 20 + + ^(.*/)?\.DS_Store$ + + omit + + weight + 2000 + + ^(Frameworks|SharedFrameworks|PlugIns|Plug-ins|XPCServices|Helpers|MacOS|Library/(Automator|Spotlight|LoginItems))/ + + nested + + weight + 10 + + ^.* + + ^.*\.lproj/ + + optional + + weight + 1000 + + ^.*\.lproj/locversion.plist$ + + omit + + weight + 1100 + + ^Info\.plist$ + + omit + + weight + 20 + + ^PkgInfo$ + + omit + + weight + 20 + + ^[^/]+$ + + nested + + weight + 10 + + ^embedded\.provisionprofile$ + + weight + 20 + + ^version\.plist$ + + weight + 20 + + + + diff --git a/samples/LFLiveKitFrameworkDemo/vendors/pili-librtmp.framework/_CodeSignature/CodeSignature b/samples/LFLiveKitFrameworkDemo/vendors/pili-librtmp.framework/_CodeSignature/CodeSignature new file mode 100644 index 00000000..6fd9b074 Binary files /dev/null and b/samples/LFLiveKitFrameworkDemo/vendors/pili-librtmp.framework/_CodeSignature/CodeSignature differ diff --git a/samples/LFLiveKitFrameworkDemo/vendors/pili-librtmp.framework/pili-librtmp b/samples/LFLiveKitFrameworkDemo/vendors/pili-librtmp.framework/pili-librtmp new file mode 100644 index 00000000..84b2f407 Binary files /dev/null and b/samples/LFLiveKitFrameworkDemo/vendors/pili-librtmp.framework/pili-librtmp differ diff --git a/LFLiveKitSwiftDemo/LFLiveKitSwiftDemo.xcodeproj/project.pbxproj b/samples/LFLiveKitSwiftDemo/LFLiveKitSwiftDemo.xcodeproj/project.pbxproj similarity index 100% rename from LFLiveKitSwiftDemo/LFLiveKitSwiftDemo.xcodeproj/project.pbxproj rename to samples/LFLiveKitSwiftDemo/LFLiveKitSwiftDemo.xcodeproj/project.pbxproj diff --git a/LFLiveKitSwiftDemo/LFLiveKitSwiftDemo/AppDelegate.swift b/samples/LFLiveKitSwiftDemo/LFLiveKitSwiftDemo/AppDelegate.swift similarity index 100% rename from LFLiveKitSwiftDemo/LFLiveKitSwiftDemo/AppDelegate.swift rename to samples/LFLiveKitSwiftDemo/LFLiveKitSwiftDemo/AppDelegate.swift diff --git a/samples/LFLiveKitSwiftDemo/LFLiveKitSwiftDemo/Assets.xcassets/AppIcon.appiconset/Contents.json b/samples/LFLiveKitSwiftDemo/LFLiveKitSwiftDemo/Assets.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 00000000..118c98f7 --- /dev/null +++ b/samples/LFLiveKitSwiftDemo/LFLiveKitSwiftDemo/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1,38 @@ +{ + "images" : [ + { + "idiom" : "iphone", + "size" : "29x29", + "scale" : "2x" + }, + { + "idiom" : "iphone", + "size" : "29x29", + "scale" : "3x" + }, + { + "idiom" : "iphone", + "size" : "40x40", + "scale" : "2x" + }, + { + "idiom" : "iphone", + "size" : "40x40", + "scale" : "3x" + }, + { + "idiom" : "iphone", + "size" : "60x60", + "scale" : "2x" + }, + { + "idiom" : "iphone", + "size" : "60x60", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/LFLiveKitSwiftDemo/LFLiveKitSwiftDemo/Base.lproj/LaunchScreen.storyboard b/samples/LFLiveKitSwiftDemo/LFLiveKitSwiftDemo/Base.lproj/LaunchScreen.storyboard similarity index 100% rename from LFLiveKitSwiftDemo/LFLiveKitSwiftDemo/Base.lproj/LaunchScreen.storyboard rename to samples/LFLiveKitSwiftDemo/LFLiveKitSwiftDemo/Base.lproj/LaunchScreen.storyboard diff --git a/LFLiveKitSwiftDemo/LFLiveKitSwiftDemo/Base.lproj/Main.storyboard b/samples/LFLiveKitSwiftDemo/LFLiveKitSwiftDemo/Base.lproj/Main.storyboard similarity index 100% rename from LFLiveKitSwiftDemo/LFLiveKitSwiftDemo/Base.lproj/Main.storyboard rename to samples/LFLiveKitSwiftDemo/LFLiveKitSwiftDemo/Base.lproj/Main.storyboard diff --git a/LFLiveKitSwiftDemo/LFLiveKitSwiftDemo/Info.plist b/samples/LFLiveKitSwiftDemo/LFLiveKitSwiftDemo/Info.plist similarity index 100% rename from LFLiveKitSwiftDemo/LFLiveKitSwiftDemo/Info.plist rename to samples/LFLiveKitSwiftDemo/LFLiveKitSwiftDemo/Info.plist diff --git a/LFLiveKitSwiftDemo/LFLiveKitSwiftDemo/ViewController.swift b/samples/LFLiveKitSwiftDemo/LFLiveKitSwiftDemo/ViewController.swift similarity index 100% rename from LFLiveKitSwiftDemo/LFLiveKitSwiftDemo/ViewController.swift rename to samples/LFLiveKitSwiftDemo/LFLiveKitSwiftDemo/ViewController.swift diff --git a/samples/LFLiveKitSwiftDemo/LFLiveKitSwiftDemo/images/camra_beauty@2x.png b/samples/LFLiveKitSwiftDemo/LFLiveKitSwiftDemo/images/camra_beauty@2x.png new file mode 100644 index 00000000..4e8a04a3 Binary files /dev/null and b/samples/LFLiveKitSwiftDemo/LFLiveKitSwiftDemo/images/camra_beauty@2x.png differ diff --git a/samples/LFLiveKitSwiftDemo/LFLiveKitSwiftDemo/images/camra_beauty@3x.png b/samples/LFLiveKitSwiftDemo/LFLiveKitSwiftDemo/images/camra_beauty@3x.png new file mode 100644 index 00000000..acc63fbe Binary files /dev/null and b/samples/LFLiveKitSwiftDemo/LFLiveKitSwiftDemo/images/camra_beauty@3x.png differ diff --git a/samples/LFLiveKitSwiftDemo/LFLiveKitSwiftDemo/images/camra_beauty_close@2x.png b/samples/LFLiveKitSwiftDemo/LFLiveKitSwiftDemo/images/camra_beauty_close@2x.png new file mode 100644 index 00000000..78a5bbfd Binary files /dev/null and b/samples/LFLiveKitSwiftDemo/LFLiveKitSwiftDemo/images/camra_beauty_close@2x.png differ diff --git a/samples/LFLiveKitSwiftDemo/LFLiveKitSwiftDemo/images/camra_beauty_close@3x.png b/samples/LFLiveKitSwiftDemo/LFLiveKitSwiftDemo/images/camra_beauty_close@3x.png new file mode 100644 index 00000000..00e2402e Binary files /dev/null and b/samples/LFLiveKitSwiftDemo/LFLiveKitSwiftDemo/images/camra_beauty_close@3x.png differ diff --git a/samples/LFLiveKitSwiftDemo/LFLiveKitSwiftDemo/images/camra_preview@2x.png b/samples/LFLiveKitSwiftDemo/LFLiveKitSwiftDemo/images/camra_preview@2x.png new file mode 100644 index 00000000..ddf8f655 Binary files /dev/null and b/samples/LFLiveKitSwiftDemo/LFLiveKitSwiftDemo/images/camra_preview@2x.png differ diff --git a/samples/LFLiveKitSwiftDemo/LFLiveKitSwiftDemo/images/camra_preview@3x.png b/samples/LFLiveKitSwiftDemo/LFLiveKitSwiftDemo/images/camra_preview@3x.png new file mode 100644 index 00000000..c4cdc96b Binary files /dev/null and b/samples/LFLiveKitSwiftDemo/LFLiveKitSwiftDemo/images/camra_preview@3x.png differ diff --git a/samples/LFLiveKitSwiftDemo/LFLiveKitSwiftDemo/images/close_preview@2x.png b/samples/LFLiveKitSwiftDemo/LFLiveKitSwiftDemo/images/close_preview@2x.png new file mode 100644 index 00000000..af431dc7 Binary files /dev/null and b/samples/LFLiveKitSwiftDemo/LFLiveKitSwiftDemo/images/close_preview@2x.png differ diff --git a/samples/LFLiveKitSwiftDemo/LFLiveKitSwiftDemo/images/close_preview@3x.png b/samples/LFLiveKitSwiftDemo/LFLiveKitSwiftDemo/images/close_preview@3x.png new file mode 100644 index 00000000..b6a9203c Binary files /dev/null and b/samples/LFLiveKitSwiftDemo/LFLiveKitSwiftDemo/images/close_preview@3x.png differ diff --git a/LFLiveKitSwiftDemo/Podfile b/samples/LFLiveKitSwiftDemo/Podfile similarity index 72% rename from LFLiveKitSwiftDemo/Podfile rename to samples/LFLiveKitSwiftDemo/Podfile index 30570b12..22153b04 100644 --- a/LFLiveKitSwiftDemo/Podfile +++ b/samples/LFLiveKitSwiftDemo/Podfile @@ -2,5 +2,5 @@ source 'https://github.com/CocoaPods/Specs.git' platform :ios,'7.0' target “LFLiveKitSwiftDemo” do - pod 'LFLiveKit', :path => '../.' + pod 'LFLiveKit', :path => '../../.' end