├── .gitignore ├── 01-摄像头采集数据写入文件 ├── 01-摄像头采集数据写入文件.xcodeproj │ ├── project.pbxproj │ └── project.xcworkspace │ │ ├── contents.xcworkspacedata │ │ └── xcshareddata │ │ └── IDEWorkspaceChecks.plist ├── 01-摄像头采集数据写入文件 │ ├── AppDelegate.h │ ├── AppDelegate.m │ ├── Assets.xcassets │ │ ├── AppIcon.appiconset │ │ │ └── Contents.json │ │ └── Contents.json │ ├── Base.lproj │ │ ├── LaunchScreen.storyboard │ │ └── Main.storyboard │ ├── Info.plist │ ├── ViewController.h │ ├── ViewController.m │ └── main.m ├── 01-摄像头采集数据写入文件Tests │ ├── Info.plist │ └── _1____________Tests.m └── 01-摄像头采集数据写入文件UITests │ ├── Info.plist │ └── _1____________UITests.m ├── 02-GPUImage简单使用 ├── GPUImageTest.xcodeproj │ └── project.pbxproj ├── GPUImageTest │ ├── AppDelegate.h │ ├── AppDelegate.m │ ├── Assets.xcassets │ │ ├── AppIcon.appiconset │ │ │ └── Contents.json │ │ ├── Contents.json │ │ └── liuyifei.imageset │ │ │ ├── Contents.json │ │ │ └── liuyifei.jpeg │ ├── Base.lproj │ │ ├── LaunchScreen.storyboard │ │ └── Main.storyboard │ ├── Info.plist │ ├── ViewController.h │ ├── ViewController.m │ └── main.m ├── GPUImageTestTests │ ├── GPUImageTestTests.m │ └── Info.plist ├── GPUImageTestUITests │ ├── GPUImageTestUITests.m │ └── Info.plist ├── Podfile └── Podfile.lock ├── 03-美颜相机 ├── BeautyCamera.xcodeproj │ └── project.pbxproj ├── BeautyCamera │ ├── AppDelegate.h │ ├── AppDelegate.m │ ├── Assets.xcassets │ │ ├── AppIcon.appiconset │ │ │ └── Contents.json │ │ └── Contents.json │ ├── Base.lproj │ │ ├── LaunchScreen.storyboard │ │ └── Main.storyboard │ ├── CameraViewController.h │ ├── CameraViewController.m │ ├── CameraViewController.xib │ ├── Info.plist │ ├── PhotoViewController.h │ ├── PhotoViewController.m │ ├── PhotoViewController.xib │ ├── ViewController.h │ ├── ViewController.m │ └── main.m ├── BeautyCameraTests │ ├── BeautyCameraTests.m │ └── Info.plist ├── BeautyCameraUITests │ ├── BeautyCameraUITests.m │ └── Info.plist ├── Podfile └── Podfile.lock ├── LICENSE └── README.md /.gitignore: -------------------------------------------------------------------------------- 1 | # Xcode 2 | .DS_Store 3 | */build/* 4 | *.pbxuser 5 | !default.pbxuser 6 | *.mode1v3 7 | !default.mode1v3 8 | *.mode2v3 9 | !default.mode2v3 10 | *.perspectivev3 11 | !default.perspectivev3 12 | xcuserdata 13 | profile 14 | *.moved-aside 15 | DerivedData 16 | .idea/ 17 | *.hmap 18 | *.xccheckout 19 | *.xcworkspace 20 | !default.xcworkspace 21 | 22 | #CocoaPods 23 | Pods 24 | !Podfile 25 | !Podfile.lock -------------------------------------------------------------------------------- /01-摄像头采集数据写入文件/01-摄像头采集数据写入文件.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 50; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | BEB90BF222508D2600989289 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = BEB90BF122508D2600989289 /* AppDelegate.m */; }; 11 | BEB90BF522508D2600989289 /* ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = BEB90BF422508D2600989289 /* ViewController.m */; }; 12 | BEB90BF822508D2600989289 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = BEB90BF622508D2600989289 /* Main.storyboard */; }; 13 | BEB90BFA22508D2700989289 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = BEB90BF922508D2700989289 /* Assets.xcassets */; }; 14 | BEB90BFD22508D2700989289 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = BEB90BFB22508D2700989289 /* LaunchScreen.storyboard */; }; 15 | BEB90C0022508D2700989289 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = BEB90BFF22508D2700989289 /* main.m */; }; 16 | BEB90C0A22508D2700989289 /* _1____________Tests.m in Sources */ = {isa = PBXBuildFile; fileRef = BEB90C0922508D2700989289 /* _1____________Tests.m */; }; 17 | BEB90C1522508D2700989289 /* _1____________UITests.m in Sources */ = {isa = PBXBuildFile; fileRef = BEB90C1422508D2700989289 /* _1____________UITests.m */; }; 18 | BEB90C242250AE0D00989289 /* AVFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = BEB90C232250AE0D00989289 /* AVFoundation.framework */; }; 19 | /* End PBXBuildFile section */ 20 | 21 | /* Begin PBXContainerItemProxy section */ 22 | BEB90C0622508D2700989289 /* PBXContainerItemProxy */ = { 23 | isa = PBXContainerItemProxy; 24 | containerPortal = BEB90BE522508D2600989289 /* Project object */; 25 | proxyType = 1; 26 | remoteGlobalIDString = BEB90BEC22508D2600989289; 27 | remoteInfo = "01-摄像头采集数据写入文件"; 28 | }; 29 | BEB90C1122508D2700989289 /* PBXContainerItemProxy */ = { 30 | isa = PBXContainerItemProxy; 31 | containerPortal = BEB90BE522508D2600989289 /* Project object */; 32 | proxyType = 1; 33 | remoteGlobalIDString = BEB90BEC22508D2600989289; 34 | remoteInfo = "01-摄像头采集数据写入文件"; 35 | }; 36 | /* End PBXContainerItemProxy section */ 37 | 38 | /* Begin PBXFileReference section */ 39 | BEB90BED22508D2600989289 /* 01-摄像头采集数据写入文件.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "01-摄像头采集数据写入文件.app"; sourceTree = BUILT_PRODUCTS_DIR; }; 40 | BEB90BF022508D2600989289 /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; }; 41 | BEB90BF122508D2600989289 /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; }; 42 | BEB90BF322508D2600989289 /* ViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ViewController.h; sourceTree = ""; }; 43 | BEB90BF422508D2600989289 /* ViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ViewController.m; sourceTree = ""; }; 44 | BEB90BF722508D2600989289 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; 45 | BEB90BF922508D2700989289 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 46 | BEB90BFC22508D2700989289 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; 47 | BEB90BFE22508D2700989289 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 48 | BEB90BFF22508D2700989289 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; 49 | BEB90C0522508D2700989289 /* 01-摄像头采集数据写入文件Tests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = "01-摄像头采集数据写入文件Tests.xctest"; sourceTree = BUILT_PRODUCTS_DIR; }; 50 | BEB90C0922508D2700989289 /* _1____________Tests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = "_1____________Tests.m"; sourceTree = ""; }; 51 | BEB90C0B22508D2700989289 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 52 | BEB90C1022508D2700989289 /* 01-摄像头采集数据写入文件UITests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = "01-摄像头采集数据写入文件UITests.xctest"; sourceTree = BUILT_PRODUCTS_DIR; }; 53 | BEB90C1422508D2700989289 /* _1____________UITests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = "_1____________UITests.m"; sourceTree = ""; }; 54 | BEB90C1622508D2700989289 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 55 | BEB90C232250AE0D00989289 /* AVFoundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AVFoundation.framework; path = System/Library/Frameworks/AVFoundation.framework; sourceTree = SDKROOT; }; 56 | /* End PBXFileReference section */ 57 | 58 | /* Begin PBXFrameworksBuildPhase section */ 59 | BEB90BEA22508D2600989289 /* Frameworks */ = { 60 | isa = PBXFrameworksBuildPhase; 61 | buildActionMask = 2147483647; 62 | files = ( 63 | BEB90C242250AE0D00989289 /* AVFoundation.framework in Frameworks */, 64 | ); 65 | runOnlyForDeploymentPostprocessing = 0; 66 | }; 67 | BEB90C0222508D2700989289 /* Frameworks */ = { 68 | isa = PBXFrameworksBuildPhase; 69 | buildActionMask = 2147483647; 70 | files = ( 71 | ); 72 | runOnlyForDeploymentPostprocessing = 0; 73 | }; 74 | BEB90C0D22508D2700989289 /* Frameworks */ = { 75 | isa = PBXFrameworksBuildPhase; 76 | buildActionMask = 2147483647; 77 | files = ( 78 | ); 79 | runOnlyForDeploymentPostprocessing = 0; 80 | }; 81 | /* End PBXFrameworksBuildPhase section */ 82 | 83 | /* Begin PBXGroup section */ 84 | BEB90BE422508D2600989289 = { 85 | isa = PBXGroup; 86 | children = ( 87 | BEB90BEF22508D2600989289 /* 01-摄像头采集数据写入文件 */, 88 | BEB90C0822508D2700989289 /* 01-摄像头采集数据写入文件Tests */, 89 | BEB90C1322508D2700989289 /* 01-摄像头采集数据写入文件UITests */, 90 | BEB90BEE22508D2600989289 /* Products */, 91 | BEB90C222250AE0D00989289 /* Frameworks */, 92 | ); 93 | sourceTree = ""; 94 | }; 95 | BEB90BEE22508D2600989289 /* Products */ = { 96 | isa = PBXGroup; 97 | children = ( 98 | BEB90BED22508D2600989289 /* 01-摄像头采集数据写入文件.app */, 99 | BEB90C0522508D2700989289 /* 01-摄像头采集数据写入文件Tests.xctest */, 100 | BEB90C1022508D2700989289 /* 01-摄像头采集数据写入文件UITests.xctest */, 101 | ); 102 | name = Products; 103 | sourceTree = ""; 104 | }; 105 | BEB90BEF22508D2600989289 /* 01-摄像头采集数据写入文件 */ = { 106 | isa = PBXGroup; 107 | children = ( 108 | BEB90BF022508D2600989289 /* AppDelegate.h */, 109 | BEB90BF122508D2600989289 /* AppDelegate.m */, 110 | BEB90BF322508D2600989289 /* ViewController.h */, 111 | BEB90BF422508D2600989289 /* ViewController.m */, 112 | BEB90BF622508D2600989289 /* Main.storyboard */, 113 | BEB90BF922508D2700989289 /* Assets.xcassets */, 114 | BEB90BFB22508D2700989289 /* LaunchScreen.storyboard */, 115 | BEB90BFE22508D2700989289 /* Info.plist */, 116 | BEB90BFF22508D2700989289 /* main.m */, 117 | ); 118 | path = "01-摄像头采集数据写入文件"; 119 | sourceTree = ""; 120 | }; 121 | BEB90C0822508D2700989289 /* 01-摄像头采集数据写入文件Tests */ = { 122 | isa = PBXGroup; 123 | children = ( 124 | BEB90C0922508D2700989289 /* _1____________Tests.m */, 125 | BEB90C0B22508D2700989289 /* Info.plist */, 126 | ); 127 | path = "01-摄像头采集数据写入文件Tests"; 128 | sourceTree = ""; 129 | }; 130 | BEB90C1322508D2700989289 /* 01-摄像头采集数据写入文件UITests */ = { 131 | isa = PBXGroup; 132 | children = ( 133 | BEB90C1422508D2700989289 /* _1____________UITests.m */, 134 | BEB90C1622508D2700989289 /* Info.plist */, 135 | ); 136 | path = "01-摄像头采集数据写入文件UITests"; 137 | sourceTree = ""; 138 | }; 139 | BEB90C222250AE0D00989289 /* Frameworks */ = { 140 | isa = PBXGroup; 141 | children = ( 142 | BEB90C232250AE0D00989289 /* AVFoundation.framework */, 143 | ); 144 | name = Frameworks; 145 | sourceTree = ""; 146 | }; 147 | /* End PBXGroup section */ 148 | 149 | /* Begin PBXNativeTarget section */ 150 | BEB90BEC22508D2600989289 /* 01-摄像头采集数据写入文件 */ = { 151 | isa = PBXNativeTarget; 152 | buildConfigurationList = BEB90C1922508D2700989289 /* Build configuration list for PBXNativeTarget "01-摄像头采集数据写入文件" */; 153 | buildPhases = ( 154 | BEB90BE922508D2600989289 /* Sources */, 155 | BEB90BEA22508D2600989289 /* Frameworks */, 156 | BEB90BEB22508D2600989289 /* Resources */, 157 | ); 158 | buildRules = ( 159 | ); 160 | dependencies = ( 161 | ); 162 | name = "01-摄像头采集数据写入文件"; 163 | productName = "01-摄像头采集数据写入文件"; 164 | productReference = BEB90BED22508D2600989289 /* 01-摄像头采集数据写入文件.app */; 165 | productType = "com.apple.product-type.application"; 166 | }; 167 | BEB90C0422508D2700989289 /* 01-摄像头采集数据写入文件Tests */ = { 168 | isa = PBXNativeTarget; 169 | buildConfigurationList = BEB90C1C22508D2700989289 /* Build configuration list for PBXNativeTarget "01-摄像头采集数据写入文件Tests" */; 170 | buildPhases = ( 171 | BEB90C0122508D2700989289 /* Sources */, 172 | BEB90C0222508D2700989289 /* Frameworks */, 173 | BEB90C0322508D2700989289 /* Resources */, 174 | ); 175 | buildRules = ( 176 | ); 177 | dependencies = ( 178 | BEB90C0722508D2700989289 /* PBXTargetDependency */, 179 | ); 180 | name = "01-摄像头采集数据写入文件Tests"; 181 | productName = "01-摄像头采集数据写入文件Tests"; 182 | productReference = BEB90C0522508D2700989289 /* 01-摄像头采集数据写入文件Tests.xctest */; 183 | productType = "com.apple.product-type.bundle.unit-test"; 184 | }; 185 | BEB90C0F22508D2700989289 /* 01-摄像头采集数据写入文件UITests */ = { 186 | isa = PBXNativeTarget; 187 | buildConfigurationList = BEB90C1F22508D2700989289 /* Build configuration list for PBXNativeTarget "01-摄像头采集数据写入文件UITests" */; 188 | buildPhases = ( 189 | BEB90C0C22508D2700989289 /* Sources */, 190 | BEB90C0D22508D2700989289 /* Frameworks */, 191 | BEB90C0E22508D2700989289 /* Resources */, 192 | ); 193 | buildRules = ( 194 | ); 195 | dependencies = ( 196 | BEB90C1222508D2700989289 /* PBXTargetDependency */, 197 | ); 198 | name = "01-摄像头采集数据写入文件UITests"; 199 | productName = "01-摄像头采集数据写入文件UITests"; 200 | productReference = BEB90C1022508D2700989289 /* 01-摄像头采集数据写入文件UITests.xctest */; 201 | productType = "com.apple.product-type.bundle.ui-testing"; 202 | }; 203 | /* End PBXNativeTarget section */ 204 | 205 | /* Begin PBXProject section */ 206 | BEB90BE522508D2600989289 /* Project object */ = { 207 | isa = PBXProject; 208 | attributes = { 209 | LastUpgradeCheck = 1020; 210 | ORGANIZATIONNAME = "zhaoliang chen"; 211 | TargetAttributes = { 212 | BEB90BEC22508D2600989289 = { 213 | CreatedOnToolsVersion = 10.2; 214 | }; 215 | BEB90C0422508D2700989289 = { 216 | CreatedOnToolsVersion = 10.2; 217 | TestTargetID = BEB90BEC22508D2600989289; 218 | }; 219 | BEB90C0F22508D2700989289 = { 220 | CreatedOnToolsVersion = 10.2; 221 | TestTargetID = BEB90BEC22508D2600989289; 222 | }; 223 | }; 224 | }; 225 | buildConfigurationList = BEB90BE822508D2600989289 /* Build configuration list for PBXProject "01-摄像头采集数据写入文件" */; 226 | compatibilityVersion = "Xcode 9.3"; 227 | developmentRegion = en; 228 | hasScannedForEncodings = 0; 229 | knownRegions = ( 230 | en, 231 | Base, 232 | ); 233 | mainGroup = BEB90BE422508D2600989289; 234 | productRefGroup = BEB90BEE22508D2600989289 /* Products */; 235 | projectDirPath = ""; 236 | projectRoot = ""; 237 | targets = ( 238 | BEB90BEC22508D2600989289 /* 01-摄像头采集数据写入文件 */, 239 | BEB90C0422508D2700989289 /* 01-摄像头采集数据写入文件Tests */, 240 | BEB90C0F22508D2700989289 /* 01-摄像头采集数据写入文件UITests */, 241 | ); 242 | }; 243 | /* End PBXProject section */ 244 | 245 | /* Begin PBXResourcesBuildPhase section */ 246 | BEB90BEB22508D2600989289 /* Resources */ = { 247 | isa = PBXResourcesBuildPhase; 248 | buildActionMask = 2147483647; 249 | files = ( 250 | BEB90BFD22508D2700989289 /* LaunchScreen.storyboard in Resources */, 251 | BEB90BFA22508D2700989289 /* Assets.xcassets in Resources */, 252 | BEB90BF822508D2600989289 /* Main.storyboard in Resources */, 253 | ); 254 | runOnlyForDeploymentPostprocessing = 0; 255 | }; 256 | BEB90C0322508D2700989289 /* Resources */ = { 257 | isa = PBXResourcesBuildPhase; 258 | buildActionMask = 2147483647; 259 | files = ( 260 | ); 261 | runOnlyForDeploymentPostprocessing = 0; 262 | }; 263 | BEB90C0E22508D2700989289 /* Resources */ = { 264 | isa = PBXResourcesBuildPhase; 265 | buildActionMask = 2147483647; 266 | files = ( 267 | ); 268 | runOnlyForDeploymentPostprocessing = 0; 269 | }; 270 | /* End PBXResourcesBuildPhase section */ 271 | 272 | /* Begin PBXSourcesBuildPhase section */ 273 | BEB90BE922508D2600989289 /* Sources */ = { 274 | isa = PBXSourcesBuildPhase; 275 | buildActionMask = 2147483647; 276 | files = ( 277 | BEB90BF522508D2600989289 /* ViewController.m in Sources */, 278 | BEB90C0022508D2700989289 /* main.m in Sources */, 279 | BEB90BF222508D2600989289 /* AppDelegate.m in Sources */, 280 | ); 281 | runOnlyForDeploymentPostprocessing = 0; 282 | }; 283 | BEB90C0122508D2700989289 /* Sources */ = { 284 | isa = PBXSourcesBuildPhase; 285 | buildActionMask = 2147483647; 286 | files = ( 287 | BEB90C0A22508D2700989289 /* _1____________Tests.m in Sources */, 288 | ); 289 | runOnlyForDeploymentPostprocessing = 0; 290 | }; 291 | BEB90C0C22508D2700989289 /* Sources */ = { 292 | isa = PBXSourcesBuildPhase; 293 | buildActionMask = 2147483647; 294 | files = ( 295 | BEB90C1522508D2700989289 /* _1____________UITests.m in Sources */, 296 | ); 297 | runOnlyForDeploymentPostprocessing = 0; 298 | }; 299 | /* End PBXSourcesBuildPhase section */ 300 | 301 | /* Begin PBXTargetDependency section */ 302 | BEB90C0722508D2700989289 /* PBXTargetDependency */ = { 303 | isa = PBXTargetDependency; 304 | target = BEB90BEC22508D2600989289 /* 01-摄像头采集数据写入文件 */; 305 | targetProxy = BEB90C0622508D2700989289 /* PBXContainerItemProxy */; 306 | }; 307 | BEB90C1222508D2700989289 /* PBXTargetDependency */ = { 308 | isa = PBXTargetDependency; 309 | target = BEB90BEC22508D2600989289 /* 01-摄像头采集数据写入文件 */; 310 | targetProxy = BEB90C1122508D2700989289 /* PBXContainerItemProxy */; 311 | }; 312 | /* End PBXTargetDependency section */ 313 | 314 | /* Begin PBXVariantGroup section */ 315 | BEB90BF622508D2600989289 /* Main.storyboard */ = { 316 | isa = PBXVariantGroup; 317 | children = ( 318 | BEB90BF722508D2600989289 /* Base */, 319 | ); 320 | name = Main.storyboard; 321 | sourceTree = ""; 322 | }; 323 | BEB90BFB22508D2700989289 /* LaunchScreen.storyboard */ = { 324 | isa = PBXVariantGroup; 325 | children = ( 326 | BEB90BFC22508D2700989289 /* Base */, 327 | ); 328 | name = LaunchScreen.storyboard; 329 | sourceTree = ""; 330 | }; 331 | /* End PBXVariantGroup section */ 332 | 333 | /* Begin XCBuildConfiguration section */ 334 | BEB90C1722508D2700989289 /* Debug */ = { 335 | isa = XCBuildConfiguration; 336 | buildSettings = { 337 | ALWAYS_SEARCH_USER_PATHS = NO; 338 | CLANG_ANALYZER_NONNULL = YES; 339 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 340 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; 341 | CLANG_CXX_LIBRARY = "libc++"; 342 | CLANG_ENABLE_MODULES = YES; 343 | CLANG_ENABLE_OBJC_ARC = YES; 344 | CLANG_ENABLE_OBJC_WEAK = YES; 345 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 346 | CLANG_WARN_BOOL_CONVERSION = YES; 347 | CLANG_WARN_COMMA = YES; 348 | CLANG_WARN_CONSTANT_CONVERSION = YES; 349 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 350 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 351 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 352 | CLANG_WARN_EMPTY_BODY = YES; 353 | CLANG_WARN_ENUM_CONVERSION = YES; 354 | CLANG_WARN_INFINITE_RECURSION = YES; 355 | CLANG_WARN_INT_CONVERSION = YES; 356 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 357 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 358 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 359 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 360 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 361 | CLANG_WARN_STRICT_PROTOTYPES = YES; 362 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 363 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; 364 | CLANG_WARN_UNREACHABLE_CODE = YES; 365 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 366 | CODE_SIGN_IDENTITY = "iPhone Developer"; 367 | COPY_PHASE_STRIP = NO; 368 | DEBUG_INFORMATION_FORMAT = dwarf; 369 | ENABLE_STRICT_OBJC_MSGSEND = YES; 370 | ENABLE_TESTABILITY = YES; 371 | GCC_C_LANGUAGE_STANDARD = gnu11; 372 | GCC_DYNAMIC_NO_PIC = NO; 373 | GCC_NO_COMMON_BLOCKS = YES; 374 | GCC_OPTIMIZATION_LEVEL = 0; 375 | GCC_PREPROCESSOR_DEFINITIONS = ( 376 | "DEBUG=1", 377 | "$(inherited)", 378 | ); 379 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 380 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 381 | GCC_WARN_UNDECLARED_SELECTOR = YES; 382 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 383 | GCC_WARN_UNUSED_FUNCTION = YES; 384 | GCC_WARN_UNUSED_VARIABLE = YES; 385 | IPHONEOS_DEPLOYMENT_TARGET = 12.2; 386 | MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; 387 | MTL_FAST_MATH = YES; 388 | ONLY_ACTIVE_ARCH = YES; 389 | SDKROOT = iphoneos; 390 | }; 391 | name = Debug; 392 | }; 393 | BEB90C1822508D2700989289 /* Release */ = { 394 | isa = XCBuildConfiguration; 395 | buildSettings = { 396 | ALWAYS_SEARCH_USER_PATHS = NO; 397 | CLANG_ANALYZER_NONNULL = YES; 398 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 399 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; 400 | CLANG_CXX_LIBRARY = "libc++"; 401 | CLANG_ENABLE_MODULES = YES; 402 | CLANG_ENABLE_OBJC_ARC = YES; 403 | CLANG_ENABLE_OBJC_WEAK = YES; 404 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 405 | CLANG_WARN_BOOL_CONVERSION = YES; 406 | CLANG_WARN_COMMA = YES; 407 | CLANG_WARN_CONSTANT_CONVERSION = YES; 408 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 409 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 410 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 411 | CLANG_WARN_EMPTY_BODY = YES; 412 | CLANG_WARN_ENUM_CONVERSION = YES; 413 | CLANG_WARN_INFINITE_RECURSION = YES; 414 | CLANG_WARN_INT_CONVERSION = YES; 415 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 416 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 417 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 418 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 419 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 420 | CLANG_WARN_STRICT_PROTOTYPES = YES; 421 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 422 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; 423 | CLANG_WARN_UNREACHABLE_CODE = YES; 424 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 425 | CODE_SIGN_IDENTITY = "iPhone Developer"; 426 | COPY_PHASE_STRIP = NO; 427 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 428 | ENABLE_NS_ASSERTIONS = NO; 429 | ENABLE_STRICT_OBJC_MSGSEND = YES; 430 | GCC_C_LANGUAGE_STANDARD = gnu11; 431 | GCC_NO_COMMON_BLOCKS = YES; 432 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 433 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 434 | GCC_WARN_UNDECLARED_SELECTOR = YES; 435 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 436 | GCC_WARN_UNUSED_FUNCTION = YES; 437 | GCC_WARN_UNUSED_VARIABLE = YES; 438 | IPHONEOS_DEPLOYMENT_TARGET = 12.2; 439 | MTL_ENABLE_DEBUG_INFO = NO; 440 | MTL_FAST_MATH = YES; 441 | SDKROOT = iphoneos; 442 | VALIDATE_PRODUCT = YES; 443 | }; 444 | name = Release; 445 | }; 446 | BEB90C1A22508D2700989289 /* Debug */ = { 447 | isa = XCBuildConfiguration; 448 | buildSettings = { 449 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 450 | CODE_SIGN_STYLE = Automatic; 451 | DEVELOPMENT_TEAM = SGRM3SK667; 452 | INFOPLIST_FILE = "01-摄像头采集数据写入文件/Info.plist"; 453 | IPHONEOS_DEPLOYMENT_TARGET = 9.0; 454 | LD_RUNPATH_SEARCH_PATHS = ( 455 | "$(inherited)", 456 | "@executable_path/Frameworks", 457 | ); 458 | PRODUCT_BUNDLE_IDENTIFIER = com.github.live1.; 459 | PRODUCT_NAME = "$(TARGET_NAME)"; 460 | TARGETED_DEVICE_FAMILY = "1,2"; 461 | }; 462 | name = Debug; 463 | }; 464 | BEB90C1B22508D2700989289 /* Release */ = { 465 | isa = XCBuildConfiguration; 466 | buildSettings = { 467 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 468 | CODE_SIGN_STYLE = Automatic; 469 | DEVELOPMENT_TEAM = SGRM3SK667; 470 | INFOPLIST_FILE = "01-摄像头采集数据写入文件/Info.plist"; 471 | IPHONEOS_DEPLOYMENT_TARGET = 9.0; 472 | LD_RUNPATH_SEARCH_PATHS = ( 473 | "$(inherited)", 474 | "@executable_path/Frameworks", 475 | ); 476 | PRODUCT_BUNDLE_IDENTIFIER = com.github.live1.; 477 | PRODUCT_NAME = "$(TARGET_NAME)"; 478 | TARGETED_DEVICE_FAMILY = "1,2"; 479 | }; 480 | name = Release; 481 | }; 482 | BEB90C1D22508D2700989289 /* Debug */ = { 483 | isa = XCBuildConfiguration; 484 | buildSettings = { 485 | BUNDLE_LOADER = "$(TEST_HOST)"; 486 | CODE_SIGN_STYLE = Automatic; 487 | INFOPLIST_FILE = "01-摄像头采集数据写入文件Tests/Info.plist"; 488 | LD_RUNPATH_SEARCH_PATHS = ( 489 | "$(inherited)", 490 | "@executable_path/Frameworks", 491 | "@loader_path/Frameworks", 492 | ); 493 | PRODUCT_BUNDLE_IDENTIFIER = "com.github.live1.-1------------Tests"; 494 | PRODUCT_NAME = "$(TARGET_NAME)"; 495 | TARGETED_DEVICE_FAMILY = "1,2"; 496 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/01-摄像头采集数据写入文件.app/01-摄像头采集数据写入文件"; 497 | }; 498 | name = Debug; 499 | }; 500 | BEB90C1E22508D2700989289 /* Release */ = { 501 | isa = XCBuildConfiguration; 502 | buildSettings = { 503 | BUNDLE_LOADER = "$(TEST_HOST)"; 504 | CODE_SIGN_STYLE = Automatic; 505 | INFOPLIST_FILE = "01-摄像头采集数据写入文件Tests/Info.plist"; 506 | LD_RUNPATH_SEARCH_PATHS = ( 507 | "$(inherited)", 508 | "@executable_path/Frameworks", 509 | "@loader_path/Frameworks", 510 | ); 511 | PRODUCT_BUNDLE_IDENTIFIER = "com.github.live1.-1------------Tests"; 512 | PRODUCT_NAME = "$(TARGET_NAME)"; 513 | TARGETED_DEVICE_FAMILY = "1,2"; 514 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/01-摄像头采集数据写入文件.app/01-摄像头采集数据写入文件"; 515 | }; 516 | name = Release; 517 | }; 518 | BEB90C2022508D2700989289 /* Debug */ = { 519 | isa = XCBuildConfiguration; 520 | buildSettings = { 521 | CODE_SIGN_STYLE = Automatic; 522 | INFOPLIST_FILE = "01-摄像头采集数据写入文件UITests/Info.plist"; 523 | LD_RUNPATH_SEARCH_PATHS = ( 524 | "$(inherited)", 525 | "@executable_path/Frameworks", 526 | "@loader_path/Frameworks", 527 | ); 528 | PRODUCT_BUNDLE_IDENTIFIER = "com.github.live1.-1------------UITests"; 529 | PRODUCT_NAME = "$(TARGET_NAME)"; 530 | TARGETED_DEVICE_FAMILY = "1,2"; 531 | TEST_TARGET_NAME = "01-摄像头采集数据写入文件"; 532 | }; 533 | name = Debug; 534 | }; 535 | BEB90C2122508D2700989289 /* Release */ = { 536 | isa = XCBuildConfiguration; 537 | buildSettings = { 538 | CODE_SIGN_STYLE = Automatic; 539 | INFOPLIST_FILE = "01-摄像头采集数据写入文件UITests/Info.plist"; 540 | LD_RUNPATH_SEARCH_PATHS = ( 541 | "$(inherited)", 542 | "@executable_path/Frameworks", 543 | "@loader_path/Frameworks", 544 | ); 545 | PRODUCT_BUNDLE_IDENTIFIER = "com.github.live1.-1------------UITests"; 546 | PRODUCT_NAME = "$(TARGET_NAME)"; 547 | TARGETED_DEVICE_FAMILY = "1,2"; 548 | TEST_TARGET_NAME = "01-摄像头采集数据写入文件"; 549 | }; 550 | name = Release; 551 | }; 552 | /* End XCBuildConfiguration section */ 553 | 554 | /* Begin XCConfigurationList section */ 555 | BEB90BE822508D2600989289 /* Build configuration list for PBXProject "01-摄像头采集数据写入文件" */ = { 556 | isa = XCConfigurationList; 557 | buildConfigurations = ( 558 | BEB90C1722508D2700989289 /* Debug */, 559 | BEB90C1822508D2700989289 /* Release */, 560 | ); 561 | defaultConfigurationIsVisible = 0; 562 | defaultConfigurationName = Release; 563 | }; 564 | BEB90C1922508D2700989289 /* Build configuration list for PBXNativeTarget "01-摄像头采集数据写入文件" */ = { 565 | isa = XCConfigurationList; 566 | buildConfigurations = ( 567 | BEB90C1A22508D2700989289 /* Debug */, 568 | BEB90C1B22508D2700989289 /* Release */, 569 | ); 570 | defaultConfigurationIsVisible = 0; 571 | defaultConfigurationName = Release; 572 | }; 573 | BEB90C1C22508D2700989289 /* Build configuration list for PBXNativeTarget "01-摄像头采集数据写入文件Tests" */ = { 574 | isa = XCConfigurationList; 575 | buildConfigurations = ( 576 | BEB90C1D22508D2700989289 /* Debug */, 577 | BEB90C1E22508D2700989289 /* Release */, 578 | ); 579 | defaultConfigurationIsVisible = 0; 580 | defaultConfigurationName = Release; 581 | }; 582 | BEB90C1F22508D2700989289 /* Build configuration list for PBXNativeTarget "01-摄像头采集数据写入文件UITests" */ = { 583 | isa = XCConfigurationList; 584 | buildConfigurations = ( 585 | BEB90C2022508D2700989289 /* Debug */, 586 | BEB90C2122508D2700989289 /* Release */, 587 | ); 588 | defaultConfigurationIsVisible = 0; 589 | defaultConfigurationName = Release; 590 | }; 591 | /* End XCConfigurationList section */ 592 | }; 593 | rootObject = BEB90BE522508D2600989289 /* Project object */; 594 | } 595 | -------------------------------------------------------------------------------- /01-摄像头采集数据写入文件/01-摄像头采集数据写入文件.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /01-摄像头采集数据写入文件/01-摄像头采集数据写入文件.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /01-摄像头采集数据写入文件/01-摄像头采集数据写入文件/AppDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.h 3 | // 01-摄像头采集数据写入文件 4 | // 5 | // Created by zhaoliang chen on 2019/3/31. 6 | // Copyright © 2019 zhaoliang chen. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface AppDelegate : UIResponder 12 | 13 | @property (strong, nonatomic) UIWindow *window; 14 | 15 | 16 | @end 17 | 18 | -------------------------------------------------------------------------------- /01-摄像头采集数据写入文件/01-摄像头采集数据写入文件/AppDelegate.m: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.m 3 | // 01-摄像头采集数据写入文件 4 | // 5 | // Created by zhaoliang chen on 2019/3/31. 6 | // Copyright © 2019 zhaoliang chen. All rights reserved. 7 | // 8 | 9 | #import "AppDelegate.h" 10 | 11 | @interface AppDelegate () 12 | 13 | @end 14 | 15 | @implementation AppDelegate 16 | 17 | 18 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { 19 | // Override point for customization after application launch. 20 | return YES; 21 | } 22 | 23 | 24 | - (void)applicationWillResignActive:(UIApplication *)application { 25 | // 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. 26 | // Use this method to pause ongoing tasks, disable timers, and invalidate graphics rendering callbacks. Games should use this method to pause the game. 27 | } 28 | 29 | 30 | - (void)applicationDidEnterBackground:(UIApplication *)application { 31 | // 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. 32 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. 33 | } 34 | 35 | 36 | - (void)applicationWillEnterForeground:(UIApplication *)application { 37 | // 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. 38 | } 39 | 40 | 41 | - (void)applicationDidBecomeActive:(UIApplication *)application { 42 | // 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. 43 | } 44 | 45 | 46 | - (void)applicationWillTerminate:(UIApplication *)application { 47 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. 48 | } 49 | 50 | 51 | @end 52 | -------------------------------------------------------------------------------- /01-摄像头采集数据写入文件/01-摄像头采集数据写入文件/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "size" : "20x20", 6 | "scale" : "2x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "size" : "20x20", 11 | "scale" : "3x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "size" : "29x29", 16 | "scale" : "2x" 17 | }, 18 | { 19 | "idiom" : "iphone", 20 | "size" : "29x29", 21 | "scale" : "3x" 22 | }, 23 | { 24 | "idiom" : "iphone", 25 | "size" : "40x40", 26 | "scale" : "2x" 27 | }, 28 | { 29 | "idiom" : "iphone", 30 | "size" : "40x40", 31 | "scale" : "3x" 32 | }, 33 | { 34 | "idiom" : "iphone", 35 | "size" : "60x60", 36 | "scale" : "2x" 37 | }, 38 | { 39 | "idiom" : "iphone", 40 | "size" : "60x60", 41 | "scale" : "3x" 42 | }, 43 | { 44 | "idiom" : "ipad", 45 | "size" : "20x20", 46 | "scale" : "1x" 47 | }, 48 | { 49 | "idiom" : "ipad", 50 | "size" : "20x20", 51 | "scale" : "2x" 52 | }, 53 | { 54 | "idiom" : "ipad", 55 | "size" : "29x29", 56 | "scale" : "1x" 57 | }, 58 | { 59 | "idiom" : "ipad", 60 | "size" : "29x29", 61 | "scale" : "2x" 62 | }, 63 | { 64 | "idiom" : "ipad", 65 | "size" : "40x40", 66 | "scale" : "1x" 67 | }, 68 | { 69 | "idiom" : "ipad", 70 | "size" : "40x40", 71 | "scale" : "2x" 72 | }, 73 | { 74 | "idiom" : "ipad", 75 | "size" : "76x76", 76 | "scale" : "1x" 77 | }, 78 | { 79 | "idiom" : "ipad", 80 | "size" : "76x76", 81 | "scale" : "2x" 82 | }, 83 | { 84 | "idiom" : "ipad", 85 | "size" : "83.5x83.5", 86 | "scale" : "2x" 87 | }, 88 | { 89 | "idiom" : "ios-marketing", 90 | "size" : "1024x1024", 91 | "scale" : "1x" 92 | } 93 | ], 94 | "info" : { 95 | "version" : 1, 96 | "author" : "xcode" 97 | } 98 | } -------------------------------------------------------------------------------- /01-摄像头采集数据写入文件/01-摄像头采集数据写入文件/Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } -------------------------------------------------------------------------------- /01-摄像头采集数据写入文件/01-摄像头采集数据写入文件/Base.lproj/LaunchScreen.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /01-摄像头采集数据写入文件/01-摄像头采集数据写入文件/Base.lproj/Main.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 32 | 43 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | -------------------------------------------------------------------------------- /01-摄像头采集数据写入文件/01-摄像头采集数据写入文件/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | APPL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleVersion 20 | 1 21 | LSRequiresIPhoneOS 22 | 23 | NSCameraUsageDescription 24 | 获取相机采集画面 25 | NSMicrophoneUsageDescription 26 | 获取麦克风采集声音 27 | NSPhotoLibraryUsageDescription 28 | 获取相册 29 | UILaunchStoryboardName 30 | LaunchScreen 31 | UIMainStoryboardFile 32 | Main 33 | UIRequiredDeviceCapabilities 34 | 35 | armv7 36 | 37 | UISupportedInterfaceOrientations 38 | 39 | UIInterfaceOrientationPortrait 40 | 41 | UISupportedInterfaceOrientations~ipad 42 | 43 | UIInterfaceOrientationPortrait 44 | UIInterfaceOrientationPortraitUpsideDown 45 | UIInterfaceOrientationLandscapeLeft 46 | UIInterfaceOrientationLandscapeRight 47 | 48 | 49 | 50 | -------------------------------------------------------------------------------- /01-摄像头采集数据写入文件/01-摄像头采集数据写入文件/ViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.h 3 | // 01-摄像头采集数据写入文件 4 | // 5 | // Created by zhaoliang chen on 2019/3/31. 6 | // Copyright © 2019 zhaoliang chen. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface ViewController : UIViewController 12 | 13 | 14 | @end 15 | 16 | -------------------------------------------------------------------------------- /01-摄像头采集数据写入文件/01-摄像头采集数据写入文件/ViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.m 3 | // 01-摄像头采集数据写入文件 4 | // 5 | // Created by zhaoliang chen on 2019/3/31. 6 | // Copyright © 2019 zhaoliang chen. All rights reserved. 7 | // 8 | 9 | #import "ViewController.h" 10 | #import 11 | 12 | @interface ViewController () 13 | 14 | 15 | //捕捉画面的session 16 | @property(nonatomic,strong)AVCaptureSession* session; 17 | //视频文件输出的uoutput 18 | @property(nonatomic,strong)AVCaptureVideoDataOutput* videoOutput; 19 | //展示预览图层的layer 20 | @property(nonatomic,strong)AVCaptureVideoPreviewLayer* previewLayer; 21 | //视频文件输入的intput 22 | @property(nonatomic,strong)AVCaptureDeviceInput* videoInput; 23 | //视频文件输出的output 24 | @property(nonatomic,strong)AVCaptureMovieFileOutput* movieOutput; 25 | 26 | @end 27 | 28 | @implementation ViewController 29 | 30 | - (void)viewDidLoad { 31 | [super viewDidLoad]; 32 | // Do any additional setup after loading the view. 33 | 34 | [self setupVideoIntputOutput]; 35 | 36 | [self setupAudioIntputOutput]; 37 | } 38 | //初始化视频输入输出 39 | - (void)setupVideoIntputOutput { 40 | NSArray* devices = [AVCaptureDevice devicesWithMediaType:AVMediaTypeVideo]; 41 | if (devices.count < 1) { 42 | return; 43 | } 44 | __block AVCaptureDevice* device = nil; 45 | [devices enumerateObjectsUsingBlock:^(AVCaptureDevice * _Nonnull obj, NSUInteger idx, BOOL * _Nonnull stop) { 46 | if (obj.position == AVCaptureDevicePositionFront) { 47 | device = obj; 48 | *stop = YES; 49 | } 50 | }]; 51 | if (device == nil) { 52 | return; 53 | } 54 | AVCaptureDeviceInput* input = [[AVCaptureDeviceInput alloc]initWithDevice:device error:nil]; 55 | if (input == nil) { 56 | return; 57 | } 58 | self.videoInput = input; 59 | 60 | AVCaptureVideoDataOutput* output = [[AVCaptureVideoDataOutput alloc]init]; 61 | [output setAlwaysDiscardsLateVideoFrames:YES]; 62 | dispatch_queue_t queue = dispatch_queue_create("captureVideo", NULL); 63 | [output setSampleBufferDelegate:self queue:queue]; 64 | self.videoOutput = output; 65 | 66 | [self.session beginConfiguration]; 67 | if ([self.session canAddInput:input]) { 68 | [self.session addInput:input]; 69 | } 70 | if ([self.session canAddOutput:output]) { 71 | [self.session addOutput:output]; 72 | } 73 | [self.session commitConfiguration]; 74 | } 75 | 76 | //初始化音频输入输出流 77 | - (void)setupAudioIntputOutput { 78 | AVCaptureDevice* device = [AVCaptureDevice defaultDeviceWithMediaType:AVMediaTypeAudio]; 79 | if (device == nil) { 80 | return; 81 | } 82 | AVCaptureDeviceInput* intput = [[AVCaptureDeviceInput alloc]initWithDevice:device error:nil]; 83 | if (intput == nil) { 84 | return; 85 | } 86 | AVCaptureAudioDataOutput* output = [[AVCaptureAudioDataOutput alloc]init]; 87 | dispatch_queue_t queue = dispatch_queue_create("captureAudio", NULL); 88 | [output setSampleBufferDelegate:self queue:queue]; 89 | 90 | [self.session beginConfiguration]; 91 | if ([self.session canAddInput:intput]) { 92 | [self.session addInput:intput]; 93 | } 94 | if ([self.session canAddOutput:output]) { 95 | [self.session addOutput:output]; 96 | } 97 | [self.session commitConfiguration]; 98 | } 99 | 100 | //初始化预览图层 101 | - (void)setupPreviewLayer { 102 | AVCaptureVideoPreviewLayer* layer = [[AVCaptureVideoPreviewLayer alloc]initWithSession:self.session]; 103 | if (layer == nil) { 104 | return; 105 | } 106 | layer.frame = self.view.bounds; 107 | [self.view.layer insertSublayer:layer atIndex:0]; 108 | self.previewLayer = layer; 109 | } 110 | 111 | //创建视频文件写入的movieOutput 112 | - (void)setupMovieFileOutput { 113 | if (self.movieOutput) { 114 | [self.session removeOutput:self.movieOutput]; 115 | } 116 | 117 | AVCaptureMovieFileOutput* movieOutput = [[AVCaptureMovieFileOutput alloc]init]; 118 | self.movieOutput = movieOutput ; 119 | 120 | AVCaptureConnection *connect = [movieOutput connectionWithMediaType:AVMediaTypeVideo]; 121 | connect.automaticallyAdjustsVideoMirroring = YES; 122 | connect.videoOrientation = AVCaptureVideoOrientationPortrait; 123 | 124 | if ([self.session canAddOutput:movieOutput]) { 125 | [self.session addOutput:movieOutput]; 126 | 127 | //视频文件的写入 128 | NSString *filePath = [[NSSearchPathForDirectoriesInDomains(NSDocumentDirectory,NSUserDomainMask,YES)lastObject] stringByAppendingPathComponent:@"test.mp4"]; 129 | 130 | [movieOutput startRecordingToOutputFileURL:[NSURL fileURLWithPath:filePath] recordingDelegate:self]; 131 | } 132 | } 133 | 134 | - (void)captureOutput:(AVCaptureOutput *)output didOutputSampleBuffer:(CMSampleBufferRef)sampleBuffer fromConnection:(AVCaptureConnection *)connection { 135 | if (connection == [self.videoOutput connectionWithMediaType:AVMediaTypeVideo]) { 136 | //NSLog(@"采集到视频"); 137 | } else { 138 | //NSLog(@"采集到音频"); 139 | } 140 | } 141 | 142 | - (void)captureOutput:(AVCaptureFileOutput *)output didStartRecordingToOutputFileAtURL:(NSURL *)fileURL fromConnections:(NSArray *)connections { 143 | NSLog(@"开始写入视频文件"); 144 | } 145 | 146 | - (void)captureOutput:(AVCaptureFileOutput *)output didFinishRecordingToOutputFileAtURL:(NSURL *)outputFileURL fromConnections:(NSArray *)connections error:(nullable NSError *)error { 147 | NSLog(@"结束写入视频文件"); 148 | } 149 | 150 | 151 | - (IBAction)startCapture:(id)sender { 152 | if (self.session.isRunning) { 153 | return; 154 | } 155 | [self.session startRunning]; 156 | 157 | [self setupPreviewLayer]; 158 | 159 | [self setupMovieFileOutput]; 160 | } 161 | 162 | - (IBAction)stopCapture:(id)sender { 163 | [self.session stopRunning]; 164 | 165 | [self.previewLayer removeFromSuperlayer]; 166 | 167 | [self.movieOutput stopRecording]; 168 | } 169 | 170 | - (IBAction)switchCamera:(id)sender { 171 | if (self.videoInput != nil) { 172 | //先获取原来的摄像头反向,转换摄像头 173 | AVCaptureDevicePosition position = self.videoInput.device.position == AVCaptureDevicePositionBack ? AVCaptureDevicePositionFront : AVCaptureDevicePositionBack; 174 | 175 | //重新设置一个新的输入源 176 | NSArray* devices = [AVCaptureDevice devicesWithMediaType:AVMediaTypeVideo]; 177 | if (devices.count < 1) { 178 | return; 179 | } 180 | __block AVCaptureDevice* device = nil; 181 | [devices enumerateObjectsUsingBlock:^(AVCaptureDevice * _Nonnull obj, NSUInteger idx, BOOL * _Nonnull stop) { 182 | if (obj.position == position) { 183 | device = obj; 184 | *stop = YES; 185 | } 186 | }]; 187 | if (device == nil) { 188 | return; 189 | } 190 | AVCaptureDeviceInput* newInput = [[AVCaptureDeviceInput alloc]initWithDevice:device error:nil]; 191 | if (newInput == nil) { 192 | return; 193 | } 194 | 195 | //移除旧的输入源,添加新的输入源 196 | [self.session beginConfiguration]; 197 | [self.session removeInput:self.videoInput]; 198 | if ([self.session canAddInput:newInput]) { 199 | [self.session addInput:newInput]; 200 | } 201 | [self.session commitConfiguration]; 202 | self.videoInput = newInput; 203 | } 204 | } 205 | 206 | - (AVCaptureSession*)session { 207 | if (!_session) { 208 | _session = [[AVCaptureSession alloc]init]; 209 | } 210 | return _session; 211 | } 212 | 213 | @end 214 | -------------------------------------------------------------------------------- /01-摄像头采集数据写入文件/01-摄像头采集数据写入文件/main.m: -------------------------------------------------------------------------------- 1 | // 2 | // main.m 3 | // 01-摄像头采集数据写入文件 4 | // 5 | // Created by zhaoliang chen on 2019/3/31. 6 | // Copyright © 2019 zhaoliang chen. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "AppDelegate.h" 11 | 12 | int main(int argc, char * argv[]) { 13 | @autoreleasepool { 14 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /01-摄像头采集数据写入文件/01-摄像头采集数据写入文件Tests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | BNDL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleVersion 20 | 1 21 | 22 | 23 | -------------------------------------------------------------------------------- /01-摄像头采集数据写入文件/01-摄像头采集数据写入文件Tests/_1____________Tests.m: -------------------------------------------------------------------------------- 1 | // 2 | // _1____________Tests.m 3 | // 01-摄像头采集数据写入文件Tests 4 | // 5 | // Created by zhaoliang chen on 2019/3/31. 6 | // Copyright © 2019 zhaoliang chen. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface _1____________Tests : XCTestCase 12 | 13 | @end 14 | 15 | @implementation _1____________Tests 16 | 17 | - (void)setUp { 18 | // Put setup code here. This method is called before the invocation of each test method in the class. 19 | } 20 | 21 | - (void)tearDown { 22 | // Put teardown code here. This method is called after the invocation of each test method in the class. 23 | } 24 | 25 | - (void)testExample { 26 | // This is an example of a functional test case. 27 | // Use XCTAssert and related functions to verify your tests produce the correct results. 28 | } 29 | 30 | - (void)testPerformanceExample { 31 | // This is an example of a performance test case. 32 | [self measureBlock:^{ 33 | // Put the code you want to measure the time of here. 34 | }]; 35 | } 36 | 37 | @end 38 | -------------------------------------------------------------------------------- /01-摄像头采集数据写入文件/01-摄像头采集数据写入文件UITests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | BNDL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleVersion 20 | 1 21 | 22 | 23 | -------------------------------------------------------------------------------- /01-摄像头采集数据写入文件/01-摄像头采集数据写入文件UITests/_1____________UITests.m: -------------------------------------------------------------------------------- 1 | // 2 | // _1____________UITests.m 3 | // 01-摄像头采集数据写入文件UITests 4 | // 5 | // Created by zhaoliang chen on 2019/3/31. 6 | // Copyright © 2019 zhaoliang chen. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface _1____________UITests : XCTestCase 12 | 13 | @end 14 | 15 | @implementation _1____________UITests 16 | 17 | - (void)setUp { 18 | // Put setup code here. This method is called before the invocation of each test method in the class. 19 | 20 | // In UI tests it is usually best to stop immediately when a failure occurs. 21 | self.continueAfterFailure = NO; 22 | 23 | // UI tests must launch the application that they test. Doing this in setup will make sure it happens for each test method. 24 | [[[XCUIApplication alloc] init] launch]; 25 | 26 | // In UI tests it’s important to set the initial state - such as interface orientation - required for your tests before they run. The setUp method is a good place to do this. 27 | } 28 | 29 | - (void)tearDown { 30 | // Put teardown code here. This method is called after the invocation of each test method in the class. 31 | } 32 | 33 | - (void)testExample { 34 | // Use recording to get started writing UI tests. 35 | // Use XCTAssert and related functions to verify your tests produce the correct results. 36 | } 37 | 38 | @end 39 | -------------------------------------------------------------------------------- /02-GPUImage简单使用/GPUImageTest.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 50; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 6199EFF31A206629CFDEF9BA /* Pods_GPUImageTestTests.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1139E6FD1853257266196003 /* Pods_GPUImageTestTests.framework */; }; 11 | 82A3D6754A2717C3C7FDB50A /* Pods_GPUImageTestUITests.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 63FCD114D8753EFDAED1324D /* Pods_GPUImageTestUITests.framework */; }; 12 | BE592C82226D53F700D0D73E /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = BE592C81226D53F700D0D73E /* AppDelegate.m */; }; 13 | BE592C85226D53F700D0D73E /* ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = BE592C84226D53F700D0D73E /* ViewController.m */; }; 14 | BE592C88226D53F700D0D73E /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = BE592C86226D53F700D0D73E /* Main.storyboard */; }; 15 | BE592C8A226D53F800D0D73E /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = BE592C89226D53F800D0D73E /* Assets.xcassets */; }; 16 | BE592C8D226D53F800D0D73E /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = BE592C8B226D53F800D0D73E /* LaunchScreen.storyboard */; }; 17 | BE592C90226D53F800D0D73E /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = BE592C8F226D53F800D0D73E /* main.m */; }; 18 | BE592C9A226D53F800D0D73E /* GPUImageTestTests.m in Sources */ = {isa = PBXBuildFile; fileRef = BE592C99226D53F800D0D73E /* GPUImageTestTests.m */; }; 19 | BE592CA5226D53F800D0D73E /* GPUImageTestUITests.m in Sources */ = {isa = PBXBuildFile; fileRef = BE592CA4226D53F800D0D73E /* GPUImageTestUITests.m */; }; 20 | EB58E66AFA436A2245DB22F3 /* Pods_GPUImageTest.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 24AE5D3BE7A13C8A646B6155 /* Pods_GPUImageTest.framework */; }; 21 | /* End PBXBuildFile section */ 22 | 23 | /* Begin PBXContainerItemProxy section */ 24 | BE592C96226D53F800D0D73E /* PBXContainerItemProxy */ = { 25 | isa = PBXContainerItemProxy; 26 | containerPortal = BE592C75226D53F700D0D73E /* Project object */; 27 | proxyType = 1; 28 | remoteGlobalIDString = BE592C7C226D53F700D0D73E; 29 | remoteInfo = GPUImageTest; 30 | }; 31 | BE592CA1226D53F800D0D73E /* PBXContainerItemProxy */ = { 32 | isa = PBXContainerItemProxy; 33 | containerPortal = BE592C75226D53F700D0D73E /* Project object */; 34 | proxyType = 1; 35 | remoteGlobalIDString = BE592C7C226D53F700D0D73E; 36 | remoteInfo = GPUImageTest; 37 | }; 38 | /* End PBXContainerItemProxy section */ 39 | 40 | /* Begin PBXFileReference section */ 41 | 1139E6FD1853257266196003 /* Pods_GPUImageTestTests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_GPUImageTestTests.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 42 | 24AE5D3BE7A13C8A646B6155 /* Pods_GPUImageTest.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_GPUImageTest.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 43 | 63FCD114D8753EFDAED1324D /* Pods_GPUImageTestUITests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_GPUImageTestUITests.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 44 | 7AB8B66A4DE0F8DA86142BFE /* Pods-GPUImageTestUITests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-GPUImageTestUITests.release.xcconfig"; path = "Target Support Files/Pods-GPUImageTestUITests/Pods-GPUImageTestUITests.release.xcconfig"; sourceTree = ""; }; 45 | 91AE3EBBB94CBE6D68069711 /* Pods-GPUImageTestUITests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-GPUImageTestUITests.debug.xcconfig"; path = "Target Support Files/Pods-GPUImageTestUITests/Pods-GPUImageTestUITests.debug.xcconfig"; sourceTree = ""; }; 46 | 95E779F3EFA3A58A444925F6 /* Pods-GPUImageTestTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-GPUImageTestTests.debug.xcconfig"; path = "Target Support Files/Pods-GPUImageTestTests/Pods-GPUImageTestTests.debug.xcconfig"; sourceTree = ""; }; 47 | 9769EA706F2EB8DBFFF8BEDB /* Pods-GPUImageTest.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-GPUImageTest.release.xcconfig"; path = "Target Support Files/Pods-GPUImageTest/Pods-GPUImageTest.release.xcconfig"; sourceTree = ""; }; 48 | A214A11EE6AFC7FE8380A647 /* Pods-GPUImageTestTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-GPUImageTestTests.release.xcconfig"; path = "Target Support Files/Pods-GPUImageTestTests/Pods-GPUImageTestTests.release.xcconfig"; sourceTree = ""; }; 49 | BE592C7D226D53F700D0D73E /* GPUImageTest.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = GPUImageTest.app; sourceTree = BUILT_PRODUCTS_DIR; }; 50 | BE592C80226D53F700D0D73E /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; }; 51 | BE592C81226D53F700D0D73E /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; }; 52 | BE592C83226D53F700D0D73E /* ViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ViewController.h; sourceTree = ""; }; 53 | BE592C84226D53F700D0D73E /* ViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ViewController.m; sourceTree = ""; }; 54 | BE592C87226D53F700D0D73E /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; 55 | BE592C89226D53F800D0D73E /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 56 | BE592C8C226D53F800D0D73E /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; 57 | BE592C8E226D53F800D0D73E /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 58 | BE592C8F226D53F800D0D73E /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; 59 | BE592C95226D53F800D0D73E /* GPUImageTestTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = GPUImageTestTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 60 | BE592C99226D53F800D0D73E /* GPUImageTestTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = GPUImageTestTests.m; sourceTree = ""; }; 61 | BE592C9B226D53F800D0D73E /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 62 | BE592CA0226D53F800D0D73E /* GPUImageTestUITests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = GPUImageTestUITests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 63 | BE592CA4226D53F800D0D73E /* GPUImageTestUITests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = GPUImageTestUITests.m; sourceTree = ""; }; 64 | BE592CA6226D53F800D0D73E /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 65 | DEAB107B336A63CBDE3ECE61 /* Pods-GPUImageTest.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-GPUImageTest.debug.xcconfig"; path = "Target Support Files/Pods-GPUImageTest/Pods-GPUImageTest.debug.xcconfig"; sourceTree = ""; }; 66 | /* End PBXFileReference section */ 67 | 68 | /* Begin PBXFrameworksBuildPhase section */ 69 | BE592C7A226D53F700D0D73E /* Frameworks */ = { 70 | isa = PBXFrameworksBuildPhase; 71 | buildActionMask = 2147483647; 72 | files = ( 73 | EB58E66AFA436A2245DB22F3 /* Pods_GPUImageTest.framework in Frameworks */, 74 | ); 75 | runOnlyForDeploymentPostprocessing = 0; 76 | }; 77 | BE592C92226D53F800D0D73E /* Frameworks */ = { 78 | isa = PBXFrameworksBuildPhase; 79 | buildActionMask = 2147483647; 80 | files = ( 81 | 6199EFF31A206629CFDEF9BA /* Pods_GPUImageTestTests.framework in Frameworks */, 82 | ); 83 | runOnlyForDeploymentPostprocessing = 0; 84 | }; 85 | BE592C9D226D53F800D0D73E /* Frameworks */ = { 86 | isa = PBXFrameworksBuildPhase; 87 | buildActionMask = 2147483647; 88 | files = ( 89 | 82A3D6754A2717C3C7FDB50A /* Pods_GPUImageTestUITests.framework in Frameworks */, 90 | ); 91 | runOnlyForDeploymentPostprocessing = 0; 92 | }; 93 | /* End PBXFrameworksBuildPhase section */ 94 | 95 | /* Begin PBXGroup section */ 96 | 031520B40436DC4F9DED6475 /* Frameworks */ = { 97 | isa = PBXGroup; 98 | children = ( 99 | 24AE5D3BE7A13C8A646B6155 /* Pods_GPUImageTest.framework */, 100 | 1139E6FD1853257266196003 /* Pods_GPUImageTestTests.framework */, 101 | 63FCD114D8753EFDAED1324D /* Pods_GPUImageTestUITests.framework */, 102 | ); 103 | name = Frameworks; 104 | sourceTree = ""; 105 | }; 106 | BE592C74226D53F700D0D73E = { 107 | isa = PBXGroup; 108 | children = ( 109 | BE592C7F226D53F700D0D73E /* GPUImageTest */, 110 | BE592C98226D53F800D0D73E /* GPUImageTestTests */, 111 | BE592CA3226D53F800D0D73E /* GPUImageTestUITests */, 112 | BE592C7E226D53F700D0D73E /* Products */, 113 | EBA0978839319EF5F56744E0 /* Pods */, 114 | 031520B40436DC4F9DED6475 /* Frameworks */, 115 | ); 116 | sourceTree = ""; 117 | }; 118 | BE592C7E226D53F700D0D73E /* Products */ = { 119 | isa = PBXGroup; 120 | children = ( 121 | BE592C7D226D53F700D0D73E /* GPUImageTest.app */, 122 | BE592C95226D53F800D0D73E /* GPUImageTestTests.xctest */, 123 | BE592CA0226D53F800D0D73E /* GPUImageTestUITests.xctest */, 124 | ); 125 | name = Products; 126 | sourceTree = ""; 127 | }; 128 | BE592C7F226D53F700D0D73E /* GPUImageTest */ = { 129 | isa = PBXGroup; 130 | children = ( 131 | BE592C80226D53F700D0D73E /* AppDelegate.h */, 132 | BE592C81226D53F700D0D73E /* AppDelegate.m */, 133 | BE592C83226D53F700D0D73E /* ViewController.h */, 134 | BE592C84226D53F700D0D73E /* ViewController.m */, 135 | BE592C86226D53F700D0D73E /* Main.storyboard */, 136 | BE592C89226D53F800D0D73E /* Assets.xcassets */, 137 | BE592C8B226D53F800D0D73E /* LaunchScreen.storyboard */, 138 | BE592C8E226D53F800D0D73E /* Info.plist */, 139 | BE592C8F226D53F800D0D73E /* main.m */, 140 | ); 141 | path = GPUImageTest; 142 | sourceTree = ""; 143 | }; 144 | BE592C98226D53F800D0D73E /* GPUImageTestTests */ = { 145 | isa = PBXGroup; 146 | children = ( 147 | BE592C99226D53F800D0D73E /* GPUImageTestTests.m */, 148 | BE592C9B226D53F800D0D73E /* Info.plist */, 149 | ); 150 | path = GPUImageTestTests; 151 | sourceTree = ""; 152 | }; 153 | BE592CA3226D53F800D0D73E /* GPUImageTestUITests */ = { 154 | isa = PBXGroup; 155 | children = ( 156 | BE592CA4226D53F800D0D73E /* GPUImageTestUITests.m */, 157 | BE592CA6226D53F800D0D73E /* Info.plist */, 158 | ); 159 | path = GPUImageTestUITests; 160 | sourceTree = ""; 161 | }; 162 | EBA0978839319EF5F56744E0 /* Pods */ = { 163 | isa = PBXGroup; 164 | children = ( 165 | DEAB107B336A63CBDE3ECE61 /* Pods-GPUImageTest.debug.xcconfig */, 166 | 9769EA706F2EB8DBFFF8BEDB /* Pods-GPUImageTest.release.xcconfig */, 167 | 95E779F3EFA3A58A444925F6 /* Pods-GPUImageTestTests.debug.xcconfig */, 168 | A214A11EE6AFC7FE8380A647 /* Pods-GPUImageTestTests.release.xcconfig */, 169 | 91AE3EBBB94CBE6D68069711 /* Pods-GPUImageTestUITests.debug.xcconfig */, 170 | 7AB8B66A4DE0F8DA86142BFE /* Pods-GPUImageTestUITests.release.xcconfig */, 171 | ); 172 | name = Pods; 173 | path = Pods; 174 | sourceTree = ""; 175 | }; 176 | /* End PBXGroup section */ 177 | 178 | /* Begin PBXNativeTarget section */ 179 | BE592C7C226D53F700D0D73E /* GPUImageTest */ = { 180 | isa = PBXNativeTarget; 181 | buildConfigurationList = BE592CA9226D53F800D0D73E /* Build configuration list for PBXNativeTarget "GPUImageTest" */; 182 | buildPhases = ( 183 | 48EC1DB84B13F45CDBFD15B6 /* [CP] Check Pods Manifest.lock */, 184 | BE592C79226D53F700D0D73E /* Sources */, 185 | BE592C7A226D53F700D0D73E /* Frameworks */, 186 | BE592C7B226D53F700D0D73E /* Resources */, 187 | C94E3DEBF36DF0C7758C423F /* [CP] Embed Pods Frameworks */, 188 | ); 189 | buildRules = ( 190 | ); 191 | dependencies = ( 192 | ); 193 | name = GPUImageTest; 194 | productName = GPUImageTest; 195 | productReference = BE592C7D226D53F700D0D73E /* GPUImageTest.app */; 196 | productType = "com.apple.product-type.application"; 197 | }; 198 | BE592C94226D53F800D0D73E /* GPUImageTestTests */ = { 199 | isa = PBXNativeTarget; 200 | buildConfigurationList = BE592CAC226D53F800D0D73E /* Build configuration list for PBXNativeTarget "GPUImageTestTests" */; 201 | buildPhases = ( 202 | 94B62189F3ADE29A282AAEE9 /* [CP] Check Pods Manifest.lock */, 203 | BE592C91226D53F800D0D73E /* Sources */, 204 | BE592C92226D53F800D0D73E /* Frameworks */, 205 | BE592C93226D53F800D0D73E /* Resources */, 206 | ); 207 | buildRules = ( 208 | ); 209 | dependencies = ( 210 | BE592C97226D53F800D0D73E /* PBXTargetDependency */, 211 | ); 212 | name = GPUImageTestTests; 213 | productName = GPUImageTestTests; 214 | productReference = BE592C95226D53F800D0D73E /* GPUImageTestTests.xctest */; 215 | productType = "com.apple.product-type.bundle.unit-test"; 216 | }; 217 | BE592C9F226D53F800D0D73E /* GPUImageTestUITests */ = { 218 | isa = PBXNativeTarget; 219 | buildConfigurationList = BE592CAF226D53F800D0D73E /* Build configuration list for PBXNativeTarget "GPUImageTestUITests" */; 220 | buildPhases = ( 221 | 0496574B4705BC51728AB400 /* [CP] Check Pods Manifest.lock */, 222 | BE592C9C226D53F800D0D73E /* Sources */, 223 | BE592C9D226D53F800D0D73E /* Frameworks */, 224 | BE592C9E226D53F800D0D73E /* Resources */, 225 | ); 226 | buildRules = ( 227 | ); 228 | dependencies = ( 229 | BE592CA2226D53F800D0D73E /* PBXTargetDependency */, 230 | ); 231 | name = GPUImageTestUITests; 232 | productName = GPUImageTestUITests; 233 | productReference = BE592CA0226D53F800D0D73E /* GPUImageTestUITests.xctest */; 234 | productType = "com.apple.product-type.bundle.ui-testing"; 235 | }; 236 | /* End PBXNativeTarget section */ 237 | 238 | /* Begin PBXProject section */ 239 | BE592C75226D53F700D0D73E /* Project object */ = { 240 | isa = PBXProject; 241 | attributes = { 242 | LastUpgradeCheck = 1020; 243 | ORGANIZATIONNAME = "zhaoliang chen"; 244 | TargetAttributes = { 245 | BE592C7C226D53F700D0D73E = { 246 | CreatedOnToolsVersion = 10.2.1; 247 | }; 248 | BE592C94226D53F800D0D73E = { 249 | CreatedOnToolsVersion = 10.2.1; 250 | TestTargetID = BE592C7C226D53F700D0D73E; 251 | }; 252 | BE592C9F226D53F800D0D73E = { 253 | CreatedOnToolsVersion = 10.2.1; 254 | TestTargetID = BE592C7C226D53F700D0D73E; 255 | }; 256 | }; 257 | }; 258 | buildConfigurationList = BE592C78226D53F700D0D73E /* Build configuration list for PBXProject "GPUImageTest" */; 259 | compatibilityVersion = "Xcode 9.3"; 260 | developmentRegion = en; 261 | hasScannedForEncodings = 0; 262 | knownRegions = ( 263 | en, 264 | Base, 265 | ); 266 | mainGroup = BE592C74226D53F700D0D73E; 267 | productRefGroup = BE592C7E226D53F700D0D73E /* Products */; 268 | projectDirPath = ""; 269 | projectRoot = ""; 270 | targets = ( 271 | BE592C7C226D53F700D0D73E /* GPUImageTest */, 272 | BE592C94226D53F800D0D73E /* GPUImageTestTests */, 273 | BE592C9F226D53F800D0D73E /* GPUImageTestUITests */, 274 | ); 275 | }; 276 | /* End PBXProject section */ 277 | 278 | /* Begin PBXResourcesBuildPhase section */ 279 | BE592C7B226D53F700D0D73E /* Resources */ = { 280 | isa = PBXResourcesBuildPhase; 281 | buildActionMask = 2147483647; 282 | files = ( 283 | BE592C8D226D53F800D0D73E /* LaunchScreen.storyboard in Resources */, 284 | BE592C8A226D53F800D0D73E /* Assets.xcassets in Resources */, 285 | BE592C88226D53F700D0D73E /* Main.storyboard in Resources */, 286 | ); 287 | runOnlyForDeploymentPostprocessing = 0; 288 | }; 289 | BE592C93226D53F800D0D73E /* Resources */ = { 290 | isa = PBXResourcesBuildPhase; 291 | buildActionMask = 2147483647; 292 | files = ( 293 | ); 294 | runOnlyForDeploymentPostprocessing = 0; 295 | }; 296 | BE592C9E226D53F800D0D73E /* Resources */ = { 297 | isa = PBXResourcesBuildPhase; 298 | buildActionMask = 2147483647; 299 | files = ( 300 | ); 301 | runOnlyForDeploymentPostprocessing = 0; 302 | }; 303 | /* End PBXResourcesBuildPhase section */ 304 | 305 | /* Begin PBXShellScriptBuildPhase section */ 306 | 0496574B4705BC51728AB400 /* [CP] Check Pods Manifest.lock */ = { 307 | isa = PBXShellScriptBuildPhase; 308 | buildActionMask = 2147483647; 309 | files = ( 310 | ); 311 | inputFileListPaths = ( 312 | ); 313 | inputPaths = ( 314 | "${PODS_PODFILE_DIR_PATH}/Podfile.lock", 315 | "${PODS_ROOT}/Manifest.lock", 316 | ); 317 | name = "[CP] Check Pods Manifest.lock"; 318 | outputFileListPaths = ( 319 | ); 320 | outputPaths = ( 321 | "$(DERIVED_FILE_DIR)/Pods-GPUImageTestUITests-checkManifestLockResult.txt", 322 | ); 323 | runOnlyForDeploymentPostprocessing = 0; 324 | shellPath = /bin/sh; 325 | shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; 326 | showEnvVarsInLog = 0; 327 | }; 328 | 48EC1DB84B13F45CDBFD15B6 /* [CP] Check Pods Manifest.lock */ = { 329 | isa = PBXShellScriptBuildPhase; 330 | buildActionMask = 2147483647; 331 | files = ( 332 | ); 333 | inputFileListPaths = ( 334 | ); 335 | inputPaths = ( 336 | "${PODS_PODFILE_DIR_PATH}/Podfile.lock", 337 | "${PODS_ROOT}/Manifest.lock", 338 | ); 339 | name = "[CP] Check Pods Manifest.lock"; 340 | outputFileListPaths = ( 341 | ); 342 | outputPaths = ( 343 | "$(DERIVED_FILE_DIR)/Pods-GPUImageTest-checkManifestLockResult.txt", 344 | ); 345 | runOnlyForDeploymentPostprocessing = 0; 346 | shellPath = /bin/sh; 347 | shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; 348 | showEnvVarsInLog = 0; 349 | }; 350 | 94B62189F3ADE29A282AAEE9 /* [CP] Check Pods Manifest.lock */ = { 351 | isa = PBXShellScriptBuildPhase; 352 | buildActionMask = 2147483647; 353 | files = ( 354 | ); 355 | inputFileListPaths = ( 356 | ); 357 | inputPaths = ( 358 | "${PODS_PODFILE_DIR_PATH}/Podfile.lock", 359 | "${PODS_ROOT}/Manifest.lock", 360 | ); 361 | name = "[CP] Check Pods Manifest.lock"; 362 | outputFileListPaths = ( 363 | ); 364 | outputPaths = ( 365 | "$(DERIVED_FILE_DIR)/Pods-GPUImageTestTests-checkManifestLockResult.txt", 366 | ); 367 | runOnlyForDeploymentPostprocessing = 0; 368 | shellPath = /bin/sh; 369 | shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; 370 | showEnvVarsInLog = 0; 371 | }; 372 | C94E3DEBF36DF0C7758C423F /* [CP] Embed Pods Frameworks */ = { 373 | isa = PBXShellScriptBuildPhase; 374 | buildActionMask = 2147483647; 375 | files = ( 376 | ); 377 | inputFileListPaths = ( 378 | "${PODS_ROOT}/Target Support Files/Pods-GPUImageTest/Pods-GPUImageTest-frameworks-${CONFIGURATION}-input-files.xcfilelist", 379 | ); 380 | name = "[CP] Embed Pods Frameworks"; 381 | outputFileListPaths = ( 382 | "${PODS_ROOT}/Target Support Files/Pods-GPUImageTest/Pods-GPUImageTest-frameworks-${CONFIGURATION}-output-files.xcfilelist", 383 | ); 384 | runOnlyForDeploymentPostprocessing = 0; 385 | shellPath = /bin/sh; 386 | shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-GPUImageTest/Pods-GPUImageTest-frameworks.sh\"\n"; 387 | showEnvVarsInLog = 0; 388 | }; 389 | /* End PBXShellScriptBuildPhase section */ 390 | 391 | /* Begin PBXSourcesBuildPhase section */ 392 | BE592C79226D53F700D0D73E /* Sources */ = { 393 | isa = PBXSourcesBuildPhase; 394 | buildActionMask = 2147483647; 395 | files = ( 396 | BE592C85226D53F700D0D73E /* ViewController.m in Sources */, 397 | BE592C90226D53F800D0D73E /* main.m in Sources */, 398 | BE592C82226D53F700D0D73E /* AppDelegate.m in Sources */, 399 | ); 400 | runOnlyForDeploymentPostprocessing = 0; 401 | }; 402 | BE592C91226D53F800D0D73E /* Sources */ = { 403 | isa = PBXSourcesBuildPhase; 404 | buildActionMask = 2147483647; 405 | files = ( 406 | BE592C9A226D53F800D0D73E /* GPUImageTestTests.m in Sources */, 407 | ); 408 | runOnlyForDeploymentPostprocessing = 0; 409 | }; 410 | BE592C9C226D53F800D0D73E /* Sources */ = { 411 | isa = PBXSourcesBuildPhase; 412 | buildActionMask = 2147483647; 413 | files = ( 414 | BE592CA5226D53F800D0D73E /* GPUImageTestUITests.m in Sources */, 415 | ); 416 | runOnlyForDeploymentPostprocessing = 0; 417 | }; 418 | /* End PBXSourcesBuildPhase section */ 419 | 420 | /* Begin PBXTargetDependency section */ 421 | BE592C97226D53F800D0D73E /* PBXTargetDependency */ = { 422 | isa = PBXTargetDependency; 423 | target = BE592C7C226D53F700D0D73E /* GPUImageTest */; 424 | targetProxy = BE592C96226D53F800D0D73E /* PBXContainerItemProxy */; 425 | }; 426 | BE592CA2226D53F800D0D73E /* PBXTargetDependency */ = { 427 | isa = PBXTargetDependency; 428 | target = BE592C7C226D53F700D0D73E /* GPUImageTest */; 429 | targetProxy = BE592CA1226D53F800D0D73E /* PBXContainerItemProxy */; 430 | }; 431 | /* End PBXTargetDependency section */ 432 | 433 | /* Begin PBXVariantGroup section */ 434 | BE592C86226D53F700D0D73E /* Main.storyboard */ = { 435 | isa = PBXVariantGroup; 436 | children = ( 437 | BE592C87226D53F700D0D73E /* Base */, 438 | ); 439 | name = Main.storyboard; 440 | sourceTree = ""; 441 | }; 442 | BE592C8B226D53F800D0D73E /* LaunchScreen.storyboard */ = { 443 | isa = PBXVariantGroup; 444 | children = ( 445 | BE592C8C226D53F800D0D73E /* Base */, 446 | ); 447 | name = LaunchScreen.storyboard; 448 | sourceTree = ""; 449 | }; 450 | /* End PBXVariantGroup section */ 451 | 452 | /* Begin XCBuildConfiguration section */ 453 | BE592CA7226D53F800D0D73E /* Debug */ = { 454 | isa = XCBuildConfiguration; 455 | buildSettings = { 456 | ALWAYS_SEARCH_USER_PATHS = NO; 457 | CLANG_ANALYZER_NONNULL = YES; 458 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 459 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; 460 | CLANG_CXX_LIBRARY = "libc++"; 461 | CLANG_ENABLE_MODULES = YES; 462 | CLANG_ENABLE_OBJC_ARC = YES; 463 | CLANG_ENABLE_OBJC_WEAK = YES; 464 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 465 | CLANG_WARN_BOOL_CONVERSION = YES; 466 | CLANG_WARN_COMMA = YES; 467 | CLANG_WARN_CONSTANT_CONVERSION = YES; 468 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 469 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 470 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 471 | CLANG_WARN_EMPTY_BODY = YES; 472 | CLANG_WARN_ENUM_CONVERSION = YES; 473 | CLANG_WARN_INFINITE_RECURSION = YES; 474 | CLANG_WARN_INT_CONVERSION = YES; 475 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 476 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 477 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 478 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 479 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 480 | CLANG_WARN_STRICT_PROTOTYPES = YES; 481 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 482 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; 483 | CLANG_WARN_UNREACHABLE_CODE = YES; 484 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 485 | CODE_SIGN_IDENTITY = "iPhone Developer"; 486 | COPY_PHASE_STRIP = NO; 487 | DEBUG_INFORMATION_FORMAT = dwarf; 488 | ENABLE_STRICT_OBJC_MSGSEND = YES; 489 | ENABLE_TESTABILITY = YES; 490 | GCC_C_LANGUAGE_STANDARD = gnu11; 491 | GCC_DYNAMIC_NO_PIC = NO; 492 | GCC_NO_COMMON_BLOCKS = YES; 493 | GCC_OPTIMIZATION_LEVEL = 0; 494 | GCC_PREPROCESSOR_DEFINITIONS = ( 495 | "DEBUG=1", 496 | "$(inherited)", 497 | ); 498 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 499 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 500 | GCC_WARN_UNDECLARED_SELECTOR = YES; 501 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 502 | GCC_WARN_UNUSED_FUNCTION = YES; 503 | GCC_WARN_UNUSED_VARIABLE = YES; 504 | IPHONEOS_DEPLOYMENT_TARGET = 12.2; 505 | MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; 506 | MTL_FAST_MATH = YES; 507 | ONLY_ACTIVE_ARCH = YES; 508 | SDKROOT = iphoneos; 509 | }; 510 | name = Debug; 511 | }; 512 | BE592CA8226D53F800D0D73E /* Release */ = { 513 | isa = XCBuildConfiguration; 514 | buildSettings = { 515 | ALWAYS_SEARCH_USER_PATHS = NO; 516 | CLANG_ANALYZER_NONNULL = YES; 517 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 518 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; 519 | CLANG_CXX_LIBRARY = "libc++"; 520 | CLANG_ENABLE_MODULES = YES; 521 | CLANG_ENABLE_OBJC_ARC = YES; 522 | CLANG_ENABLE_OBJC_WEAK = YES; 523 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 524 | CLANG_WARN_BOOL_CONVERSION = YES; 525 | CLANG_WARN_COMMA = YES; 526 | CLANG_WARN_CONSTANT_CONVERSION = YES; 527 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 528 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 529 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 530 | CLANG_WARN_EMPTY_BODY = YES; 531 | CLANG_WARN_ENUM_CONVERSION = YES; 532 | CLANG_WARN_INFINITE_RECURSION = YES; 533 | CLANG_WARN_INT_CONVERSION = YES; 534 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 535 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 536 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 537 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 538 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 539 | CLANG_WARN_STRICT_PROTOTYPES = YES; 540 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 541 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; 542 | CLANG_WARN_UNREACHABLE_CODE = YES; 543 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 544 | CODE_SIGN_IDENTITY = "iPhone Developer"; 545 | COPY_PHASE_STRIP = NO; 546 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 547 | ENABLE_NS_ASSERTIONS = NO; 548 | ENABLE_STRICT_OBJC_MSGSEND = YES; 549 | GCC_C_LANGUAGE_STANDARD = gnu11; 550 | GCC_NO_COMMON_BLOCKS = YES; 551 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 552 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 553 | GCC_WARN_UNDECLARED_SELECTOR = YES; 554 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 555 | GCC_WARN_UNUSED_FUNCTION = YES; 556 | GCC_WARN_UNUSED_VARIABLE = YES; 557 | IPHONEOS_DEPLOYMENT_TARGET = 12.2; 558 | MTL_ENABLE_DEBUG_INFO = NO; 559 | MTL_FAST_MATH = YES; 560 | SDKROOT = iphoneos; 561 | VALIDATE_PRODUCT = YES; 562 | }; 563 | name = Release; 564 | }; 565 | BE592CAA226D53F800D0D73E /* Debug */ = { 566 | isa = XCBuildConfiguration; 567 | baseConfigurationReference = DEAB107B336A63CBDE3ECE61 /* Pods-GPUImageTest.debug.xcconfig */; 568 | buildSettings = { 569 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 570 | CODE_SIGN_STYLE = Automatic; 571 | INFOPLIST_FILE = GPUImageTest/Info.plist; 572 | LD_RUNPATH_SEARCH_PATHS = ( 573 | "$(inherited)", 574 | "@executable_path/Frameworks", 575 | ); 576 | PRODUCT_BUNDLE_IDENTIFIER = com.github.GPUImageTest; 577 | PRODUCT_NAME = "$(TARGET_NAME)"; 578 | TARGETED_DEVICE_FAMILY = "1,2"; 579 | }; 580 | name = Debug; 581 | }; 582 | BE592CAB226D53F800D0D73E /* Release */ = { 583 | isa = XCBuildConfiguration; 584 | baseConfigurationReference = 9769EA706F2EB8DBFFF8BEDB /* Pods-GPUImageTest.release.xcconfig */; 585 | buildSettings = { 586 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 587 | CODE_SIGN_STYLE = Automatic; 588 | INFOPLIST_FILE = GPUImageTest/Info.plist; 589 | LD_RUNPATH_SEARCH_PATHS = ( 590 | "$(inherited)", 591 | "@executable_path/Frameworks", 592 | ); 593 | PRODUCT_BUNDLE_IDENTIFIER = com.github.GPUImageTest; 594 | PRODUCT_NAME = "$(TARGET_NAME)"; 595 | TARGETED_DEVICE_FAMILY = "1,2"; 596 | }; 597 | name = Release; 598 | }; 599 | BE592CAD226D53F800D0D73E /* Debug */ = { 600 | isa = XCBuildConfiguration; 601 | baseConfigurationReference = 95E779F3EFA3A58A444925F6 /* Pods-GPUImageTestTests.debug.xcconfig */; 602 | buildSettings = { 603 | BUNDLE_LOADER = "$(TEST_HOST)"; 604 | CODE_SIGN_STYLE = Automatic; 605 | INFOPLIST_FILE = GPUImageTestTests/Info.plist; 606 | LD_RUNPATH_SEARCH_PATHS = ( 607 | "$(inherited)", 608 | "@executable_path/Frameworks", 609 | "@loader_path/Frameworks", 610 | ); 611 | PRODUCT_BUNDLE_IDENTIFIER = com.github.GPUImageTestTests; 612 | PRODUCT_NAME = "$(TARGET_NAME)"; 613 | TARGETED_DEVICE_FAMILY = "1,2"; 614 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/GPUImageTest.app/GPUImageTest"; 615 | }; 616 | name = Debug; 617 | }; 618 | BE592CAE226D53F800D0D73E /* Release */ = { 619 | isa = XCBuildConfiguration; 620 | baseConfigurationReference = A214A11EE6AFC7FE8380A647 /* Pods-GPUImageTestTests.release.xcconfig */; 621 | buildSettings = { 622 | BUNDLE_LOADER = "$(TEST_HOST)"; 623 | CODE_SIGN_STYLE = Automatic; 624 | INFOPLIST_FILE = GPUImageTestTests/Info.plist; 625 | LD_RUNPATH_SEARCH_PATHS = ( 626 | "$(inherited)", 627 | "@executable_path/Frameworks", 628 | "@loader_path/Frameworks", 629 | ); 630 | PRODUCT_BUNDLE_IDENTIFIER = com.github.GPUImageTestTests; 631 | PRODUCT_NAME = "$(TARGET_NAME)"; 632 | TARGETED_DEVICE_FAMILY = "1,2"; 633 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/GPUImageTest.app/GPUImageTest"; 634 | }; 635 | name = Release; 636 | }; 637 | BE592CB0226D53F800D0D73E /* Debug */ = { 638 | isa = XCBuildConfiguration; 639 | baseConfigurationReference = 91AE3EBBB94CBE6D68069711 /* Pods-GPUImageTestUITests.debug.xcconfig */; 640 | buildSettings = { 641 | CODE_SIGN_STYLE = Automatic; 642 | INFOPLIST_FILE = GPUImageTestUITests/Info.plist; 643 | LD_RUNPATH_SEARCH_PATHS = ( 644 | "$(inherited)", 645 | "@executable_path/Frameworks", 646 | "@loader_path/Frameworks", 647 | ); 648 | PRODUCT_BUNDLE_IDENTIFIER = com.github.GPUImageTestUITests; 649 | PRODUCT_NAME = "$(TARGET_NAME)"; 650 | TARGETED_DEVICE_FAMILY = "1,2"; 651 | TEST_TARGET_NAME = GPUImageTest; 652 | }; 653 | name = Debug; 654 | }; 655 | BE592CB1226D53F800D0D73E /* Release */ = { 656 | isa = XCBuildConfiguration; 657 | baseConfigurationReference = 7AB8B66A4DE0F8DA86142BFE /* Pods-GPUImageTestUITests.release.xcconfig */; 658 | buildSettings = { 659 | CODE_SIGN_STYLE = Automatic; 660 | INFOPLIST_FILE = GPUImageTestUITests/Info.plist; 661 | LD_RUNPATH_SEARCH_PATHS = ( 662 | "$(inherited)", 663 | "@executable_path/Frameworks", 664 | "@loader_path/Frameworks", 665 | ); 666 | PRODUCT_BUNDLE_IDENTIFIER = com.github.GPUImageTestUITests; 667 | PRODUCT_NAME = "$(TARGET_NAME)"; 668 | TARGETED_DEVICE_FAMILY = "1,2"; 669 | TEST_TARGET_NAME = GPUImageTest; 670 | }; 671 | name = Release; 672 | }; 673 | /* End XCBuildConfiguration section */ 674 | 675 | /* Begin XCConfigurationList section */ 676 | BE592C78226D53F700D0D73E /* Build configuration list for PBXProject "GPUImageTest" */ = { 677 | isa = XCConfigurationList; 678 | buildConfigurations = ( 679 | BE592CA7226D53F800D0D73E /* Debug */, 680 | BE592CA8226D53F800D0D73E /* Release */, 681 | ); 682 | defaultConfigurationIsVisible = 0; 683 | defaultConfigurationName = Release; 684 | }; 685 | BE592CA9226D53F800D0D73E /* Build configuration list for PBXNativeTarget "GPUImageTest" */ = { 686 | isa = XCConfigurationList; 687 | buildConfigurations = ( 688 | BE592CAA226D53F800D0D73E /* Debug */, 689 | BE592CAB226D53F800D0D73E /* Release */, 690 | ); 691 | defaultConfigurationIsVisible = 0; 692 | defaultConfigurationName = Release; 693 | }; 694 | BE592CAC226D53F800D0D73E /* Build configuration list for PBXNativeTarget "GPUImageTestTests" */ = { 695 | isa = XCConfigurationList; 696 | buildConfigurations = ( 697 | BE592CAD226D53F800D0D73E /* Debug */, 698 | BE592CAE226D53F800D0D73E /* Release */, 699 | ); 700 | defaultConfigurationIsVisible = 0; 701 | defaultConfigurationName = Release; 702 | }; 703 | BE592CAF226D53F800D0D73E /* Build configuration list for PBXNativeTarget "GPUImageTestUITests" */ = { 704 | isa = XCConfigurationList; 705 | buildConfigurations = ( 706 | BE592CB0226D53F800D0D73E /* Debug */, 707 | BE592CB1226D53F800D0D73E /* Release */, 708 | ); 709 | defaultConfigurationIsVisible = 0; 710 | defaultConfigurationName = Release; 711 | }; 712 | /* End XCConfigurationList section */ 713 | }; 714 | rootObject = BE592C75226D53F700D0D73E /* Project object */; 715 | } 716 | -------------------------------------------------------------------------------- /02-GPUImage简单使用/GPUImageTest/AppDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.h 3 | // GPUImageTest 4 | // 5 | // Created by zhaoliang chen on 2019/4/22. 6 | // Copyright © 2019 zhaoliang chen. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface AppDelegate : UIResponder 12 | 13 | @property (strong, nonatomic) UIWindow *window; 14 | 15 | 16 | @end 17 | 18 | -------------------------------------------------------------------------------- /02-GPUImage简单使用/GPUImageTest/AppDelegate.m: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.m 3 | // GPUImageTest 4 | // 5 | // Created by zhaoliang chen on 2019/4/22. 6 | // Copyright © 2019 zhaoliang chen. All rights reserved. 7 | // 8 | 9 | #import "AppDelegate.h" 10 | 11 | @interface AppDelegate () 12 | 13 | @end 14 | 15 | @implementation AppDelegate 16 | 17 | 18 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { 19 | // Override point for customization after application launch. 20 | return YES; 21 | } 22 | 23 | 24 | - (void)applicationWillResignActive:(UIApplication *)application { 25 | // 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. 26 | // Use this method to pause ongoing tasks, disable timers, and invalidate graphics rendering callbacks. Games should use this method to pause the game. 27 | } 28 | 29 | 30 | - (void)applicationDidEnterBackground:(UIApplication *)application { 31 | // 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. 32 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. 33 | } 34 | 35 | 36 | - (void)applicationWillEnterForeground:(UIApplication *)application { 37 | // 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. 38 | } 39 | 40 | 41 | - (void)applicationDidBecomeActive:(UIApplication *)application { 42 | // 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. 43 | } 44 | 45 | 46 | - (void)applicationWillTerminate:(UIApplication *)application { 47 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. 48 | } 49 | 50 | 51 | @end 52 | -------------------------------------------------------------------------------- /02-GPUImage简单使用/GPUImageTest/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "size" : "20x20", 6 | "scale" : "2x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "size" : "20x20", 11 | "scale" : "3x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "size" : "29x29", 16 | "scale" : "2x" 17 | }, 18 | { 19 | "idiom" : "iphone", 20 | "size" : "29x29", 21 | "scale" : "3x" 22 | }, 23 | { 24 | "idiom" : "iphone", 25 | "size" : "40x40", 26 | "scale" : "2x" 27 | }, 28 | { 29 | "idiom" : "iphone", 30 | "size" : "40x40", 31 | "scale" : "3x" 32 | }, 33 | { 34 | "idiom" : "iphone", 35 | "size" : "60x60", 36 | "scale" : "2x" 37 | }, 38 | { 39 | "idiom" : "iphone", 40 | "size" : "60x60", 41 | "scale" : "3x" 42 | }, 43 | { 44 | "idiom" : "ipad", 45 | "size" : "20x20", 46 | "scale" : "1x" 47 | }, 48 | { 49 | "idiom" : "ipad", 50 | "size" : "20x20", 51 | "scale" : "2x" 52 | }, 53 | { 54 | "idiom" : "ipad", 55 | "size" : "29x29", 56 | "scale" : "1x" 57 | }, 58 | { 59 | "idiom" : "ipad", 60 | "size" : "29x29", 61 | "scale" : "2x" 62 | }, 63 | { 64 | "idiom" : "ipad", 65 | "size" : "40x40", 66 | "scale" : "1x" 67 | }, 68 | { 69 | "idiom" : "ipad", 70 | "size" : "40x40", 71 | "scale" : "2x" 72 | }, 73 | { 74 | "idiom" : "ipad", 75 | "size" : "76x76", 76 | "scale" : "1x" 77 | }, 78 | { 79 | "idiom" : "ipad", 80 | "size" : "76x76", 81 | "scale" : "2x" 82 | }, 83 | { 84 | "idiom" : "ipad", 85 | "size" : "83.5x83.5", 86 | "scale" : "2x" 87 | }, 88 | { 89 | "idiom" : "ios-marketing", 90 | "size" : "1024x1024", 91 | "scale" : "1x" 92 | } 93 | ], 94 | "info" : { 95 | "version" : 1, 96 | "author" : "xcode" 97 | } 98 | } -------------------------------------------------------------------------------- /02-GPUImage简单使用/GPUImageTest/Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } -------------------------------------------------------------------------------- /02-GPUImage简单使用/GPUImageTest/Assets.xcassets/liuyifei.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "liuyifei.jpeg", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /02-GPUImage简单使用/GPUImageTest/Assets.xcassets/liuyifei.imageset/liuyifei.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/czl0325/LiveStreaming-iOS/53be9d4afe04c1975ab6e6641f0be88576f36e0a/02-GPUImage简单使用/GPUImageTest/Assets.xcassets/liuyifei.imageset/liuyifei.jpeg -------------------------------------------------------------------------------- /02-GPUImage简单使用/GPUImageTest/Base.lproj/LaunchScreen.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /02-GPUImage简单使用/GPUImageTest/Base.lproj/Main.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 33 | 41 | 49 | 61 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | -------------------------------------------------------------------------------- /02-GPUImage简单使用/GPUImageTest/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | APPL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleVersion 20 | 1 21 | LSRequiresIPhoneOS 22 | 23 | UILaunchStoryboardName 24 | LaunchScreen 25 | UIMainStoryboardFile 26 | Main 27 | UIRequiredDeviceCapabilities 28 | 29 | armv7 30 | 31 | UISupportedInterfaceOrientations 32 | 33 | UIInterfaceOrientationPortrait 34 | UIInterfaceOrientationLandscapeLeft 35 | UIInterfaceOrientationLandscapeRight 36 | 37 | UISupportedInterfaceOrientations~ipad 38 | 39 | UIInterfaceOrientationPortrait 40 | UIInterfaceOrientationPortraitUpsideDown 41 | UIInterfaceOrientationLandscapeLeft 42 | UIInterfaceOrientationLandscapeRight 43 | 44 | 45 | 46 | -------------------------------------------------------------------------------- /02-GPUImage简单使用/GPUImageTest/ViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.h 3 | // GPUImageTest 4 | // 5 | // Created by zhaoliang chen on 2019/4/22. 6 | // Copyright © 2019 zhaoliang chen. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface ViewController : UIViewController 12 | 13 | 14 | @end 15 | 16 | -------------------------------------------------------------------------------- /02-GPUImage简单使用/GPUImageTest/ViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.m 3 | // GPUImageTest 4 | // 5 | // Created by zhaoliang chen on 2019/4/22. 6 | // Copyright © 2019 zhaoliang chen. All rights reserved. 7 | // 8 | 9 | #import "ViewController.h" 10 | #import "GPUImage.h" 11 | 12 | @interface ViewController () 13 | 14 | @property (weak, nonatomic) IBOutlet UIImageView *imageView; 15 | 16 | @end 17 | 18 | @implementation ViewController 19 | 20 | - (void)viewDidLoad { 21 | [super viewDidLoad]; 22 | // Do any additional setup after loading the view. 23 | } 24 | 25 | //添加毛玻璃效果 26 | - (IBAction)onBlur:(id)sender { 27 | // 2.2.初始化高斯模糊滤镜 28 | GPUImageGaussianBlurFilter* blurFilter = [[GPUImageGaussianBlurFilter alloc]init]; 29 | blurFilter.texelSpacingMultiplier = 5; 30 | blurFilter.blurRadiusInPixels = 5; 31 | 32 | [self addFilter:blurFilter]; 33 | } 34 | 35 | - (IBAction)onSketch:(id)sender { 36 | GPUImageSketchFilter* sketchFilter = [[GPUImageSketchFilter alloc]init]; 37 | [self addFilter:sketchFilter]; 38 | } 39 | 40 | - (IBAction)onToon:(id)sender { 41 | GPUImageToonFilter* toonFilter = [[GPUImageToonFilter alloc]init]; 42 | [self addFilter:toonFilter]; 43 | } 44 | 45 | - (IBAction)onEmboss:(id)sender { 46 | GPUImageEmbossFilter* embossFilter = [[GPUImageEmbossFilter alloc]init]; 47 | [self addFilter:embossFilter]; 48 | } 49 | 50 | - (IBAction)onMutiple:(id)sender { 51 | // 1.创建滤镜组(用于存放各种滤镜:美白、磨皮等等) 52 | GPUImageFilterGroup* group = [[GPUImageFilterGroup alloc]init]; 53 | 54 | // 2.创建滤镜(设置滤镜的引用关系,链式调度) 55 | GPUImageSketchFilter* sketchFilter = [[GPUImageSketchFilter alloc]init]; 56 | GPUImageToonFilter* toonFilter = [[GPUImageToonFilter alloc]init]; 57 | GPUImageEmbossFilter* embossFilter = [[GPUImageEmbossFilter alloc]init]; 58 | 59 | [sketchFilter addTarget:toonFilter]; 60 | [toonFilter addTarget:embossFilter]; 61 | 62 | // 3.设置滤镜组链初始&终点的filter 63 | group.initialFilters = @[sketchFilter]; 64 | group.terminalFilter = embossFilter; 65 | 66 | UIImage *sourceImage = [UIImage imageNamed:@"liuyifei"]; 67 | GPUImagePicture* process = [[GPUImagePicture alloc]initWithImage:sourceImage]; 68 | [process addTarget:group]; 69 | [group useNextFrameForImageCapture]; 70 | [process processImage]; 71 | UIImage* distImage = [group imageFromCurrentFramebuffer]; 72 | self.imageView.image = distImage; 73 | } 74 | 75 | - (void)addFilter:(GPUImageFilter*)filter { 76 | // 1.获取待修改的图片 77 | UIImage *sourceImage = [UIImage imageNamed:@"liuyifei"]; 78 | 79 | // 2.使用GPUImage高斯模糊效果 80 | // 2.1.对图像进行处理使用GPUImagePicture 81 | GPUImagePicture* process = [[GPUImagePicture alloc]initWithImage:sourceImage]; 82 | 83 | // 2.2部分抽离出来 84 | // 2.3.把滤镜添加进GPUImagePicture 85 | [process addTarget:filter]; 86 | 87 | // 2.4.处理图片 88 | [filter useNextFrameForImageCapture]; 89 | [process processImage]; 90 | 91 | // 2.5.取出最新的图片 92 | UIImage* distImage = [filter imageFromCurrentFramebuffer]; 93 | 94 | // 3.显示最新的图片 95 | self.imageView.image = distImage; 96 | } 97 | 98 | 99 | @end 100 | -------------------------------------------------------------------------------- /02-GPUImage简单使用/GPUImageTest/main.m: -------------------------------------------------------------------------------- 1 | // 2 | // main.m 3 | // GPUImageTest 4 | // 5 | // Created by zhaoliang chen on 2019/4/22. 6 | // Copyright © 2019 zhaoliang chen. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "AppDelegate.h" 11 | 12 | int main(int argc, char * argv[]) { 13 | @autoreleasepool { 14 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /02-GPUImage简单使用/GPUImageTestTests/GPUImageTestTests.m: -------------------------------------------------------------------------------- 1 | // 2 | // GPUImageTestTests.m 3 | // GPUImageTestTests 4 | // 5 | // Created by zhaoliang chen on 2019/4/22. 6 | // Copyright © 2019 zhaoliang chen. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface GPUImageTestTests : XCTestCase 12 | 13 | @end 14 | 15 | @implementation GPUImageTestTests 16 | 17 | - (void)setUp { 18 | // Put setup code here. This method is called before the invocation of each test method in the class. 19 | } 20 | 21 | - (void)tearDown { 22 | // Put teardown code here. This method is called after the invocation of each test method in the class. 23 | } 24 | 25 | - (void)testExample { 26 | // This is an example of a functional test case. 27 | // Use XCTAssert and related functions to verify your tests produce the correct results. 28 | } 29 | 30 | - (void)testPerformanceExample { 31 | // This is an example of a performance test case. 32 | [self measureBlock:^{ 33 | // Put the code you want to measure the time of here. 34 | }]; 35 | } 36 | 37 | @end 38 | -------------------------------------------------------------------------------- /02-GPUImage简单使用/GPUImageTestTests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | BNDL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleVersion 20 | 1 21 | 22 | 23 | -------------------------------------------------------------------------------- /02-GPUImage简单使用/GPUImageTestUITests/GPUImageTestUITests.m: -------------------------------------------------------------------------------- 1 | // 2 | // GPUImageTestUITests.m 3 | // GPUImageTestUITests 4 | // 5 | // Created by zhaoliang chen on 2019/4/22. 6 | // Copyright © 2019 zhaoliang chen. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface GPUImageTestUITests : XCTestCase 12 | 13 | @end 14 | 15 | @implementation GPUImageTestUITests 16 | 17 | - (void)setUp { 18 | // Put setup code here. This method is called before the invocation of each test method in the class. 19 | 20 | // In UI tests it is usually best to stop immediately when a failure occurs. 21 | self.continueAfterFailure = NO; 22 | 23 | // UI tests must launch the application that they test. Doing this in setup will make sure it happens for each test method. 24 | [[[XCUIApplication alloc] init] launch]; 25 | 26 | // In UI tests it’s important to set the initial state - such as interface orientation - required for your tests before they run. The setUp method is a good place to do this. 27 | } 28 | 29 | - (void)tearDown { 30 | // Put teardown code here. This method is called after the invocation of each test method in the class. 31 | } 32 | 33 | - (void)testExample { 34 | // Use recording to get started writing UI tests. 35 | // Use XCTAssert and related functions to verify your tests produce the correct results. 36 | } 37 | 38 | @end 39 | -------------------------------------------------------------------------------- /02-GPUImage简单使用/GPUImageTestUITests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | BNDL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleVersion 20 | 1 21 | 22 | 23 | -------------------------------------------------------------------------------- /02-GPUImage简单使用/Podfile: -------------------------------------------------------------------------------- 1 | # Uncomment the next line to define a global platform for your project 2 | platform :ios, '9.0' 3 | 4 | target 'GPUImageTest' do 5 | # Comment the next line if you don't want to use dynamic frameworks 6 | use_frameworks! 7 | 8 | pod 'GPUImage' 9 | 10 | # Pods for GPUImageTest 11 | 12 | target 'GPUImageTestTests' do 13 | inherit! :search_paths 14 | # Pods for testing 15 | end 16 | 17 | target 'GPUImageTestUITests' do 18 | inherit! :search_paths 19 | # Pods for testing 20 | end 21 | 22 | end 23 | -------------------------------------------------------------------------------- /02-GPUImage简单使用/Podfile.lock: -------------------------------------------------------------------------------- 1 | PODS: 2 | - GPUImage (0.1.7) 3 | 4 | DEPENDENCIES: 5 | - GPUImage 6 | 7 | SPEC REPOS: 8 | https://github.com/cocoapods/specs.git: 9 | - GPUImage 10 | 11 | SPEC CHECKSUMS: 12 | GPUImage: 733a5f0fab92df9de1c37ba9df520a833ccb406d 13 | 14 | PODFILE CHECKSUM: d9a069c61130f46eceb4dc645eb3e4026b21dc5e 15 | 16 | COCOAPODS: 1.7.0.beta.3 17 | -------------------------------------------------------------------------------- /03-美颜相机/BeautyCamera.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 51; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 2E547A247A96CC85604D3752 /* Pods_BeautyCamera.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D43DF4D0F134D660246BBB78 /* Pods_BeautyCamera.framework */; }; 11 | BE290807226D705D00263E6F /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = BE290806226D705D00263E6F /* AppDelegate.m */; }; 12 | BE29080A226D705D00263E6F /* ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = BE290809226D705D00263E6F /* ViewController.m */; }; 13 | BE29080D226D705D00263E6F /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = BE29080B226D705D00263E6F /* Main.storyboard */; }; 14 | BE29080F226D705E00263E6F /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = BE29080E226D705E00263E6F /* Assets.xcassets */; }; 15 | BE290812226D705E00263E6F /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = BE290810226D705E00263E6F /* LaunchScreen.storyboard */; }; 16 | BE290815226D705E00263E6F /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = BE290814226D705E00263E6F /* main.m */; }; 17 | BE29081F226D705E00263E6F /* BeautyCameraTests.m in Sources */ = {isa = PBXBuildFile; fileRef = BE29081E226D705E00263E6F /* BeautyCameraTests.m */; }; 18 | BE29082A226D705E00263E6F /* BeautyCameraUITests.m in Sources */ = {isa = PBXBuildFile; fileRef = BE290829226D705E00263E6F /* BeautyCameraUITests.m */; }; 19 | BE5B68D6226D8C8400988844 /* PhotoViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = BE5B68D4226D8C8400988844 /* PhotoViewController.m */; }; 20 | BE5B68D7226D8C8400988844 /* PhotoViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = BE5B68D5226D8C8400988844 /* PhotoViewController.xib */; }; 21 | BE5B68DB226D8C9300988844 /* CameraViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = BE5B68D9226D8C9300988844 /* CameraViewController.m */; }; 22 | BE5B68DC226D8C9300988844 /* CameraViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = BE5B68DA226D8C9300988844 /* CameraViewController.xib */; }; 23 | /* End PBXBuildFile section */ 24 | 25 | /* Begin PBXContainerItemProxy section */ 26 | BE29081B226D705E00263E6F /* PBXContainerItemProxy */ = { 27 | isa = PBXContainerItemProxy; 28 | containerPortal = BE2907FA226D705D00263E6F /* Project object */; 29 | proxyType = 1; 30 | remoteGlobalIDString = BE290801226D705D00263E6F; 31 | remoteInfo = BeautyCamera; 32 | }; 33 | BE290826226D705E00263E6F /* PBXContainerItemProxy */ = { 34 | isa = PBXContainerItemProxy; 35 | containerPortal = BE2907FA226D705D00263E6F /* Project object */; 36 | proxyType = 1; 37 | remoteGlobalIDString = BE290801226D705D00263E6F; 38 | remoteInfo = BeautyCamera; 39 | }; 40 | /* End PBXContainerItemProxy section */ 41 | 42 | /* Begin PBXFileReference section */ 43 | 625F95E8F947CF9372631ACF /* Pods-BeautyCamera.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-BeautyCamera.debug.xcconfig"; path = "Target Support Files/Pods-BeautyCamera/Pods-BeautyCamera.debug.xcconfig"; sourceTree = ""; }; 44 | 7393141D84E29D8DB961548B /* Pods-BeautyCamera.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-BeautyCamera.release.xcconfig"; path = "Target Support Files/Pods-BeautyCamera/Pods-BeautyCamera.release.xcconfig"; sourceTree = ""; }; 45 | BE290802226D705D00263E6F /* BeautyCamera.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = BeautyCamera.app; sourceTree = BUILT_PRODUCTS_DIR; }; 46 | BE290805226D705D00263E6F /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; }; 47 | BE290806226D705D00263E6F /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; }; 48 | BE290808226D705D00263E6F /* ViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ViewController.h; sourceTree = ""; }; 49 | BE290809226D705D00263E6F /* ViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ViewController.m; sourceTree = ""; }; 50 | BE29080C226D705D00263E6F /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; 51 | BE29080E226D705E00263E6F /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 52 | BE290811226D705E00263E6F /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; 53 | BE290813226D705E00263E6F /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 54 | BE290814226D705E00263E6F /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; 55 | BE29081A226D705E00263E6F /* BeautyCameraTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = BeautyCameraTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 56 | BE29081E226D705E00263E6F /* BeautyCameraTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = BeautyCameraTests.m; sourceTree = ""; }; 57 | BE290820226D705E00263E6F /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 58 | BE290825226D705E00263E6F /* BeautyCameraUITests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = BeautyCameraUITests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 59 | BE290829226D705E00263E6F /* BeautyCameraUITests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = BeautyCameraUITests.m; sourceTree = ""; }; 60 | BE29082B226D705E00263E6F /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 61 | BE5B68D3226D8C8400988844 /* PhotoViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = PhotoViewController.h; sourceTree = ""; }; 62 | BE5B68D4226D8C8400988844 /* PhotoViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = PhotoViewController.m; sourceTree = ""; }; 63 | BE5B68D5226D8C8400988844 /* PhotoViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = PhotoViewController.xib; sourceTree = ""; }; 64 | BE5B68D8226D8C9300988844 /* CameraViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = CameraViewController.h; sourceTree = ""; }; 65 | BE5B68D9226D8C9300988844 /* CameraViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = CameraViewController.m; sourceTree = ""; }; 66 | BE5B68DA226D8C9300988844 /* CameraViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = CameraViewController.xib; sourceTree = ""; }; 67 | D43DF4D0F134D660246BBB78 /* Pods_BeautyCamera.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_BeautyCamera.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 68 | /* End PBXFileReference section */ 69 | 70 | /* Begin PBXFrameworksBuildPhase section */ 71 | BE2907FF226D705D00263E6F /* Frameworks */ = { 72 | isa = PBXFrameworksBuildPhase; 73 | buildActionMask = 2147483647; 74 | files = ( 75 | 2E547A247A96CC85604D3752 /* Pods_BeautyCamera.framework in Frameworks */, 76 | ); 77 | runOnlyForDeploymentPostprocessing = 0; 78 | }; 79 | BE290817226D705E00263E6F /* Frameworks */ = { 80 | isa = PBXFrameworksBuildPhase; 81 | buildActionMask = 2147483647; 82 | files = ( 83 | ); 84 | runOnlyForDeploymentPostprocessing = 0; 85 | }; 86 | BE290822226D705E00263E6F /* Frameworks */ = { 87 | isa = PBXFrameworksBuildPhase; 88 | buildActionMask = 2147483647; 89 | files = ( 90 | ); 91 | runOnlyForDeploymentPostprocessing = 0; 92 | }; 93 | /* End PBXFrameworksBuildPhase section */ 94 | 95 | /* Begin PBXGroup section */ 96 | 2AB6E7F13FBBA45195822130 /* Frameworks */ = { 97 | isa = PBXGroup; 98 | children = ( 99 | D43DF4D0F134D660246BBB78 /* Pods_BeautyCamera.framework */, 100 | ); 101 | name = Frameworks; 102 | sourceTree = ""; 103 | }; 104 | 4B21DC3817D914A94A67908D /* Pods */ = { 105 | isa = PBXGroup; 106 | children = ( 107 | 625F95E8F947CF9372631ACF /* Pods-BeautyCamera.debug.xcconfig */, 108 | 7393141D84E29D8DB961548B /* Pods-BeautyCamera.release.xcconfig */, 109 | ); 110 | path = Pods; 111 | sourceTree = ""; 112 | }; 113 | BE2907F9226D705D00263E6F = { 114 | isa = PBXGroup; 115 | children = ( 116 | BE290804226D705D00263E6F /* BeautyCamera */, 117 | BE29081D226D705E00263E6F /* BeautyCameraTests */, 118 | BE290828226D705E00263E6F /* BeautyCameraUITests */, 119 | BE290803226D705D00263E6F /* Products */, 120 | 4B21DC3817D914A94A67908D /* Pods */, 121 | 2AB6E7F13FBBA45195822130 /* Frameworks */, 122 | ); 123 | sourceTree = ""; 124 | }; 125 | BE290803226D705D00263E6F /* Products */ = { 126 | isa = PBXGroup; 127 | children = ( 128 | BE290802226D705D00263E6F /* BeautyCamera.app */, 129 | BE29081A226D705E00263E6F /* BeautyCameraTests.xctest */, 130 | BE290825226D705E00263E6F /* BeautyCameraUITests.xctest */, 131 | ); 132 | name = Products; 133 | sourceTree = ""; 134 | }; 135 | BE290804226D705D00263E6F /* BeautyCamera */ = { 136 | isa = PBXGroup; 137 | children = ( 138 | BE290805226D705D00263E6F /* AppDelegate.h */, 139 | BE290806226D705D00263E6F /* AppDelegate.m */, 140 | BE290808226D705D00263E6F /* ViewController.h */, 141 | BE290809226D705D00263E6F /* ViewController.m */, 142 | BE29080B226D705D00263E6F /* Main.storyboard */, 143 | BE29080E226D705E00263E6F /* Assets.xcassets */, 144 | BE290810226D705E00263E6F /* LaunchScreen.storyboard */, 145 | BE290813226D705E00263E6F /* Info.plist */, 146 | BE290814226D705E00263E6F /* main.m */, 147 | BE5B68D3226D8C8400988844 /* PhotoViewController.h */, 148 | BE5B68D4226D8C8400988844 /* PhotoViewController.m */, 149 | BE5B68D5226D8C8400988844 /* PhotoViewController.xib */, 150 | BE5B68D8226D8C9300988844 /* CameraViewController.h */, 151 | BE5B68D9226D8C9300988844 /* CameraViewController.m */, 152 | BE5B68DA226D8C9300988844 /* CameraViewController.xib */, 153 | ); 154 | path = BeautyCamera; 155 | sourceTree = ""; 156 | }; 157 | BE29081D226D705E00263E6F /* BeautyCameraTests */ = { 158 | isa = PBXGroup; 159 | children = ( 160 | BE29081E226D705E00263E6F /* BeautyCameraTests.m */, 161 | BE290820226D705E00263E6F /* Info.plist */, 162 | ); 163 | path = BeautyCameraTests; 164 | sourceTree = ""; 165 | }; 166 | BE290828226D705E00263E6F /* BeautyCameraUITests */ = { 167 | isa = PBXGroup; 168 | children = ( 169 | BE290829226D705E00263E6F /* BeautyCameraUITests.m */, 170 | BE29082B226D705E00263E6F /* Info.plist */, 171 | ); 172 | path = BeautyCameraUITests; 173 | sourceTree = ""; 174 | }; 175 | /* End PBXGroup section */ 176 | 177 | /* Begin PBXNativeTarget section */ 178 | BE290801226D705D00263E6F /* BeautyCamera */ = { 179 | isa = PBXNativeTarget; 180 | buildConfigurationList = BE29082E226D705E00263E6F /* Build configuration list for PBXNativeTarget "BeautyCamera" */; 181 | buildPhases = ( 182 | 00377C9E76E524E23A02954F /* [CP] Check Pods Manifest.lock */, 183 | BE2907FE226D705D00263E6F /* Sources */, 184 | BE2907FF226D705D00263E6F /* Frameworks */, 185 | BE290800226D705D00263E6F /* Resources */, 186 | CE46270E12EBBAE869C0F029 /* [CP] Embed Pods Frameworks */, 187 | ); 188 | buildRules = ( 189 | ); 190 | dependencies = ( 191 | ); 192 | name = BeautyCamera; 193 | productName = BeautyCamera; 194 | productReference = BE290802226D705D00263E6F /* BeautyCamera.app */; 195 | productType = "com.apple.product-type.application"; 196 | }; 197 | BE290819226D705E00263E6F /* BeautyCameraTests */ = { 198 | isa = PBXNativeTarget; 199 | buildConfigurationList = BE290831226D705E00263E6F /* Build configuration list for PBXNativeTarget "BeautyCameraTests" */; 200 | buildPhases = ( 201 | BE290816226D705E00263E6F /* Sources */, 202 | BE290817226D705E00263E6F /* Frameworks */, 203 | BE290818226D705E00263E6F /* Resources */, 204 | ); 205 | buildRules = ( 206 | ); 207 | dependencies = ( 208 | BE29081C226D705E00263E6F /* PBXTargetDependency */, 209 | ); 210 | name = BeautyCameraTests; 211 | productName = BeautyCameraTests; 212 | productReference = BE29081A226D705E00263E6F /* BeautyCameraTests.xctest */; 213 | productType = "com.apple.product-type.bundle.unit-test"; 214 | }; 215 | BE290824226D705E00263E6F /* BeautyCameraUITests */ = { 216 | isa = PBXNativeTarget; 217 | buildConfigurationList = BE290834226D705E00263E6F /* Build configuration list for PBXNativeTarget "BeautyCameraUITests" */; 218 | buildPhases = ( 219 | BE290821226D705E00263E6F /* Sources */, 220 | BE290822226D705E00263E6F /* Frameworks */, 221 | BE290823226D705E00263E6F /* Resources */, 222 | ); 223 | buildRules = ( 224 | ); 225 | dependencies = ( 226 | BE290827226D705E00263E6F /* PBXTargetDependency */, 227 | ); 228 | name = BeautyCameraUITests; 229 | productName = BeautyCameraUITests; 230 | productReference = BE290825226D705E00263E6F /* BeautyCameraUITests.xctest */; 231 | productType = "com.apple.product-type.bundle.ui-testing"; 232 | }; 233 | /* End PBXNativeTarget section */ 234 | 235 | /* Begin PBXProject section */ 236 | BE2907FA226D705D00263E6F /* Project object */ = { 237 | isa = PBXProject; 238 | attributes = { 239 | LastUpgradeCheck = 1020; 240 | ORGANIZATIONNAME = "zhaoliang chen"; 241 | TargetAttributes = { 242 | BE290801226D705D00263E6F = { 243 | CreatedOnToolsVersion = 10.2.1; 244 | }; 245 | BE290819226D705E00263E6F = { 246 | CreatedOnToolsVersion = 10.2.1; 247 | TestTargetID = BE290801226D705D00263E6F; 248 | }; 249 | BE290824226D705E00263E6F = { 250 | CreatedOnToolsVersion = 10.2.1; 251 | TestTargetID = BE290801226D705D00263E6F; 252 | }; 253 | }; 254 | }; 255 | buildConfigurationList = BE2907FD226D705D00263E6F /* Build configuration list for PBXProject "BeautyCamera" */; 256 | compatibilityVersion = "Xcode 9.3"; 257 | developmentRegion = en; 258 | hasScannedForEncodings = 0; 259 | knownRegions = ( 260 | en, 261 | Base, 262 | ); 263 | mainGroup = BE2907F9226D705D00263E6F; 264 | productRefGroup = BE290803226D705D00263E6F /* Products */; 265 | projectDirPath = ""; 266 | projectRoot = ""; 267 | targets = ( 268 | BE290801226D705D00263E6F /* BeautyCamera */, 269 | BE290819226D705E00263E6F /* BeautyCameraTests */, 270 | BE290824226D705E00263E6F /* BeautyCameraUITests */, 271 | ); 272 | }; 273 | /* End PBXProject section */ 274 | 275 | /* Begin PBXResourcesBuildPhase section */ 276 | BE290800226D705D00263E6F /* Resources */ = { 277 | isa = PBXResourcesBuildPhase; 278 | buildActionMask = 2147483647; 279 | files = ( 280 | BE290812226D705E00263E6F /* LaunchScreen.storyboard in Resources */, 281 | BE5B68D7226D8C8400988844 /* PhotoViewController.xib in Resources */, 282 | BE29080F226D705E00263E6F /* Assets.xcassets in Resources */, 283 | BE29080D226D705D00263E6F /* Main.storyboard in Resources */, 284 | BE5B68DC226D8C9300988844 /* CameraViewController.xib in Resources */, 285 | ); 286 | runOnlyForDeploymentPostprocessing = 0; 287 | }; 288 | BE290818226D705E00263E6F /* Resources */ = { 289 | isa = PBXResourcesBuildPhase; 290 | buildActionMask = 2147483647; 291 | files = ( 292 | ); 293 | runOnlyForDeploymentPostprocessing = 0; 294 | }; 295 | BE290823226D705E00263E6F /* Resources */ = { 296 | isa = PBXResourcesBuildPhase; 297 | buildActionMask = 2147483647; 298 | files = ( 299 | ); 300 | runOnlyForDeploymentPostprocessing = 0; 301 | }; 302 | /* End PBXResourcesBuildPhase section */ 303 | 304 | /* Begin PBXShellScriptBuildPhase section */ 305 | 00377C9E76E524E23A02954F /* [CP] Check Pods Manifest.lock */ = { 306 | isa = PBXShellScriptBuildPhase; 307 | buildActionMask = 2147483647; 308 | files = ( 309 | ); 310 | inputFileListPaths = ( 311 | ); 312 | inputPaths = ( 313 | "${PODS_PODFILE_DIR_PATH}/Podfile.lock", 314 | "${PODS_ROOT}/Manifest.lock", 315 | ); 316 | name = "[CP] Check Pods Manifest.lock"; 317 | outputFileListPaths = ( 318 | ); 319 | outputPaths = ( 320 | "$(DERIVED_FILE_DIR)/Pods-BeautyCamera-checkManifestLockResult.txt", 321 | ); 322 | runOnlyForDeploymentPostprocessing = 0; 323 | shellPath = /bin/sh; 324 | shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; 325 | showEnvVarsInLog = 0; 326 | }; 327 | CE46270E12EBBAE869C0F029 /* [CP] Embed Pods Frameworks */ = { 328 | isa = PBXShellScriptBuildPhase; 329 | buildActionMask = 2147483647; 330 | files = ( 331 | ); 332 | inputFileListPaths = ( 333 | "${PODS_ROOT}/Target Support Files/Pods-BeautyCamera/Pods-BeautyCamera-frameworks-${CONFIGURATION}-input-files.xcfilelist", 334 | ); 335 | name = "[CP] Embed Pods Frameworks"; 336 | outputFileListPaths = ( 337 | "${PODS_ROOT}/Target Support Files/Pods-BeautyCamera/Pods-BeautyCamera-frameworks-${CONFIGURATION}-output-files.xcfilelist", 338 | ); 339 | runOnlyForDeploymentPostprocessing = 0; 340 | shellPath = /bin/sh; 341 | shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-BeautyCamera/Pods-BeautyCamera-frameworks.sh\"\n"; 342 | showEnvVarsInLog = 0; 343 | }; 344 | /* End PBXShellScriptBuildPhase section */ 345 | 346 | /* Begin PBXSourcesBuildPhase section */ 347 | BE2907FE226D705D00263E6F /* Sources */ = { 348 | isa = PBXSourcesBuildPhase; 349 | buildActionMask = 2147483647; 350 | files = ( 351 | BE5B68DB226D8C9300988844 /* CameraViewController.m in Sources */, 352 | BE29080A226D705D00263E6F /* ViewController.m in Sources */, 353 | BE5B68D6226D8C8400988844 /* PhotoViewController.m in Sources */, 354 | BE290815226D705E00263E6F /* main.m in Sources */, 355 | BE290807226D705D00263E6F /* AppDelegate.m in Sources */, 356 | ); 357 | runOnlyForDeploymentPostprocessing = 0; 358 | }; 359 | BE290816226D705E00263E6F /* Sources */ = { 360 | isa = PBXSourcesBuildPhase; 361 | buildActionMask = 2147483647; 362 | files = ( 363 | BE29081F226D705E00263E6F /* BeautyCameraTests.m in Sources */, 364 | ); 365 | runOnlyForDeploymentPostprocessing = 0; 366 | }; 367 | BE290821226D705E00263E6F /* Sources */ = { 368 | isa = PBXSourcesBuildPhase; 369 | buildActionMask = 2147483647; 370 | files = ( 371 | BE29082A226D705E00263E6F /* BeautyCameraUITests.m in Sources */, 372 | ); 373 | runOnlyForDeploymentPostprocessing = 0; 374 | }; 375 | /* End PBXSourcesBuildPhase section */ 376 | 377 | /* Begin PBXTargetDependency section */ 378 | BE29081C226D705E00263E6F /* PBXTargetDependency */ = { 379 | isa = PBXTargetDependency; 380 | target = BE290801226D705D00263E6F /* BeautyCamera */; 381 | targetProxy = BE29081B226D705E00263E6F /* PBXContainerItemProxy */; 382 | }; 383 | BE290827226D705E00263E6F /* PBXTargetDependency */ = { 384 | isa = PBXTargetDependency; 385 | target = BE290801226D705D00263E6F /* BeautyCamera */; 386 | targetProxy = BE290826226D705E00263E6F /* PBXContainerItemProxy */; 387 | }; 388 | /* End PBXTargetDependency section */ 389 | 390 | /* Begin PBXVariantGroup section */ 391 | BE29080B226D705D00263E6F /* Main.storyboard */ = { 392 | isa = PBXVariantGroup; 393 | children = ( 394 | BE29080C226D705D00263E6F /* Base */, 395 | ); 396 | name = Main.storyboard; 397 | sourceTree = ""; 398 | }; 399 | BE290810226D705E00263E6F /* LaunchScreen.storyboard */ = { 400 | isa = PBXVariantGroup; 401 | children = ( 402 | BE290811226D705E00263E6F /* Base */, 403 | ); 404 | name = LaunchScreen.storyboard; 405 | sourceTree = ""; 406 | }; 407 | /* End PBXVariantGroup section */ 408 | 409 | /* Begin XCBuildConfiguration section */ 410 | BE29082C226D705E00263E6F /* Debug */ = { 411 | isa = XCBuildConfiguration; 412 | buildSettings = { 413 | ALWAYS_SEARCH_USER_PATHS = NO; 414 | CLANG_ANALYZER_NONNULL = YES; 415 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 416 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; 417 | CLANG_CXX_LIBRARY = "libc++"; 418 | CLANG_ENABLE_MODULES = YES; 419 | CLANG_ENABLE_OBJC_ARC = YES; 420 | CLANG_ENABLE_OBJC_WEAK = YES; 421 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 422 | CLANG_WARN_BOOL_CONVERSION = YES; 423 | CLANG_WARN_COMMA = YES; 424 | CLANG_WARN_CONSTANT_CONVERSION = YES; 425 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 426 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 427 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 428 | CLANG_WARN_EMPTY_BODY = YES; 429 | CLANG_WARN_ENUM_CONVERSION = YES; 430 | CLANG_WARN_INFINITE_RECURSION = YES; 431 | CLANG_WARN_INT_CONVERSION = YES; 432 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 433 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 434 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 435 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 436 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 437 | CLANG_WARN_STRICT_PROTOTYPES = YES; 438 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 439 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; 440 | CLANG_WARN_UNREACHABLE_CODE = YES; 441 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 442 | CODE_SIGN_IDENTITY = "iPhone Developer"; 443 | COPY_PHASE_STRIP = NO; 444 | DEBUG_INFORMATION_FORMAT = dwarf; 445 | ENABLE_STRICT_OBJC_MSGSEND = YES; 446 | ENABLE_TESTABILITY = YES; 447 | GCC_C_LANGUAGE_STANDARD = gnu11; 448 | GCC_DYNAMIC_NO_PIC = NO; 449 | GCC_NO_COMMON_BLOCKS = YES; 450 | GCC_OPTIMIZATION_LEVEL = 0; 451 | GCC_PREPROCESSOR_DEFINITIONS = ( 452 | "DEBUG=1", 453 | "$(inherited)", 454 | ); 455 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 456 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 457 | GCC_WARN_UNDECLARED_SELECTOR = YES; 458 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 459 | GCC_WARN_UNUSED_FUNCTION = YES; 460 | GCC_WARN_UNUSED_VARIABLE = YES; 461 | IPHONEOS_DEPLOYMENT_TARGET = 12.2; 462 | MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; 463 | MTL_FAST_MATH = YES; 464 | ONLY_ACTIVE_ARCH = YES; 465 | SDKROOT = iphoneos; 466 | }; 467 | name = Debug; 468 | }; 469 | BE29082D226D705E00263E6F /* Release */ = { 470 | isa = XCBuildConfiguration; 471 | buildSettings = { 472 | ALWAYS_SEARCH_USER_PATHS = NO; 473 | CLANG_ANALYZER_NONNULL = YES; 474 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 475 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; 476 | CLANG_CXX_LIBRARY = "libc++"; 477 | CLANG_ENABLE_MODULES = YES; 478 | CLANG_ENABLE_OBJC_ARC = YES; 479 | CLANG_ENABLE_OBJC_WEAK = YES; 480 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 481 | CLANG_WARN_BOOL_CONVERSION = YES; 482 | CLANG_WARN_COMMA = YES; 483 | CLANG_WARN_CONSTANT_CONVERSION = YES; 484 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 485 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 486 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 487 | CLANG_WARN_EMPTY_BODY = YES; 488 | CLANG_WARN_ENUM_CONVERSION = YES; 489 | CLANG_WARN_INFINITE_RECURSION = YES; 490 | CLANG_WARN_INT_CONVERSION = YES; 491 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 492 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 493 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 494 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 495 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 496 | CLANG_WARN_STRICT_PROTOTYPES = YES; 497 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 498 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; 499 | CLANG_WARN_UNREACHABLE_CODE = YES; 500 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 501 | CODE_SIGN_IDENTITY = "iPhone Developer"; 502 | COPY_PHASE_STRIP = NO; 503 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 504 | ENABLE_NS_ASSERTIONS = NO; 505 | ENABLE_STRICT_OBJC_MSGSEND = YES; 506 | GCC_C_LANGUAGE_STANDARD = gnu11; 507 | GCC_NO_COMMON_BLOCKS = YES; 508 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 509 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 510 | GCC_WARN_UNDECLARED_SELECTOR = YES; 511 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 512 | GCC_WARN_UNUSED_FUNCTION = YES; 513 | GCC_WARN_UNUSED_VARIABLE = YES; 514 | IPHONEOS_DEPLOYMENT_TARGET = 12.2; 515 | MTL_ENABLE_DEBUG_INFO = NO; 516 | MTL_FAST_MATH = YES; 517 | SDKROOT = iphoneos; 518 | VALIDATE_PRODUCT = YES; 519 | }; 520 | name = Release; 521 | }; 522 | BE29082F226D705E00263E6F /* Debug */ = { 523 | isa = XCBuildConfiguration; 524 | baseConfigurationReference = 625F95E8F947CF9372631ACF /* Pods-BeautyCamera.debug.xcconfig */; 525 | buildSettings = { 526 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 527 | CODE_SIGN_STYLE = Automatic; 528 | DEVELOPMENT_TEAM = B28EYZD36N; 529 | INFOPLIST_FILE = BeautyCamera/Info.plist; 530 | LD_RUNPATH_SEARCH_PATHS = ( 531 | "$(inherited)", 532 | "@executable_path/Frameworks", 533 | ); 534 | PRODUCT_BUNDLE_IDENTIFIER = com.github.BeautyCamera; 535 | PRODUCT_NAME = "$(TARGET_NAME)"; 536 | TARGETED_DEVICE_FAMILY = "1,2"; 537 | }; 538 | name = Debug; 539 | }; 540 | BE290830226D705E00263E6F /* Release */ = { 541 | isa = XCBuildConfiguration; 542 | baseConfigurationReference = 7393141D84E29D8DB961548B /* Pods-BeautyCamera.release.xcconfig */; 543 | buildSettings = { 544 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 545 | CODE_SIGN_STYLE = Automatic; 546 | DEVELOPMENT_TEAM = B28EYZD36N; 547 | INFOPLIST_FILE = BeautyCamera/Info.plist; 548 | LD_RUNPATH_SEARCH_PATHS = ( 549 | "$(inherited)", 550 | "@executable_path/Frameworks", 551 | ); 552 | PRODUCT_BUNDLE_IDENTIFIER = com.github.BeautyCamera; 553 | PRODUCT_NAME = "$(TARGET_NAME)"; 554 | TARGETED_DEVICE_FAMILY = "1,2"; 555 | }; 556 | name = Release; 557 | }; 558 | BE290832226D705E00263E6F /* Debug */ = { 559 | isa = XCBuildConfiguration; 560 | buildSettings = { 561 | BUNDLE_LOADER = "$(TEST_HOST)"; 562 | CODE_SIGN_STYLE = Automatic; 563 | INFOPLIST_FILE = BeautyCameraTests/Info.plist; 564 | LD_RUNPATH_SEARCH_PATHS = ( 565 | "$(inherited)", 566 | "@executable_path/Frameworks", 567 | "@loader_path/Frameworks", 568 | ); 569 | PRODUCT_BUNDLE_IDENTIFIER = com.github.BeautyCameraTests; 570 | PRODUCT_NAME = "$(TARGET_NAME)"; 571 | TARGETED_DEVICE_FAMILY = "1,2"; 572 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/BeautyCamera.app/BeautyCamera"; 573 | }; 574 | name = Debug; 575 | }; 576 | BE290833226D705E00263E6F /* Release */ = { 577 | isa = XCBuildConfiguration; 578 | buildSettings = { 579 | BUNDLE_LOADER = "$(TEST_HOST)"; 580 | CODE_SIGN_STYLE = Automatic; 581 | INFOPLIST_FILE = BeautyCameraTests/Info.plist; 582 | LD_RUNPATH_SEARCH_PATHS = ( 583 | "$(inherited)", 584 | "@executable_path/Frameworks", 585 | "@loader_path/Frameworks", 586 | ); 587 | PRODUCT_BUNDLE_IDENTIFIER = com.github.BeautyCameraTests; 588 | PRODUCT_NAME = "$(TARGET_NAME)"; 589 | TARGETED_DEVICE_FAMILY = "1,2"; 590 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/BeautyCamera.app/BeautyCamera"; 591 | }; 592 | name = Release; 593 | }; 594 | BE290835226D705E00263E6F /* Debug */ = { 595 | isa = XCBuildConfiguration; 596 | buildSettings = { 597 | CODE_SIGN_STYLE = Automatic; 598 | INFOPLIST_FILE = BeautyCameraUITests/Info.plist; 599 | LD_RUNPATH_SEARCH_PATHS = ( 600 | "$(inherited)", 601 | "@executable_path/Frameworks", 602 | "@loader_path/Frameworks", 603 | ); 604 | PRODUCT_BUNDLE_IDENTIFIER = com.github.BeautyCameraUITests; 605 | PRODUCT_NAME = "$(TARGET_NAME)"; 606 | TARGETED_DEVICE_FAMILY = "1,2"; 607 | TEST_TARGET_NAME = BeautyCamera; 608 | }; 609 | name = Debug; 610 | }; 611 | BE290836226D705E00263E6F /* Release */ = { 612 | isa = XCBuildConfiguration; 613 | buildSettings = { 614 | CODE_SIGN_STYLE = Automatic; 615 | INFOPLIST_FILE = BeautyCameraUITests/Info.plist; 616 | LD_RUNPATH_SEARCH_PATHS = ( 617 | "$(inherited)", 618 | "@executable_path/Frameworks", 619 | "@loader_path/Frameworks", 620 | ); 621 | PRODUCT_BUNDLE_IDENTIFIER = com.github.BeautyCameraUITests; 622 | PRODUCT_NAME = "$(TARGET_NAME)"; 623 | TARGETED_DEVICE_FAMILY = "1,2"; 624 | TEST_TARGET_NAME = BeautyCamera; 625 | }; 626 | name = Release; 627 | }; 628 | /* End XCBuildConfiguration section */ 629 | 630 | /* Begin XCConfigurationList section */ 631 | BE2907FD226D705D00263E6F /* Build configuration list for PBXProject "BeautyCamera" */ = { 632 | isa = XCConfigurationList; 633 | buildConfigurations = ( 634 | BE29082C226D705E00263E6F /* Debug */, 635 | BE29082D226D705E00263E6F /* Release */, 636 | ); 637 | defaultConfigurationIsVisible = 0; 638 | defaultConfigurationName = Release; 639 | }; 640 | BE29082E226D705E00263E6F /* Build configuration list for PBXNativeTarget "BeautyCamera" */ = { 641 | isa = XCConfigurationList; 642 | buildConfigurations = ( 643 | BE29082F226D705E00263E6F /* Debug */, 644 | BE290830226D705E00263E6F /* Release */, 645 | ); 646 | defaultConfigurationIsVisible = 0; 647 | defaultConfigurationName = Release; 648 | }; 649 | BE290831226D705E00263E6F /* Build configuration list for PBXNativeTarget "BeautyCameraTests" */ = { 650 | isa = XCConfigurationList; 651 | buildConfigurations = ( 652 | BE290832226D705E00263E6F /* Debug */, 653 | BE290833226D705E00263E6F /* Release */, 654 | ); 655 | defaultConfigurationIsVisible = 0; 656 | defaultConfigurationName = Release; 657 | }; 658 | BE290834226D705E00263E6F /* Build configuration list for PBXNativeTarget "BeautyCameraUITests" */ = { 659 | isa = XCConfigurationList; 660 | buildConfigurations = ( 661 | BE290835226D705E00263E6F /* Debug */, 662 | BE290836226D705E00263E6F /* Release */, 663 | ); 664 | defaultConfigurationIsVisible = 0; 665 | defaultConfigurationName = Release; 666 | }; 667 | /* End XCConfigurationList section */ 668 | }; 669 | rootObject = BE2907FA226D705D00263E6F /* Project object */; 670 | } 671 | -------------------------------------------------------------------------------- /03-美颜相机/BeautyCamera/AppDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.h 3 | // BeautyCamera 4 | // 5 | // Created by zhaoliang chen on 2019/4/22. 6 | // Copyright © 2019 zhaoliang chen. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface AppDelegate : UIResponder 12 | 13 | @property (strong, nonatomic) UIWindow *window; 14 | 15 | 16 | @end 17 | 18 | -------------------------------------------------------------------------------- /03-美颜相机/BeautyCamera/AppDelegate.m: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.m 3 | // BeautyCamera 4 | // 5 | // Created by zhaoliang chen on 2019/4/22. 6 | // Copyright © 2019 zhaoliang chen. All rights reserved. 7 | // 8 | 9 | #import "AppDelegate.h" 10 | 11 | @interface AppDelegate () 12 | 13 | @end 14 | 15 | @implementation AppDelegate 16 | 17 | 18 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { 19 | // Override point for customization after application launch. 20 | return YES; 21 | } 22 | 23 | 24 | - (void)applicationWillResignActive:(UIApplication *)application { 25 | // 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. 26 | // Use this method to pause ongoing tasks, disable timers, and invalidate graphics rendering callbacks. Games should use this method to pause the game. 27 | } 28 | 29 | 30 | - (void)applicationDidEnterBackground:(UIApplication *)application { 31 | // 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. 32 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. 33 | } 34 | 35 | 36 | - (void)applicationWillEnterForeground:(UIApplication *)application { 37 | // 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. 38 | } 39 | 40 | 41 | - (void)applicationDidBecomeActive:(UIApplication *)application { 42 | // 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. 43 | } 44 | 45 | 46 | - (void)applicationWillTerminate:(UIApplication *)application { 47 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. 48 | } 49 | 50 | 51 | @end 52 | -------------------------------------------------------------------------------- /03-美颜相机/BeautyCamera/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "size" : "20x20", 6 | "scale" : "2x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "size" : "20x20", 11 | "scale" : "3x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "size" : "29x29", 16 | "scale" : "2x" 17 | }, 18 | { 19 | "idiom" : "iphone", 20 | "size" : "29x29", 21 | "scale" : "3x" 22 | }, 23 | { 24 | "idiom" : "iphone", 25 | "size" : "40x40", 26 | "scale" : "2x" 27 | }, 28 | { 29 | "idiom" : "iphone", 30 | "size" : "40x40", 31 | "scale" : "3x" 32 | }, 33 | { 34 | "idiom" : "iphone", 35 | "size" : "60x60", 36 | "scale" : "2x" 37 | }, 38 | { 39 | "idiom" : "iphone", 40 | "size" : "60x60", 41 | "scale" : "3x" 42 | }, 43 | { 44 | "idiom" : "ipad", 45 | "size" : "20x20", 46 | "scale" : "1x" 47 | }, 48 | { 49 | "idiom" : "ipad", 50 | "size" : "20x20", 51 | "scale" : "2x" 52 | }, 53 | { 54 | "idiom" : "ipad", 55 | "size" : "29x29", 56 | "scale" : "1x" 57 | }, 58 | { 59 | "idiom" : "ipad", 60 | "size" : "29x29", 61 | "scale" : "2x" 62 | }, 63 | { 64 | "idiom" : "ipad", 65 | "size" : "40x40", 66 | "scale" : "1x" 67 | }, 68 | { 69 | "idiom" : "ipad", 70 | "size" : "40x40", 71 | "scale" : "2x" 72 | }, 73 | { 74 | "idiom" : "ipad", 75 | "size" : "76x76", 76 | "scale" : "1x" 77 | }, 78 | { 79 | "idiom" : "ipad", 80 | "size" : "76x76", 81 | "scale" : "2x" 82 | }, 83 | { 84 | "idiom" : "ipad", 85 | "size" : "83.5x83.5", 86 | "scale" : "2x" 87 | }, 88 | { 89 | "idiom" : "ios-marketing", 90 | "size" : "1024x1024", 91 | "scale" : "1x" 92 | } 93 | ], 94 | "info" : { 95 | "version" : 1, 96 | "author" : "xcode" 97 | } 98 | } -------------------------------------------------------------------------------- /03-美颜相机/BeautyCamera/Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } -------------------------------------------------------------------------------- /03-美颜相机/BeautyCamera/Base.lproj/LaunchScreen.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /03-美颜相机/BeautyCamera/Base.lproj/Main.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 29 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | -------------------------------------------------------------------------------- /03-美颜相机/BeautyCamera/CameraViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // CameraViewController.h 3 | // BeautyCamera 4 | // 5 | // Created by zhaoliang chen on 2019/4/22. 6 | // Copyright © 2019 zhaoliang chen. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | NS_ASSUME_NONNULL_BEGIN 12 | 13 | @interface CameraViewController : UIViewController 14 | 15 | @end 16 | 17 | NS_ASSUME_NONNULL_END 18 | -------------------------------------------------------------------------------- /03-美颜相机/BeautyCamera/CameraViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // CameraViewController.m 3 | // BeautyCamera 4 | // 5 | // Created by zhaoliang chen on 2019/4/22. 6 | // Copyright © 2019 zhaoliang chen. All rights reserved. 7 | // 8 | 9 | #import "CameraViewController.h" 10 | 11 | @interface CameraViewController () 12 | 13 | @end 14 | 15 | @implementation CameraViewController 16 | 17 | - (void)viewDidLoad { 18 | [super viewDidLoad]; 19 | // Do any additional setup after loading the view from its nib. 20 | } 21 | 22 | /* 23 | #pragma mark - Navigation 24 | 25 | // In a storyboard-based application, you will often want to do a little preparation before navigation 26 | - (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender { 27 | // Get the new view controller using [segue destinationViewController]. 28 | // Pass the selected object to the new view controller. 29 | } 30 | */ 31 | 32 | @end 33 | -------------------------------------------------------------------------------- /03-美颜相机/BeautyCamera/CameraViewController.xib: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /03-美颜相机/BeautyCamera/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | APPL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleVersion 20 | 1 21 | LSRequiresIPhoneOS 22 | 23 | NSCameraUsageDescription 24 | 美颜相机 25 | UILaunchStoryboardName 26 | LaunchScreen 27 | UIMainStoryboardFile 28 | Main 29 | UIRequiredDeviceCapabilities 30 | 31 | armv7 32 | 33 | UISupportedInterfaceOrientations 34 | 35 | UIInterfaceOrientationPortrait 36 | 37 | UISupportedInterfaceOrientations~ipad 38 | 39 | UIInterfaceOrientationPortrait 40 | UIInterfaceOrientationPortraitUpsideDown 41 | UIInterfaceOrientationLandscapeLeft 42 | UIInterfaceOrientationLandscapeRight 43 | 44 | 45 | 46 | -------------------------------------------------------------------------------- /03-美颜相机/BeautyCamera/PhotoViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // PhotoViewController.h 3 | // BeautyCamera 4 | // 5 | // Created by zhaoliang chen on 2019/4/22. 6 | // Copyright © 2019 zhaoliang chen. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | NS_ASSUME_NONNULL_BEGIN 12 | 13 | @interface PhotoViewController : UIViewController 14 | 15 | @end 16 | 17 | NS_ASSUME_NONNULL_END 18 | -------------------------------------------------------------------------------- /03-美颜相机/BeautyCamera/PhotoViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // PhotoViewController.m 3 | // BeautyCamera 4 | // 5 | // Created by zhaoliang chen on 2019/4/22. 6 | // Copyright © 2019 zhaoliang chen. All rights reserved. 7 | // 8 | 9 | #import "PhotoViewController.h" 10 | #import "GPUImage.h" 11 | 12 | @interface PhotoViewController () 13 | 14 | @property (weak, nonatomic) IBOutlet UIImageView *imageView; 15 | @property (strong, nonatomic) GPUImageStillCamera* camera; 16 | @property (strong, nonatomic) GPUImageBrightnessFilter* filter; 17 | @property (strong, nonatomic) GPUImageView* preview; 18 | 19 | @end 20 | 21 | @implementation PhotoViewController 22 | 23 | - (void)viewDidLoad { 24 | [super viewDidLoad]; 25 | // Do any additional setup after loading the view from its nib. 26 | // 1.添加美白滤镜 27 | self.filter = [[GPUImageBrightnessFilter alloc]init]; 28 | self.filter.brightness = 0.5; 29 | // 2.将美白滤镜添加进相机 30 | [self.camera addTarget:self.filter]; 31 | // 3.创建GPUImageView,用于显示实时画面 32 | self.preview = [[GPUImageView alloc]initWithFrame:self.view.bounds]; 33 | self.preview.autoresizingMask = UIViewAutoresizingFlexibleWidth|UIViewAutoresizingFlexibleHeight; 34 | [self.view insertSubview:self.preview atIndex:0]; 35 | [self.filter addTarget:self.preview]; 36 | } 37 | 38 | - (void)viewDidAppear:(BOOL)animated { 39 | 40 | // 4.开始捕捉 41 | [self.camera startCameraCapture]; 42 | 43 | } 44 | 45 | - (IBAction)onTakePhoto:(id)sender { 46 | [self.camera capturePhotoAsImageProcessedUpToFilter:self.filter withCompletionHandler:^(UIImage *processedImage, NSError *error) { 47 | self.imageView.image = processedImage; 48 | [self.camera stopCameraCapture]; 49 | [self.preview removeFromSuperview]; 50 | }]; 51 | } 52 | 53 | - (GPUImageStillCamera*)camera { 54 | if (!_camera) { 55 | // 1.创建GPUImageStillCamera 56 | _camera = [[GPUImageStillCamera alloc]initWithSessionPreset:AVCaptureSessionPresetHigh cameraPosition:AVCaptureDevicePositionFront]; 57 | 58 | // 2.设置竖直方向 59 | _camera.outputImageOrientation = UIInterfaceOrientationPortrait; 60 | 61 | 62 | } 63 | return _camera; 64 | } 65 | 66 | @end 67 | -------------------------------------------------------------------------------- /03-美颜相机/BeautyCamera/PhotoViewController.xib: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | -------------------------------------------------------------------------------- /03-美颜相机/BeautyCamera/ViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.h 3 | // BeautyCamera 4 | // 5 | // Created by zhaoliang chen on 2019/4/22. 6 | // Copyright © 2019 zhaoliang chen. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface ViewController : UIViewController 12 | 13 | 14 | @end 15 | 16 | -------------------------------------------------------------------------------- /03-美颜相机/BeautyCamera/ViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.m 3 | // BeautyCamera 4 | // 5 | // Created by zhaoliang chen on 2019/4/22. 6 | // Copyright © 2019 zhaoliang chen. All rights reserved. 7 | // 8 | 9 | #import "ViewController.h" 10 | #import "PhotoViewController.h" 11 | #import "CameraViewController.h" 12 | 13 | @interface ViewController () 14 | 15 | @end 16 | 17 | @implementation ViewController 18 | 19 | - (void)viewDidLoad { 20 | [super viewDidLoad]; 21 | // Do any additional setup after loading the view. 22 | } 23 | 24 | - (IBAction)onPhoto:(id)sender { 25 | [self.navigationController pushViewController:[[PhotoViewController alloc]init] animated:YES]; 26 | } 27 | 28 | - (IBAction)onCamera:(id)sender { 29 | [self.navigationController pushViewController:[[CameraViewController alloc]init] animated:YES]; 30 | } 31 | 32 | @end 33 | -------------------------------------------------------------------------------- /03-美颜相机/BeautyCamera/main.m: -------------------------------------------------------------------------------- 1 | // 2 | // main.m 3 | // BeautyCamera 4 | // 5 | // Created by zhaoliang chen on 2019/4/22. 6 | // Copyright © 2019 zhaoliang chen. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "AppDelegate.h" 11 | 12 | int main(int argc, char * argv[]) { 13 | @autoreleasepool { 14 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /03-美颜相机/BeautyCameraTests/BeautyCameraTests.m: -------------------------------------------------------------------------------- 1 | // 2 | // BeautyCameraTests.m 3 | // BeautyCameraTests 4 | // 5 | // Created by zhaoliang chen on 2019/4/22. 6 | // Copyright © 2019 zhaoliang chen. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface BeautyCameraTests : XCTestCase 12 | 13 | @end 14 | 15 | @implementation BeautyCameraTests 16 | 17 | - (void)setUp { 18 | // Put setup code here. This method is called before the invocation of each test method in the class. 19 | } 20 | 21 | - (void)tearDown { 22 | // Put teardown code here. This method is called after the invocation of each test method in the class. 23 | } 24 | 25 | - (void)testExample { 26 | // This is an example of a functional test case. 27 | // Use XCTAssert and related functions to verify your tests produce the correct results. 28 | } 29 | 30 | - (void)testPerformanceExample { 31 | // This is an example of a performance test case. 32 | [self measureBlock:^{ 33 | // Put the code you want to measure the time of here. 34 | }]; 35 | } 36 | 37 | @end 38 | -------------------------------------------------------------------------------- /03-美颜相机/BeautyCameraTests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | BNDL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleVersion 20 | 1 21 | 22 | 23 | -------------------------------------------------------------------------------- /03-美颜相机/BeautyCameraUITests/BeautyCameraUITests.m: -------------------------------------------------------------------------------- 1 | // 2 | // BeautyCameraUITests.m 3 | // BeautyCameraUITests 4 | // 5 | // Created by zhaoliang chen on 2019/4/22. 6 | // Copyright © 2019 zhaoliang chen. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface BeautyCameraUITests : XCTestCase 12 | 13 | @end 14 | 15 | @implementation BeautyCameraUITests 16 | 17 | - (void)setUp { 18 | // Put setup code here. This method is called before the invocation of each test method in the class. 19 | 20 | // In UI tests it is usually best to stop immediately when a failure occurs. 21 | self.continueAfterFailure = NO; 22 | 23 | // UI tests must launch the application that they test. Doing this in setup will make sure it happens for each test method. 24 | [[[XCUIApplication alloc] init] launch]; 25 | 26 | // In UI tests it’s important to set the initial state - such as interface orientation - required for your tests before they run. The setUp method is a good place to do this. 27 | } 28 | 29 | - (void)tearDown { 30 | // Put teardown code here. This method is called after the invocation of each test method in the class. 31 | } 32 | 33 | - (void)testExample { 34 | // Use recording to get started writing UI tests. 35 | // Use XCTAssert and related functions to verify your tests produce the correct results. 36 | } 37 | 38 | @end 39 | -------------------------------------------------------------------------------- /03-美颜相机/BeautyCameraUITests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | BNDL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleVersion 20 | 1 21 | 22 | 23 | -------------------------------------------------------------------------------- /03-美颜相机/Podfile: -------------------------------------------------------------------------------- 1 | # Uncomment the next line to define a global platform for your project 2 | platform :ios, '9.0' 3 | use_frameworks! 4 | 5 | target 'BeautyCamera' do 6 | 7 | pod 'GPUImage' 8 | 9 | end 10 | -------------------------------------------------------------------------------- /03-美颜相机/Podfile.lock: -------------------------------------------------------------------------------- 1 | PODS: 2 | - GPUImage (0.1.7) 3 | 4 | DEPENDENCIES: 5 | - GPUImage 6 | 7 | SPEC REPOS: 8 | https://github.com/cocoapods/specs.git: 9 | - GPUImage 10 | 11 | SPEC CHECKSUMS: 12 | GPUImage: 733a5f0fab92df9de1c37ba9df520a833ccb406d 13 | 14 | PODFILE CHECKSUM: 4ca6826932670963aee359ee039c10901ca52450 15 | 16 | COCOAPODS: 1.7.0.beta.3 17 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Apache License 2 | Version 2.0, January 2004 3 | http://www.apache.org/licenses/ 4 | 5 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 6 | 7 | 1. Definitions. 8 | 9 | "License" shall mean the terms and conditions for use, reproduction, 10 | and distribution as defined by Sections 1 through 9 of this document. 11 | 12 | "Licensor" shall mean the copyright owner or entity authorized by 13 | the copyright owner that is granting the License. 14 | 15 | "Legal Entity" shall mean the union of the acting entity and all 16 | other entities that control, are controlled by, or are under common 17 | control with that entity. For the purposes of this definition, 18 | "control" means (i) the power, direct or indirect, to cause the 19 | direction or management of such entity, whether by contract or 20 | otherwise, or (ii) ownership of fifty percent (50%) or more of the 21 | outstanding shares, or (iii) beneficial ownership of such entity. 22 | 23 | "You" (or "Your") shall mean an individual or Legal Entity 24 | exercising permissions granted by this License. 25 | 26 | "Source" form shall mean the preferred form for making modifications, 27 | including but not limited to software source code, documentation 28 | source, and configuration files. 29 | 30 | "Object" form shall mean any form resulting from mechanical 31 | transformation or translation of a Source form, including but 32 | not limited to compiled object code, generated documentation, 33 | and conversions to other media types. 34 | 35 | "Work" shall mean the work of authorship, whether in Source or 36 | Object form, made available under the License, as indicated by a 37 | copyright notice that is included in or attached to the work 38 | (an example is provided in the Appendix below). 39 | 40 | "Derivative Works" shall mean any work, whether in Source or Object 41 | form, that is based on (or derived from) the Work and for which the 42 | editorial revisions, annotations, elaborations, or other modifications 43 | represent, as a whole, an original work of authorship. For the purposes 44 | of this License, Derivative Works shall not include works that remain 45 | separable from, or merely link (or bind by name) to the interfaces of, 46 | the Work and Derivative Works thereof. 47 | 48 | "Contribution" shall mean any work of authorship, including 49 | the original version of the Work and any modifications or additions 50 | to that Work or Derivative Works thereof, that is intentionally 51 | submitted to Licensor for inclusion in the Work by the copyright owner 52 | or by an individual or Legal Entity authorized to submit on behalf of 53 | the copyright owner. For the purposes of this definition, "submitted" 54 | means any form of electronic, verbal, or written communication sent 55 | to the Licensor or its representatives, including but not limited to 56 | communication on electronic mailing lists, source code control systems, 57 | and issue tracking systems that are managed by, or on behalf of, the 58 | Licensor for the purpose of discussing and improving the Work, but 59 | excluding communication that is conspicuously marked or otherwise 60 | designated in writing by the copyright owner as "Not a Contribution." 61 | 62 | "Contributor" shall mean Licensor and any individual or Legal Entity 63 | on behalf of whom a Contribution has been received by Licensor and 64 | subsequently incorporated within the Work. 65 | 66 | 2. Grant of Copyright License. Subject to the terms and conditions of 67 | this License, each Contributor hereby grants to You a perpetual, 68 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 69 | copyright license to reproduce, prepare Derivative Works of, 70 | publicly display, publicly perform, sublicense, and distribute the 71 | Work and such Derivative Works in Source or Object form. 72 | 73 | 3. Grant of Patent License. Subject to the terms and conditions of 74 | this License, each Contributor hereby grants to You a perpetual, 75 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 76 | (except as stated in this section) patent license to make, have made, 77 | use, offer to sell, sell, import, and otherwise transfer the Work, 78 | where such license applies only to those patent claims licensable 79 | by such Contributor that are necessarily infringed by their 80 | Contribution(s) alone or by combination of their Contribution(s) 81 | with the Work to which such Contribution(s) was submitted. If You 82 | institute patent litigation against any entity (including a 83 | cross-claim or counterclaim in a lawsuit) alleging that the Work 84 | or a Contribution incorporated within the Work constitutes direct 85 | or contributory patent infringement, then any patent licenses 86 | granted to You under this License for that Work shall terminate 87 | as of the date such litigation is filed. 88 | 89 | 4. Redistribution. You may reproduce and distribute copies of the 90 | Work or Derivative Works thereof in any medium, with or without 91 | modifications, and in Source or Object form, provided that You 92 | meet the following conditions: 93 | 94 | (a) You must give any other recipients of the Work or 95 | Derivative Works a copy of this License; and 96 | 97 | (b) You must cause any modified files to carry prominent notices 98 | stating that You changed the files; and 99 | 100 | (c) You must retain, in the Source form of any Derivative Works 101 | that You distribute, all copyright, patent, trademark, and 102 | attribution notices from the Source form of the Work, 103 | excluding those notices that do not pertain to any part of 104 | the Derivative Works; and 105 | 106 | (d) If the Work includes a "NOTICE" text file as part of its 107 | distribution, then any Derivative Works that You distribute must 108 | include a readable copy of the attribution notices contained 109 | within such NOTICE file, excluding those notices that do not 110 | pertain to any part of the Derivative Works, in at least one 111 | of the following places: within a NOTICE text file distributed 112 | as part of the Derivative Works; within the Source form or 113 | documentation, if provided along with the Derivative Works; or, 114 | within a display generated by the Derivative Works, if and 115 | wherever such third-party notices normally appear. The contents 116 | of the NOTICE file are for informational purposes only and 117 | do not modify the License. You may add Your own attribution 118 | notices within Derivative Works that You distribute, alongside 119 | or as an addendum to the NOTICE text from the Work, provided 120 | that such additional attribution notices cannot be construed 121 | as modifying the License. 122 | 123 | You may add Your own copyright statement to Your modifications and 124 | may provide additional or different license terms and conditions 125 | for use, reproduction, or distribution of Your modifications, or 126 | for any such Derivative Works as a whole, provided Your use, 127 | reproduction, and distribution of the Work otherwise complies with 128 | the conditions stated in this License. 129 | 130 | 5. Submission of Contributions. Unless You explicitly state otherwise, 131 | any Contribution intentionally submitted for inclusion in the Work 132 | by You to the Licensor shall be under the terms and conditions of 133 | this License, without any additional terms or conditions. 134 | Notwithstanding the above, nothing herein shall supersede or modify 135 | the terms of any separate license agreement you may have executed 136 | with Licensor regarding such Contributions. 137 | 138 | 6. Trademarks. This License does not grant permission to use the trade 139 | names, trademarks, service marks, or product names of the Licensor, 140 | except as required for reasonable and customary use in describing the 141 | origin of the Work and reproducing the content of the NOTICE file. 142 | 143 | 7. Disclaimer of Warranty. Unless required by applicable law or 144 | agreed to in writing, Licensor provides the Work (and each 145 | Contributor provides its Contributions) on an "AS IS" BASIS, 146 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 147 | implied, including, without limitation, any warranties or conditions 148 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A 149 | PARTICULAR PURPOSE. You are solely responsible for determining the 150 | appropriateness of using or redistributing the Work and assume any 151 | risks associated with Your exercise of permissions under this License. 152 | 153 | 8. Limitation of Liability. In no event and under no legal theory, 154 | whether in tort (including negligence), contract, or otherwise, 155 | unless required by applicable law (such as deliberate and grossly 156 | negligent acts) or agreed to in writing, shall any Contributor be 157 | liable to You for damages, including any direct, indirect, special, 158 | incidental, or consequential damages of any character arising as a 159 | result of this License or out of the use or inability to use the 160 | Work (including but not limited to damages for loss of goodwill, 161 | work stoppage, computer failure or malfunction, or any and all 162 | other commercial damages or losses), even if such Contributor 163 | has been advised of the possibility of such damages. 164 | 165 | 9. Accepting Warranty or Additional Liability. While redistributing 166 | the Work or Derivative Works thereof, You may choose to offer, 167 | and charge a fee for, acceptance of support, warranty, indemnity, 168 | or other liability obligations and/or rights consistent with this 169 | License. However, in accepting such obligations, You may act only 170 | on Your own behalf and on Your sole responsibility, not on behalf 171 | of any other Contributor, and only if You agree to indemnify, 172 | defend, and hold each Contributor harmless for any liability 173 | incurred by, or claims asserted against, such Contributor by reason 174 | of your accepting any such warranty or additional liability. 175 | 176 | END OF TERMS AND CONDITIONS 177 | 178 | APPENDIX: How to apply the Apache License to your work. 179 | 180 | To apply the Apache License to your work, attach the following 181 | boilerplate notice, with the fields enclosed by brackets "[]" 182 | replaced with your own identifying information. (Don't include 183 | the brackets!) The text should be enclosed in the appropriate 184 | comment syntax for the file format. We also recommend that a 185 | file or class name and description of purpose be included on the 186 | same "printed page" as the copyright notice for easier 187 | identification within third-party archives. 188 | 189 | Copyright [yyyy] [name of copyright owner] 190 | 191 | Licensed under the Apache License, Version 2.0 (the "License"); 192 | you may not use this file except in compliance with the License. 193 | You may obtain a copy of the License at 194 | 195 | http://www.apache.org/licenses/LICENSE-2.0 196 | 197 | Unless required by applicable law or agreed to in writing, software 198 | distributed under the License is distributed on an "AS IS" BASIS, 199 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 200 | See the License for the specific language governing permissions and 201 | limitations under the License. 202 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # LiveStreaming-iOS 2 | 一步一步带着你从底层开始实现自己的iOS直播框架。 3 | 4 | 5 | ### demo1 6 | * 01-摄像头采集数据写入文件 7 | 8 | 本demo主要教大家如何采集音视频数据并且写入到文件
9 | 内容包含了开始采集视频音频,停止采集视频音频,以及如何切换摄像头,
10 | 如何创建文件写入对象。开始写入文件和结束写入文件。 11 | 12 | ### demo2 13 | * 02-GPUImage简单使用 14 | 15 | 本demo主要讲述使用GPUImage对一张图片做单个滤镜效果或者多个滤镜组合效果 16 | 17 | --------------------------------------------------------------------------------