jvcleave / ofxOMXPlayer

OpenMax accelerated video player for openFrameworks on the Raspberry Pi 0-3. Does not work with RPI4
GNU General Public License v2.0
180 stars 61 forks source link

onVideoLoop not called #136

Closed neilmendoza closed 5 years ago

neilmendoza commented 5 years ago

onVideoLoop isn't called if I add my own listener. Might get some time this week to work out why...

jvcleave commented 5 years ago

are you adding it via ofxOMXPlayerSettings or later?

neilmendoza commented 5 years ago

Yes, I'm adding it using ofxOMXPlayerSettings.

jvcleave commented 5 years ago

so engineNeedsRestart only gets set to true when the file is a .h264 file or a network stream. I think this could be solved for the most typical cases just by moving this block above or below

https://github.com/jvcleave/ofxOMXPlayer/blob/master/src/ofxOMXPlayer.cpp#L319

jvcleave commented 5 years ago

this seemed to work for me - haven't tried a network stream yet

https://github.com/jvcleave/ofxOMXPlayer/commit/3abddf039af83d09f00e01db1841f48f693bd561

neilmendoza commented 5 years ago

Great, thanks!

jvcleave commented 5 years ago

network stream seems to work as well so closing :)