This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/sh | |
| export NDK=~/Apps/AndroidSDK/ndk-bundle # Change me | |
| export JNILIBS_DIR=../../app/src/main/jniLibs # Change me | |
| export INCLUDE_DIR=../../app/src/main/cpp/libopenh264 # Change me | |
| export DOWNLOAD_URL=https://github.com/cisco/openh264/archive/master.zip | |
| mkdir -p tmp | |
| ln -sf $NDK/prebuilt/linux-x86_64/bin/yasm tmp/nasm | |
| export PATH=$(pwd)/tmp:$PATH |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // | |
| // headphones-detect.c | |
| // Kyle Neideck, [email protected] | |
| // | |
| // Compile with: | |
| // clang -framework CoreAudio -framework CoreFoundation -o headphones-detect headphones-detect.c | |
| // | |
| // Runs a command when headphones are plugged in to or unplugged from the | |
| // built-in audio device. | |
| // |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* | |
| * Copyright (C) 2011 Michael Dippery <[email protected]> | |
| * | |
| * Permission is hereby granted, free of charge, to any person obtaining a copy | |
| * of this software and associated documentation files (the "Software"), to deal | |
| * in the Software without restriction, including without limitation the rights | |
| * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
| * copies of the Software, and to permit persons to whom the Software is | |
| * furnished to do so, subject to the following conditions: | |
| * |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #import <UIKit/UIKit.h> | |
| #import <ImageIO/ImageIO.h> | |
| #import <MobileCoreServices/MobileCoreServices.h> | |
| static UIImage *frameImage(CGSize size, CGFloat radians) { | |
| UIGraphicsBeginImageContextWithOptions(size, YES, 1); { | |
| [[UIColor whiteColor] setFill]; | |
| UIRectFill(CGRectInfinite); | |
| CGContextRef gc = UIGraphicsGetCurrentContext(); | |
| CGContextTranslateCTM(gc, size.width / 2, size.height / 2); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @implementation UIImage (scale) | |
| /** | |
| * Scales an image to fit within a bounds with a size governed by | |
| * the passed size. Also keeps the aspect ratio. | |
| * | |
| * Switch MIN to MAX for aspect fill instead of fit. | |
| * | |
| * @param newSize the size of the bounds the image must fit within. | |
| * @return a new scaled image. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #import <Foundation/Foundation.h> | |
| #import <AVFoundation/AVFoundation.h> | |
| #import "GPUImageOpenGLESContext.h" | |
| #import "GPUImageOutput.h" | |
| #import "TPCircularBuffer.h" | |
| #ifndef max | |
| #define max( a, b ) ( ((a) > (b)) ? (a) : (b) ) | |
| #endif |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #import <GPUImage/GPUImage.h> | |
| #import "GPUImageFourInputFilter.h" | |
| @interface GPUImageFiveInputFilter : GPUImageFourInputFilter | |
| { | |
| GPUImageFramebuffer *fifthInputFramebuffer; | |
| GLint filterFifthTextureCoordinateAttribute; | |
| GLint filterInputTextureUniform5; | |
| GPUImageRotationMode inputRotation5; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #import <Foundation/Foundation.h> | |
| #import <AVFoundation/AVFoundation.h> | |
| #import "GPUImageOpenGLESContext.h" | |
| #import "GPUImageOutput.h" | |
| /** Protocol for getting Movie played callback. | |
| */ | |
| @protocol GPUImageMovieDelegate <NSObject> | |
| - (void)didCompletePlayingMovie; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #import <AVFoundation/AVFoundation.h> | |
| #import "GPUImageLayer.h" | |
| #import "GPUImageOutput.h" | |
| #import "GPUImageFilter.h" | |
| @interface GPUImageLayer() { | |
| GPUImageFramebuffer *inputFramebufferForDisplay; | |
| GLProgram *displayProgram; | |
| GLint displayPositionAttribute, displayTextureCoordinateAttribute; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #import "ColorDetectVC.h" | |
| @interface ColorDetectVC () | |
| { | |
| GPUImageVideoCamera *videoCamera; | |
| GPUImageFilter *rotationFilter; | |
| GPUImageView *filteredVideoView; | |
| GPUImageRawData *positionRawData; | |
| } | |
| @end |
NewerOlder