Giter VIP home page Giter VIP logo

Comments (9)

bangnoise avatar bangnoise commented on August 21, 2024

OF version and platform?

from ofxhapplayer.

microcosm avatar microcosm commented on August 21, 2024

0.9.2 in OSX

from ofxhapplayer.

bangnoise avatar bangnoise commented on August 21, 2024

and works otherwise? ie you are on a 32-bit build?

from ofxhapplayer.

bangnoise avatar bangnoise commented on August 21, 2024

I'd try constructing the player on the thread - but ofxHapPlayer isn't thread-safe, you would have to lock around calls to it if you want to use it from both threads.

from ofxhapplayer.

microcosm avatar microcosm commented on August 21, 2024

Yes it works fine without the thread. 32 bit build.

I tried constructing the player in the thread and just omitting it entirely
from ofApp class, it gave me the same result, black screen.

I also tried running ofVideoPlayer in the thread instead of ofxHapPlayer.
That works fine. Perhaps it's something to do with the way video is drawn?
On Feb 13, 2016 18:35, "Tom Butterworth" [email protected] wrote:

I'd try constructing the player on the thread - but ofxHapPlayer isn't
thread-safe, you would have to lock around calls to it if you want to use
it from both threads.


Reply to this email directly or view it on GitHub
#16 (comment)
.

from ofxhapplayer.

bangnoise avatar bangnoise commented on August 21, 2024

In the interest of getting something workin for you - are you sure the threaded player is necessary? The point of Hap is that it's light on CPU usage.

from ofxhapplayer.

microcosm avatar microcosm commented on August 21, 2024

Thanks. The reason I'm using threads is because I want to delay playback for a precise number of milliseconds. The larger goal is to have several machines on a network play back sound and video clips in sync with each other. So I'm mixing ofxHapPlayer with ofxNetworkSync.

from ofxhapplayer.

bangnoise avatar bangnoise commented on August 21, 2024

I don't have time to look into this soon. QuickTime does not like any work happening across threads, so you will have to create the ofxHapPlayer (using new ofxHapPlayer()) and call all its methods on the thread. That will be complicated because getTexture() will do work in OpenGL which you will have to coordinate with the main thread - and then use that texture on the main thread.

I'm still not convinced this isn't overkill. On a reliable network I've had success using OSC to push frame numbers - see https://github.com/joanielemercier/MediaPlayer_server and https://github.com/joanielemercier/MediaPlayer_client - largely undocumented and for OF 0.8, but worked well.

from ofxhapplayer.

microcosm avatar microcosm commented on August 21, 2024

OK - I will see if ofVideoPlayer can't meet my needs, then branch out from there if needs be.

Thanks for taking the time, much appreciated!

from ofxhapplayer.

Related Issues (20)

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.