Skip to content
This repository was archived by the owner on Jan 2, 2021. It is now read-only.

Commit 85481f7

Browse files
committed
Version 1.2
-Moved all images into an Asset Catelog -Updated video scaling so that it maintains aspect ratio -Switched to using MBProgressHUD for the status overlay
1 parent b869d36 commit 85481f7

29 files changed

Lines changed: 362 additions & 156 deletions

.gitmodules

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[submodule "MBProgressHUD"]
2+
path = MBProgressHUD
3+
url = https://github.com/jdg/MBProgressHUD

.travis.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
language: objective-c

GLVideoFilter.xcodeproj/project.pbxproj

Lines changed: 22 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,6 @@
77
objects = {
88

99
/* Begin PBXBuildFile section */
10-
B6198C4916C05C04000B9C73 /* Default-568h@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = B6198C4816C05C04000B9C73 /* Default-568h@2x.png */; };
11-
B6388B2C141AB58300DA02FB /* Icon-72.png in Resources */ = {isa = PBXBuildFile; fileRef = B6388B26141AB58300DA02FB /* Icon-72.png */; };
12-
B6388B2D141AB58300DA02FB /* Icon-Small-50.png in Resources */ = {isa = PBXBuildFile; fileRef = B6388B27141AB58300DA02FB /* Icon-Small-50.png */; };
13-
B6388B2E141AB58300DA02FB /* Icon-Small.png in Resources */ = {isa = PBXBuildFile; fileRef = B6388B28141AB58300DA02FB /* Icon-Small.png */; };
14-
B6388B2F141AB58300DA02FB /* Icon-Small@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = B6388B29141AB58300DA02FB /* Icon-Small@2x.png */; };
15-
B6388B30141AB58300DA02FB /* Icon.png in Resources */ = {isa = PBXBuildFile; fileRef = B6388B2A141AB58300DA02FB /* Icon.png */; };
16-
B6388B31141AB58300DA02FB /* Icon@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = B6388B2B141AB58300DA02FB /* Icon@2x.png */; };
1710
B6670DB413E9FD9F00AEF9EC /* QuadModel.m in Sources */ = {isa = PBXBuildFile; fileRef = B6670DB313E9FD9F00AEF9EC /* QuadModel.m */; };
1811
B66E3E3313E9E79C00D2ACF0 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = B66E3E3213E9E79C00D2ACF0 /* UIKit.framework */; };
1912
B66E3E3513E9E79C00D2ACF0 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = B66E3E3413E9E79C00D2ACF0 /* Foundation.framework */; };
@@ -28,6 +21,9 @@
2821
B69AAFE313FC965400B7125C /* CoreVideo.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = B69AAFE213FC965400B7125C /* CoreVideo.framework */; };
2922
B69AAFE513FC972A00B7125C /* CoreMedia.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = B69AAFE413FC972A00B7125C /* CoreMedia.framework */; };
3023
DF05AA2416E6614E00911782 /* Canny.fsh in Resources */ = {isa = PBXBuildFile; fileRef = DF05AA2316E6614700911782 /* Canny.fsh */; };
24+
DF0D63C318F78A3500D51089 /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DF0D63C218F78A3500D51089 /* CoreGraphics.framework */; };
25+
DF0D63D718F78DB000D51089 /* MBProgressHUD.m in Sources */ = {isa = PBXBuildFile; fileRef = DF0D63D618F78DB000D51089 /* MBProgressHUD.m */; };
26+
DF0D63E118F7947800D51089 /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = DF0D63E018F7947800D51089 /* Images.xcassets */; };
3127
DF143B7416EB317E006D35F9 /* SobelRGBComposite.fsh in Resources */ = {isa = PBXBuildFile; fileRef = DF143B7116EB316B006D35F9 /* SobelRGBComposite.fsh */; };
3228
DF143B7516EB317E006D35F9 /* yuv2rgb.fsh in Resources */ = {isa = PBXBuildFile; fileRef = DF143B7216EB316B006D35F9 /* yuv2rgb.fsh */; };
3329
DF143B7616EB317E006D35F9 /* blurSinglePass.fsh in Resources */ = {isa = PBXBuildFile; fileRef = DF143B7316EB316B006D35F9 /* blurSinglePass.fsh */; };
@@ -44,18 +40,9 @@
4440
DF9CAE8B1824C18800CE3945 /* blurYPass.fsh in Resources */ = {isa = PBXBuildFile; fileRef = DF9CAE891824C16800CE3945 /* blurYPass.fsh */; };
4541
DFC750F516E5C4340036CDD8 /* SobelBWComposite.fsh in Resources */ = {isa = PBXBuildFile; fileRef = DFC750F416E5C3E80036CDD8 /* SobelBWComposite.fsh */; };
4642
DFD3A59718EA9BF70032E6C4 /* CannyInverse.fsh in Resources */ = {isa = PBXBuildFile; fileRef = DFD3A59618EA9BF70032E6C4 /* CannyInverse.fsh */; };
47-
DFD5679C16E4A4EE003D5C96 /* Icon-72@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = DFD5679B16E4A4EE003D5C96 /* Icon-72@2x.png */; };
48-
DFD5679E16E4A550003D5C96 /* Icon-Small-50@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = DFD5679D16E4A550003D5C96 /* Icon-Small-50@2x.png */; };
4943
/* End PBXBuildFile section */
5044

5145
/* Begin PBXFileReference section */
52-
B6198C4816C05C04000B9C73 /* Default-568h@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Default-568h@2x.png"; sourceTree = "<group>"; };
53-
B6388B26141AB58300DA02FB /* Icon-72.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Icon-72.png"; sourceTree = "<group>"; };
54-
B6388B27141AB58300DA02FB /* Icon-Small-50.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Icon-Small-50.png"; sourceTree = "<group>"; };
55-
B6388B28141AB58300DA02FB /* Icon-Small.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Icon-Small.png"; sourceTree = "<group>"; };
56-
B6388B29141AB58300DA02FB /* Icon-Small@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Icon-Small@2x.png"; sourceTree = "<group>"; };
57-
B6388B2A141AB58300DA02FB /* Icon.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = Icon.png; sourceTree = "<group>"; };
58-
B6388B2B141AB58300DA02FB /* Icon@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Icon@2x.png"; sourceTree = "<group>"; };
5946
B6670DB213E9FD9F00AEF9EC /* QuadModel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = QuadModel.h; sourceTree = "<group>"; };
6047
B6670DB313E9FD9F00AEF9EC /* QuadModel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = QuadModel.m; sourceTree = "<group>"; };
6148
B66E3E2E13E9E79C00D2ACF0 /* GLVideoFilter.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = GLVideoFilter.app; sourceTree = BUILT_PRODUCTS_DIR; };
@@ -76,6 +63,10 @@
7663
B69AAFE213FC965400B7125C /* CoreVideo.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreVideo.framework; path = System/Library/Frameworks/CoreVideo.framework; sourceTree = SDKROOT; };
7764
B69AAFE413FC972A00B7125C /* CoreMedia.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreMedia.framework; path = System/Library/Frameworks/CoreMedia.framework; sourceTree = SDKROOT; };
7865
DF05AA2316E6614700911782 /* Canny.fsh */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.glsl; name = Canny.fsh; path = Shaders/Canny.fsh; sourceTree = "<group>"; };
66+
DF0D63C218F78A3500D51089 /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; };
67+
DF0D63D518F78DB000D51089 /* MBProgressHUD.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = MBProgressHUD.h; path = MBProgressHUD/MBProgressHUD.h; sourceTree = SOURCE_ROOT; };
68+
DF0D63D618F78DB000D51089 /* MBProgressHUD.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = MBProgressHUD.m; path = MBProgressHUD/MBProgressHUD.m; sourceTree = SOURCE_ROOT; };
69+
DF0D63E018F7947800D51089 /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Images.xcassets; sourceTree = "<group>"; };
7970
DF143B7116EB316B006D35F9 /* SobelRGBComposite.fsh */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.glsl; name = SobelRGBComposite.fsh; path = Shaders/SobelRGBComposite.fsh; sourceTree = "<group>"; };
8071
DF143B7216EB316B006D35F9 /* yuv2rgb.fsh */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.glsl; name = yuv2rgb.fsh; path = Shaders/yuv2rgb.fsh; sourceTree = "<group>"; };
8172
DF143B7316EB316B006D35F9 /* blurSinglePass.fsh */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.glsl; name = blurSinglePass.fsh; path = Shaders/blurSinglePass.fsh; sourceTree = "<group>"; };
@@ -92,15 +83,14 @@
9283
DF9CAE891824C16800CE3945 /* blurYPass.fsh */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.glsl; name = blurYPass.fsh; path = Shaders/blurYPass.fsh; sourceTree = "<group>"; };
9384
DFC750F416E5C3E80036CDD8 /* SobelBWComposite.fsh */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.glsl; name = SobelBWComposite.fsh; path = Shaders/SobelBWComposite.fsh; sourceTree = "<group>"; };
9485
DFD3A59618EA9BF70032E6C4 /* CannyInverse.fsh */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.glsl; name = CannyInverse.fsh; path = Shaders/CannyInverse.fsh; sourceTree = "<group>"; };
95-
DFD5679B16E4A4EE003D5C96 /* Icon-72@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Icon-72@2x.png"; sourceTree = "<group>"; };
96-
DFD5679D16E4A550003D5C96 /* Icon-Small-50@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Icon-Small-50@2x.png"; sourceTree = "<group>"; };
9786
/* End PBXFileReference section */
9887

9988
/* Begin PBXFrameworksBuildPhase section */
10089
B66E3E2B13E9E79C00D2ACF0 /* Frameworks */ = {
10190
isa = PBXFrameworksBuildPhase;
10291
buildActionMask = 2147483647;
10392
files = (
93+
DF0D63C318F78A3500D51089 /* CoreGraphics.framework in Frameworks */,
10494
B66E3E3313E9E79C00D2ACF0 /* UIKit.framework in Frameworks */,
10595
B66E3E3513E9E79C00D2ACF0 /* Foundation.framework in Frameworks */,
10696
B66E3E3713E9E79C00D2ACF0 /* GLKit.framework in Frameworks */,
@@ -114,22 +104,6 @@
114104
/* End PBXFrameworksBuildPhase section */
115105

116106
/* Begin PBXGroup section */
117-
B6388B25141AB58300DA02FB /* Images */ = {
118-
isa = PBXGroup;
119-
children = (
120-
B6198C4816C05C04000B9C73 /* Default-568h@2x.png */,
121-
B6388B26141AB58300DA02FB /* Icon-72.png */,
122-
DFD5679B16E4A4EE003D5C96 /* Icon-72@2x.png */,
123-
B6388B27141AB58300DA02FB /* Icon-Small-50.png */,
124-
DFD5679D16E4A550003D5C96 /* Icon-Small-50@2x.png */,
125-
B6388B28141AB58300DA02FB /* Icon-Small.png */,
126-
B6388B29141AB58300DA02FB /* Icon-Small@2x.png */,
127-
B6388B2A141AB58300DA02FB /* Icon.png */,
128-
B6388B2B141AB58300DA02FB /* Icon@2x.png */,
129-
);
130-
path = Images;
131-
sourceTree = "<group>";
132-
};
133107
B66E3E2313E9E79C00D2ACF0 = {
134108
isa = PBXGroup;
135109
children = (
@@ -150,6 +124,7 @@
150124
B66E3E3113E9E79C00D2ACF0 /* Frameworks */ = {
151125
isa = PBXGroup;
152126
children = (
127+
DF0D63C218F78A3500D51089 /* CoreGraphics.framework */,
153128
B69AAFE413FC972A00B7125C /* CoreMedia.framework */,
154129
B69AAFE213FC965400B7125C /* CoreVideo.framework */,
155130
B69AAFDF13FC961F00B7125C /* AVFoundation.framework */,
@@ -171,6 +146,9 @@
171146
B6670DB313E9FD9F00AEF9EC /* QuadModel.m */,
172147
B66E3E4A13E9E79C00D2ACF0 /* FilterViewController.h */,
173148
B66E3E4B13E9E79C00D2ACF0 /* FilterViewController.m */,
149+
DF0D63D518F78DB000D51089 /* MBProgressHUD.h */,
150+
DF0D63D618F78DB000D51089 /* MBProgressHUD.m */,
151+
DF0D63E018F7947800D51089 /* Images.xcassets */,
174152
B66E3E3B13E9E79C00D2ACF0 /* Supporting Files */,
175153
);
176154
path = GLVideoFilter;
@@ -181,7 +159,6 @@
181159
children = (
182160
DF2BE98616E69BE000FF0C90 /* StoryBoard_iPhone.storyboard */,
183161
DF2BE98816E69BFC00FF0C90 /* StoryBoard_iPad.storyboard */,
184-
B6388B25141AB58300DA02FB /* Images */,
185162
B66E3E3C13E9E79C00D2ACF0 /* GLVideoFilter-Info.plist */,
186163
B66E3E4213E9E79C00D2ACF0 /* GLVideoFilter-Prefix.pch */,
187164
B66E3E4013E9E79C00D2ACF0 /* main.m */,
@@ -296,20 +273,12 @@
296273
DF05AA2416E6614E00911782 /* Canny.fsh in Resources */,
297274
DFC750F516E5C4340036CDD8 /* SobelBWComposite.fsh in Resources */,
298275
DF59484016E5BB0900C16079 /* passthrough.fsh in Resources */,
276+
DF0D63E118F7947800D51089 /* Images.xcassets in Resources */,
299277
DF59483E16E5B91E00C16079 /* quadPassthrough.vsh in Resources */,
300278
DF93BCCA16E4983C00C062FC /* SobelBW.fsh in Resources */,
301279
B66E3E4713E9E79C00D2ACF0 /* Sobel.fsh in Resources */,
302280
B66E3E4913E9E79C00D2ACF0 /* quadInvertY.vsh in Resources */,
303-
B6388B2C141AB58300DA02FB /* Icon-72.png in Resources */,
304-
DFD5679C16E4A4EE003D5C96 /* Icon-72@2x.png in Resources */,
305-
B6388B2E141AB58300DA02FB /* Icon-Small.png in Resources */,
306-
B6388B2F141AB58300DA02FB /* Icon-Small@2x.png in Resources */,
307-
B6388B2D141AB58300DA02FB /* Icon-Small-50.png in Resources */,
308-
DFD5679E16E4A550003D5C96 /* Icon-Small-50@2x.png in Resources */,
309-
B6388B30141AB58300DA02FB /* Icon.png in Resources */,
310-
B6388B31141AB58300DA02FB /* Icon@2x.png in Resources */,
311281
DFD3A59718EA9BF70032E6C4 /* CannyInverse.fsh in Resources */,
312-
B6198C4916C05C04000B9C73 /* Default-568h@2x.png in Resources */,
313282
DF2BE98716E69BE000FF0C90 /* StoryBoard_iPhone.storyboard in Resources */,
314283
DF2BE98916E69BFC00FF0C90 /* StoryBoard_iPad.storyboard in Resources */,
315284
);
@@ -324,6 +293,7 @@
324293
files = (
325294
B66E3E4113E9E79C00D2ACF0 /* main.m in Sources */,
326295
B66E3E4513E9E79C00D2ACF0 /* AppDelegate.m in Sources */,
296+
DF0D63D718F78DB000D51089 /* MBProgressHUD.m in Sources */,
327297
B66E3E4C13E9E79C00D2ACF0 /* FilterViewController.m in Sources */,
328298
B6670DB413E9FD9F00AEF9EC /* QuadModel.m in Sources */,
329299
);
@@ -395,31 +365,39 @@
395365
B66E3E5613E9E79C00D2ACF0 /* Debug */ = {
396366
isa = XCBuildConfiguration;
397367
buildSettings = {
368+
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
369+
ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage;
398370
CODE_SIGN_IDENTITY = "iPhone Developer";
399371
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
400372
GCC_PRECOMPILE_PREFIX_HEADER = YES;
401373
GCC_PREFIX_HEADER = "GLVideoFilter/GLVideoFilter-Prefix.pch";
402374
"GCC_THUMB_SUPPORT[arch=armv6]" = "";
403375
INFOPLIST_FILE = "$(SRCROOT)/GLVideoFilter/GLVideoFilter-Info.plist";
404376
IPHONEOS_DEPLOYMENT_TARGET = 6.0;
377+
LIBRARY_SEARCH_PATHS = "$(inherited)";
405378
PRODUCT_NAME = GLVideoFilter;
406379
PROVISIONING_PROFILE = "";
380+
USER_HEADER_SEARCH_PATHS = "";
407381
WRAPPER_EXTENSION = app;
408382
};
409383
name = Debug;
410384
};
411385
B66E3E5713E9E79C00D2ACF0 /* Release */ = {
412386
isa = XCBuildConfiguration;
413387
buildSettings = {
388+
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
389+
ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage;
414390
CODE_SIGN_IDENTITY = "iPhone Developer";
415391
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
416392
GCC_PRECOMPILE_PREFIX_HEADER = YES;
417393
GCC_PREFIX_HEADER = "GLVideoFilter/GLVideoFilter-Prefix.pch";
418394
"GCC_THUMB_SUPPORT[arch=armv6]" = "";
419395
INFOPLIST_FILE = "$(SRCROOT)/GLVideoFilter/GLVideoFilter-Info.plist";
420396
IPHONEOS_DEPLOYMENT_TARGET = 6.0;
397+
LIBRARY_SEARCH_PATHS = "$(inherited)";
421398
PRODUCT_NAME = GLVideoFilter;
422399
PROVISIONING_PROFILE = "";
400+
USER_HEADER_SEARCH_PATHS = "";
423401
WRAPPER_EXTENSION = app;
424402
};
425403
name = Release;

GLVideoFilter/FilterViewController.h

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
#import <GLKit/GLKit.h>
33
#import <AVFoundation/AVFoundation.h>
44
#import "QuadModel.h"
5+
#import "MBProgressHUD.h"
56

67
// Uniform index.
78
enum
@@ -72,8 +73,12 @@ typedef struct shaderType {
7273
} shader_t;
7374

7475

75-
@interface FilterViewController : GLKViewController <AVCaptureVideoDataOutputSampleBufferDelegate> {
76+
@interface FilterViewController : GLKViewController <AVCaptureVideoDataOutputSampleBufferDelegate, MBProgressHUDDelegate> {
7677

78+
MBProgressHUD *HUD;
79+
UIImage *lockedIcon;
80+
UIImage *unlockedIcon;
81+
7782
shader_t _YUVtoRGB;
7883
shader_t _blurSinglePass;
7984
shader_t _blurTwoPass[2];
@@ -123,12 +128,8 @@ typedef struct shaderType {
123128
AVCaptureSession *_session;
124129
CVOpenGLESTextureCacheRef _videoTextureCache;
125130
GLKVector2 _texelSize;
126-
127131
}
128132

129-
130-
@property (weak, nonatomic) IBOutlet UILabel *statusLabel;
131-
132133
- (IBAction)tapGestureRecgonizer:(UITapGestureRecognizer *)sender;
133134
- (IBAction)swipeGestureRecognizer:(UISwipeGestureRecognizer *)sender;
134135
- (void)cleanUpTextures;

0 commit comments

Comments
 (0)