Browse files

Synchronous updating rework

  • Loading branch information...
1 parent 5a30c64 commit f636f66c87443d5c9ab9898d12a140d3a0450061 @obviousjim committed Aug 26, 2012
@@ -1,12 +1,11 @@
#include "testApp.h"
//High performance OS X Video Playback example
// This example shows how to use the OS X platform specific ofQTKitPlayer on its own
// without the cross platform ofVideoPlayer wrapper
// Apps you write in this way won't be cross platform,
-// but can be speedier for HD videos
+// but can be faster for HD videos
void testApp::setup(){
ofBackground(255, 255, 255);
@@ -19,15 +18,15 @@ void testApp::setup(){
- //# 2 Decode Modes. ---------------------------
+ //# 2 Decode Modes. -------------------------------
// If you don't need access to pixels and aren't using the ofQTKitPlayer inside of an ofVideoPlayer
// You can use QTKit's internal texture management system which is streamlined.
//Texture only is fastest, but no pixel access allowed
- //ofQTKitDecodeMode decodeMode = OF_QTKIT_DECODE_TEXTURE_ONLY;
+ ofQTKitDecodeMode decodeMode = OF_QTKIT_DECODE_TEXTURE_ONLY;
//pixels and texture together is faster than PIXEL_ONLY and manually upload textures.
+ //ofQTKitDecodeMode decodeMode = OF_QTKIT_DECODE_PIXELS_AND_TEXTURE;
fingerMovie.loadMovie("movies/", decodeMode);
@@ -26,8 +26,11 @@
BOOL useTexture;
BOOL usePixels;
BOOL useAlpha;
- BOOL synchronousScrub;
+ BOOL synchronousUpdate;
BOOL justSetFrame;
+ BOOL frameIsNew;
+ MovieDrawingCompleteUPP myDrawCompleteProc;
+ NSCondition* synchronousUpdateLock;
@property (nonatomic, readonly) NSSize movieSize;
@@ -37,11 +40,13 @@
@property (nonatomic, readonly) NSTimeInterval duration; //duration in seconds
@property (nonatomic, readonly) NSInteger frameCount; //total frames
@property (nonatomic, readonly) BOOL isFinished; //returns true if the movie is not looping and over
-@property (nonatomic, readwrite) BOOL justSetFrame;
-@property (nonatomic, readwrite) BOOL synchronousScrub;
+@property (readwrite) BOOL justSetFrame;
+@property (nonatomic, readwrite) BOOL synchronousUpdate;
@property (nonatomic, readwrite) float rate;
@property (nonatomic, readwrite) float volume;
+@property (nonatomic, readonly) CGFloat time;
+@property (nonatomic, readonly) long long timeValue;
@property (nonatomic, readwrite) CGFloat position; //set and get frame position by percent
@property (nonatomic, readwrite) NSInteger frame; //set and get frame position by percent
@property (nonatomic, readwrite) BOOL loops; //set and get loopstate
@@ -67,4 +72,10 @@
- (void)stepBackward;
- (void)gotoBeginning;
+- (void)frameAvailable:(CVImageBufferRef)image;
+- (void)frameFailed;
+//when synchronous update is turned on
+- (void)synchronizeUpdate;
Oops, something went wrong.

0 comments on commit f636f66

Please sign in to comment.