Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge branch 'develop' of github.com:openframeworks/openFrameworks in…

…to develop
  • Loading branch information...
commit 6f9c02fef3a6d201acb1b0a61e2fc343a376d1c2 2 parents fd57f41 + 9b842f3
@arturoc arturoc authored
View
19 changes.txt
@@ -246,11 +246,19 @@ PLATFORM SPECIFIC
/ java side is already checking resume is not called on start
## Mac OS X
- + added ofQTKit player and grabber
/ OpenFrameworks now works "out of the box" on 10.7+ by using QTKit for video grabbing & playback,
- removes reliance upon the 10.6 SDK which still requires QT7
- / more accurate frame time for new QTKit OS X video player
- / replaced NSLog usage with ofLog functions
+ / If compiling with the 10.6 SDK, the old Quicktime framework based players and grabbers are still included
+ ofVideoPlayer:
+ / uses Core Video and QTKit internally
+ + added support for getCurrentFrame() and setFrame() on videos with non-static framerates
+ + added support for more codecs through QTKit framework
+ + added support for direct-to-texture video rendering
+ + added option to enabled asynchronous seeking for non-blocking calls to setFrame()
+ ofVideoGrabber:
+ / uses Core Video and QTKit internally
+ + added ability to record videos to disk
+ + added support supports a wider range of video inputs, for example HDV over FireWire
+ - removed video setting dialog for 10.7+
## iOS
+ fixed/added antialiasing for iOS
@@ -339,7 +347,8 @@ EXAMPLES
/ updated easyCam example, now explains the reimplementation of ofEasyCam in greater detail
## Mac
- + added examples for OS X specific video player features: osxHighPerformanceVideoPlayer & osxVideoRecorder
+ + added osxVideoRecorder example demonstrating recording videos to disk on Mac OS X using the ofQTKitGrabber
+ + added osxHighPerformanceVideoPlayer demonstrating accelerated playback of HD videos on OS X using the ofQTKitPlayer
## iOS
+ moviePlayer example: added video player volume
View
2  libs/openFrameworks/ofMain.h
@@ -44,7 +44,9 @@
//--------------------------
// graphics
+#if !defined( TARGET_OF_IPHONE ) & !defined(TARGET_ANDROID)
#include "ofCairoRenderer.h"
+#endif
#include "ofGraphics.h"
#include "ofImage.h"
#include "ofPath.h"
View
1  libs/openFrameworks/video/ofQTKitMovieRenderer.h
@@ -59,7 +59,6 @@
@property (nonatomic, readonly) BOOL textureAllocated;
@property (nonatomic, readonly) GLuint textureID;
@property (nonatomic, readonly) GLenum textureTarget;
-@property (nonatomic, retain) NSArray* frameTimeValues;
- (NSDictionary *)pixelBufferAttributes;
View
31 libs/openFrameworks/video/ofQTKitMovieRenderer.m
@@ -49,7 +49,6 @@ @implementation QTKitMovieRenderer
@synthesize frameCount;
@synthesize justSetFrame;
@synthesize synchronousSeek;
-@synthesize frameTimeValues;
- (NSDictionary*) pixelBufferAttributes
{
@@ -127,7 +126,10 @@ - (BOOL) loadMovie:(NSString*)moviePath pathIsURL:(BOOL)isURL allowTexture:(BOOL
}
}
- self.frameTimeValues = [NSArray arrayWithArray:timeValues];
+ if(frameTimeValues != NULL){
+ [frameTimeValues release];
+ }
+ frameTimeValues = [[NSArray arrayWithArray:timeValues] retain];
frameCount = numFrames;
// frameStep = round((double)(movieDuration.timeValue/(double)(numFrames)));
@@ -225,7 +227,8 @@ - (void) dealloc
}
if(frameTimeValues != NULL){
- self.frameTimeValues = NULL;
+ [frameTimeValues release];
+ frameTimeValues = NULL;
}
if(synchronousSeekLock != nil){
@@ -567,7 +570,7 @@ - (void) setFrame:(NSInteger) frame
_movie.rate = 0;
}
//QTTime t = QTMakeTime(frame*frameStep, movieDuration.timeScale);
- QTTime t = QTMakeTime([[self.frameTimeValues objectAtIndex:frame%self.frameTimeValues.count] longLongValue], movieDuration.timeScale);
+ QTTime t = QTMakeTime([[frameTimeValues objectAtIndex:frame%frameTimeValues.count] longLongValue], movieDuration.timeScale);
QTTime startTime =[_movie frameStartTime:t];
QTTime endTime =[_movie frameEndTime:t];
// NSLog(@"calculated frame time %lld, frame start end [%lld, %lld]", t.timeValue, startTime.timeValue, endTime.timeValue);
@@ -651,16 +654,16 @@ - (void) synchronizeSeek
// http://stackoverflow.com/questions/3995949/how-to-write-objective-c-blocks-inline
- (NSInteger) frame
{
- return [self.frameTimeValues indexOfObject:[NSNumber numberWithLongLong:_movie.currentTime.timeValue]
- inSortedRange:NSMakeRange(0, self.frameTimeValues.count)
- options:NSBinarySearchingInsertionIndex
- usingComparator:^(id lhs, id rhs) {
- if ([lhs longLongValue] < [rhs longLongValue])
- return (NSComparisonResult)NSOrderedAscending;
- else if([lhs longLongValue] > [rhs longLongValue])
- return (NSComparisonResult)NSOrderedDescending;
- return (NSComparisonResult)NSOrderedSame;
- }];
+ return [frameTimeValues indexOfObject:[NSNumber numberWithLongLong:_movie.currentTime.timeValue]
+ inSortedRange:NSMakeRange(0, frameTimeValues.count)
+ options:NSBinarySearchingInsertionIndex
+ usingComparator:^(id lhs, id rhs) {
+ if ([lhs longLongValue] < [rhs longLongValue])
+ return (NSComparisonResult)NSOrderedAscending;
+ else if([lhs longLongValue] > [rhs longLongValue])
+ return (NSComparisonResult)NSOrderedDescending;
+ return (NSComparisonResult)NSOrderedSame;
+ }];
}
- (NSTimeInterval) duration
View
16 libs/openFrameworks/video/ofQTKitPlayer.mm
@@ -114,17 +114,15 @@
bPaused = _bPaused;
- if(isPlaying() == true) {
- NSAutoreleasePool* pool = [[NSAutoreleasePool alloc] init];
+ NSAutoreleasePool* pool = [[NSAutoreleasePool alloc] init];
- if (bPaused == true) {
- [moviePlayer setRate:0.0f];
- } else {
- [moviePlayer setRate:speed];
- }
+ if (bPaused) {
+ [moviePlayer setRate:0.0f];
+ } else {
+ [moviePlayer setRate:speed];
+ }
- [pool release];
- }
+ [pool release];
}
View
6 libs/openFrameworksCompiled/project/ios/CoreOF.xcconfig
@@ -9,7 +9,6 @@ HEADER_FMODEX = "$(OF_PATH)/libs/fmodex/include"
HEADER_GLEW = "$(OF_PATH)/libs/glew/include"
HEADER_FREEIMAGE = "$(OF_PATH)/libs/FreeImage/include"
HEADER_TESS2 = "$(OF_PATH)/libs/tess2/include"
-HEADER_CAIRO = "$(OF_PATH)/libs/cairo/include/cairo"
HEADER_RTAUDIO = "$(OF_PATH)/libs/rtaudio/include"
HEADER_GLU = "$(OF_PATH)/libs/glu/include_ios"
@@ -18,7 +17,6 @@ LIB_FREETYPE = "$(OF_PATH)/libs/freetype/lib/ios/freetype.a"
LIB_GLEW = "$(OF_PATH)/libs/glew/lib/osx/glew.a"
LIB_RTAUDIO = "$(OF_PATH)/libs/rtAudio/lib/osx/rtAudio.a"
LIB_TESS = "$(OF_PATH)/libs/tess2/lib/osx/tess2.a"
-LIB_CAIRO = "$(OF_PATH)/libs/cairo/lib/osx/cairo.a"
LIB_GLU = "$(OF_PATH)/libs/glu/lib/ios/glu.a"
LIB_FREEIMAGE_IPHONE = "$(OF_PATH)/libs/FreeImage/lib/ios/freeimage.a"
@@ -33,5 +31,5 @@ LIB_GLU_IPHONE = "$(OF_PATH)/libs/glu/lib/ios/glu-ios.a"
MISC_FLAGS = "-ObjC"
-OF_CORE_LIBS = $(MISC_FLAGS) $(LIB_FREETYPE) $(LIB_FREEIMAGE) $(LIB_FREEIMAGE_IPHONE) $(LIB_GLEW) $(LIB_CAIRO) $(LIB_POCOFOUNDATION_IPHONE) $(LIB_POCODATA_IPHONE) $(LIB_POCONET_IPHONE) $(LIB_POCOXML_IPHONE) $(LIB_POCOZIP_IPHONE) $(LIB_POCOUTIL_IPHONE) $(LIB_TESS_IPHONE) $(LIB_GLEW_IPHONE) $(LIB_CAIRO_IPHONE) $(LIB_FMODEX_IPHONE) $(LIB_RTAUDIO_IPHONE) $(LIB_GLU) $(LIB_GLU_IPHONE)
-OF_CORE_HEADERS = $(HEADER_OF) $(HEADER_OFXIPHONE) $(HEADER_OFXMULTITOUCH) $(HEADER_OFXACCELEROMETER) $(HEADER_POCO) $(HEADER_FREETYPE) $(HEADER_FREETYPE2) $(HEADER_FMODEX) $(HEADER_GLEW) $(HEADER_FREEIMAGE) $(HEADER_TESS2) $(HEADER_CAIRO) $(HEADER_RTAUDIO) $(HEADER_GLU)
+OF_CORE_LIBS = $(MISC_FLAGS) $(LIB_FREETYPE) $(LIB_FREEIMAGE) $(LIB_FREEIMAGE_IPHONE) $(LIB_GLEW) $(LIB_POCOFOUNDATION_IPHONE) $(LIB_POCODATA_IPHONE) $(LIB_POCONET_IPHONE) $(LIB_POCOXML_IPHONE) $(LIB_POCOZIP_IPHONE) $(LIB_POCOUTIL_IPHONE) $(LIB_TESS_IPHONE) $(LIB_GLEW_IPHONE) $(LIB_FMODEX_IPHONE) $(LIB_RTAUDIO_IPHONE) $(LIB_GLU) $(LIB_GLU_IPHONE)
+OF_CORE_HEADERS = $(HEADER_OF) $(HEADER_OFXIPHONE) $(HEADER_OFXMULTITOUCH) $(HEADER_OFXACCELEROMETER) $(HEADER_POCO) $(HEADER_FREETYPE) $(HEADER_FREETYPE2) $(HEADER_FMODEX) $(HEADER_GLEW) $(HEADER_FREEIMAGE) $(HEADER_TESS2) $(HEADER_RTAUDIO) $(HEADER_GLU)
Please sign in to comment.
Something went wrong with that request. Please try again.