ssue with video playing on raspberry pi. - i’m using ofVideoplayer to open a video file then a piece of code to select a frame to play to loop video back and forth. the whole app works fine but the video only refreshes to the screen when the gui i have built is shown… other parts of the display drawn to screen still update at the same frame rate. identical code on OSX works fine. have tried all I can think of to change or force updates, change draw order etc - any suggestions gratefully received.
//--------------------------------------------------------------
void ofApp::update(){
if (loopNumber>=loopMax){
this->loadNew();
}
//--clock updates
time_t t = time(0); // get time now
struct tm * now = localtime( & t );
clockSec = now->tm_sec;
// clockMin = now->tm_min;
clockMin = easedFrame % 60;
clockHrs = easedFrame/60;
// clockHrs = now->tm_hour;
clock.update(clockSec, clockMin, clockHrs);
float thisNow = ofGetElapsedTimef();
if (ofGetElapsedTimef() > endTime) {// start a loop left to right
initTime = ofGetElapsedTimef();
endTime = initTime + duration;
playForward = !playForward;
if (playForward){
startRange= 0;
endRange = movieDuration;
} else {
startRange= movieDuration;
endRange = 0;
loopNumber ++;
}
}
easedFrame=ofxeasing::map_clamp(thisNow, initTime, endTime, startRange, endRange, &ofxeasing::cubic::easeInOut);
momentMovie.setFrame(easedFrame);
momentMovie.update();
}
//--------------------------------------------------------------
void ofApp::draw(){
if (fade) xFade(); // if fade selected in gui then call xfade function
momentMovie.draw(0,0,800,480); //draw frame of movie
if ( showGui ) gui.draw();
if (showClock)clock.draw( clockRadius, clockPosLeft, clockPosTop );
}