I started a topic on how to layer as many videos as possible here.
I have advance a little on the code, and I am facing the following problems. I hope this thread would help to solve similar issues.
I am using Win7,32bits and a SSD drive.
First, I am using ofxHapPlayer. It inherit from ofVideoPlayer, but not all its method are implemented. For example, getIsVideoDone() is not. To bypass this, I am using isFrameNew().
The total speed (FPS) now is higher that the FPS of the videos, so it happens now and then that isFrameNew() returns 0. I implemented a counter, so once there are 5 equal frames in a row, it can be asumed that the video is over.
Let’s assume I have a total of 100 videos and I want to play 20 at the same time -just an assuption-. Each time a video played finished, a new, different video must start playing.
The implementation I am trying is the following:
When the program starts, I load a pool of 50 videos (.loadMovie()) and I start playing only 20(.play() and .update() and .draw()). Once one of those 20 videos ends (.close()), a new one is taken from the pool (.play() and .update() and .draw()).
I can see some glitches, blinks and artifact when a new video from the pool is stracted. Why can this be happening? Several videos trying to access to the pool sequently? -I am running everyhting on the same thread, so no simultaneous access is possible.
Next problem is how to refill the pool. I can set a minimum, so once 35 videos have been played -this is, less than the total of desired videos are available- it refills (.loadMovie()) its closed position with new videos from the SSD. I have experimenting similar problems -glitches, blinks etc…
Does anybody have a suggestion on how to optimize this accesses?
I think that the bottle neck here is the code and memory management, but is somebody thinks it is the hard drive, I am open to suggestions