-
Notifications
You must be signed in to change notification settings - Fork 33
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
new test app demonstrates texture upload path from AVFoundation to GL textures when using AVFoundation and HapInAVFoundation framework
- Loading branch information
Showing
33 changed files
with
2,902 additions
and
0 deletions.
There are no files selected for viewing
58 changes: 58 additions & 0 deletions
58
HapInAVF Test App/Assets.xcassets/AppIcon.appiconset/Contents.json
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
{ | ||
"images" : [ | ||
{ | ||
"idiom" : "mac", | ||
"size" : "16x16", | ||
"scale" : "1x" | ||
}, | ||
{ | ||
"idiom" : "mac", | ||
"size" : "16x16", | ||
"scale" : "2x" | ||
}, | ||
{ | ||
"idiom" : "mac", | ||
"size" : "32x32", | ||
"scale" : "1x" | ||
}, | ||
{ | ||
"idiom" : "mac", | ||
"size" : "32x32", | ||
"scale" : "2x" | ||
}, | ||
{ | ||
"idiom" : "mac", | ||
"size" : "128x128", | ||
"scale" : "1x" | ||
}, | ||
{ | ||
"idiom" : "mac", | ||
"size" : "128x128", | ||
"scale" : "2x" | ||
}, | ||
{ | ||
"idiom" : "mac", | ||
"size" : "256x256", | ||
"scale" : "1x" | ||
}, | ||
{ | ||
"idiom" : "mac", | ||
"size" : "256x256", | ||
"scale" : "2x" | ||
}, | ||
{ | ||
"idiom" : "mac", | ||
"size" : "512x512", | ||
"scale" : "1x" | ||
}, | ||
{ | ||
"idiom" : "mac", | ||
"size" : "512x512", | ||
"scale" : "2x" | ||
} | ||
], | ||
"info" : { | ||
"version" : 1, | ||
"author" : "xcode" | ||
} | ||
} |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
#import <Cocoa/Cocoa.h> | ||
#import <VVBufferPool/VVBufferPool.h> | ||
#import <VVISFKit/VVISFKit.h> | ||
#import <HapInAVFoundation/HapInAVFoundation.h> | ||
#import <AVFoundation/AVFoundation.h> | ||
|
||
|
||
|
||
|
||
@interface HapInAVFAppDelegate : NSObject <NSApplicationDelegate> { | ||
IBOutlet NSWindow *window; | ||
IBOutlet VVBufferGLView *view; | ||
|
||
CVDisplayLinkRef displayLink; // this "drives" rendering | ||
NSOpenGLContext *sharedCtx; // GL contexts must be in the same sharegroup to share textures between them | ||
CVOpenGLTextureCacheRef texCache; | ||
|
||
AVPlayer *player; | ||
AVPlayerItem *playerItem; | ||
BOOL videoPlayerItemIsHap; | ||
AVPlayerItemVideoOutput *nativeAVFOutput; // used if the file being played back is supported natively by AVFoundation | ||
AVPlayerItemHapDXTOutput *hapOutput; // used if the file being played back has a hap track of some sort | ||
|
||
ISFGLScene *swizzleScene; // used to convert YCoCg (HapQ) and YCoCg+A (HapQ+A) to RGBA | ||
|
||
VVBuffer *lastRenderedBuffer; | ||
} | ||
|
||
|
||
|
||
- (BOOL) loadFileAtPath:(NSString *)n; | ||
- (BOOL) loadFileAtURL:(NSURL *)n; | ||
- (BOOL) loadAsset:(AVAsset *)n; | ||
|
||
- (void) renderCallback; | ||
|
||
- (VVBuffer *)allocBuffer; | ||
|
||
@end | ||
|
||
|
||
|
||
|
||
|
||
CVReturn displayLinkCallback(CVDisplayLinkRef displayLink, const CVTimeStamp *inNow, const CVTimeStamp *inOutputTime, CVOptionFlags flagsIn, CVOptionFlags *flagsOut, void *displayLinkContext); |
Oops, something went wrong.