I can’t seem to get any info from the loaded video until some indeterminate time after the call to vid.load(). It seems like the calling function has to exit before the video has any info about it’s duration, size etc. Even adding a Thread::Sleep() didn’t help (yes, I know that’s naughty).
Is this deliberate or a known issue?
Is there some callback system I haven’t found?
This code never finds a valid duration:
Result rsltN = newVideo.load(testFile);
if (rsltN.wasOk() && newVideo.isVideoOpen()) {
while(newVideo.getVideoDuration() <= 0.0){
DBG("video duration is " << newVideo.getVideoDuration());
}
}