Coder Social home page Coder Social logo

ofxqtkitvideoplayer's People

Contributors

obviousjim avatar smallfly avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ofxqtkitvideoplayer's Issues

adding movieAttributes later on is (apparently?) not kosher on Lion

Allo again. I'm poking around with Quicktime X. If I left it the way it was, my app would crash.

For quicktime X support, I had to comment the following:

// frameCount = movieDuration.timeValue / frameStep;
// NSLog(@" movie has %d frames ", frameCount);

and

// self.volume = 1.0;
// self.loops = YES;

to get Quicktime X to load my movie files properly.
this is probably because (i'm assuming, anyway...) quicktime X wants you to perform these tasks in a callback once the movie is sufficiently loaded. I am working on a fix for those at the moment which involves NSNotifications that call movieLoadStateChanged. Also, to get quicktime X to load properly on Lion with the QTMovieOpenForPlaybackAttribute attribute, i had to declare it in the movieAttributes dictionary as soon as it is created. I'm not sure why this is. My current hacky workaround for Quicktime X support is as follows:

#ifdef MAC_OS_X_VERSION_10_6 || MAC_OS_X_VERSION_10_7

    if(self.useTexture && !self.usePixels){
        NSLog(@"osx 10.6 or 10.7 texture only, so loading quicktime X");
        NSMutableDictionary* movieAttributes = [NSDictionary dictionaryWithObjectsAndKeys:
                                                [NSURL fileURLWithPath:[moviePath stringByStandardizingPath]], QTMovieURLAttribute,
                                                [NSNumber numberWithBool:NO], QTMovieOpenAsyncOKAttribute,
                                                //[NSNumber numberWithBool:NO], QTMovieOpenAsyncRequiredAttribute,
                                                [NSNumber numberWithBool:YES], QTMovieOpenForPlaybackAttribute,
                                                nil];
        _movie = [[QTMovie alloc] initWithAttributes:movieAttributes 
                                               error: &error];
    }
    else{

        NSLog(@"osx 10.6 or 10.7, pixel buffer requested so no quicktime X");
         NSMutableDictionary* movieAttributes = [NSDictionary dictionaryWithObjectsAndKeys:
                                                [NSURL fileURLWithPath:[moviePath stringByStandardizingPath]], QTMovieURLAttribute,
                                                [NSNumber numberWithBool:NO], QTMovieOpenAsyncOKAttribute,
                                               // [NSNumber numberWithBool:NO], QTMovieOpenAsyncRequiredAttribute,
                                                [NSNumber numberWithBool:NO], QTMovieOpenForPlaybackAttribute,
                                                nil];
        _movie = [[QTMovie alloc] initWithAttributes:movieAttributes 
                                               error: &error];
    }
#endif

    #ifndef MAC_OS_X_VERSION_10_7
        #ifndef MAC_OS_X_VERSION_10_6
        NSLog(@"osx 10.x, no quicktime X");
        NSMutableDictionary* movieAttributes = [NSDictionary dictionaryWithObjectsAndKeys:
                                                [NSURL fileURLWithPath:[moviePath stringByStandardizingPath]], QTMovieURLAttribute,
                                                [NSNumber numberWithBool:NO], QTMovieOpenAsyncOKAttribute,
                                                //[NSNumber numberWithBool:NO], QTMovieOpenAsyncRequiredAttribute,
                                                [NSNumber numberWithBool:NO], QTMovieOpenForPlaybackAttribute,
                                                nil];
        _movie = [[QTMovie alloc] initWithAttributes:movieAttributes 
                                             error: &error];
        #endif
    #endif

I should also mention that #ifdef MAC_OS_X_VERSION_10_7 does not get called on my Lion system.
EDIT: i had to change my OF deployment target in Xcode, now it does.
My next step includes asynchronous loading support.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.