Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Need to indicate load() is ongoing during background load #32

Open
rjx-ray opened this issue Jul 26, 2017 · 3 comments
Open

Need to indicate load() is ongoing during background load #32

rjx-ray opened this issue Jul 26, 2017 · 3 comments

Comments

@rjx-ray
Copy link

rjx-ray commented Jul 26, 2017

I'm working for Igloovision on updating a Windows app from OF 8.4 to 9.7
We want to use ofxHapPlayer as the default player, but if the movie is non playable we try other players.

I've switched to the libavformat branch and have found that isLoaded() is no longer true immediately after calling load(), I'm guessing because the load happens in a new thread?

Can I find out somehow if the load is in progress and wait for a result?
Is there any other way of testing whether the movie can be played or not?

@bangnoise
Copy link
Owner

Yep, loading happens in the background. This should be clearer, maybe we should add isLoading() or some such.

For the moment, if you have called load() and isLoaded() returns false and getError() returns an empty string, then you can assume it is loading. If you have called load() and getError() returns a non-empty string and isLoaded() returns false, then an error occurred during loading.

@bangnoise bangnoise changed the title Is there any way of telling if a movie is playable? Need to indicate load() is ongoing during background load Jul 26, 2017
@rjx-ray
Copy link
Author

rjx-ray commented Jul 26, 2017

Thanks for the quick response, I'll try your suggestion.

@rjx-ray
Copy link
Author

rjx-ray commented Jul 26, 2017

Alternatively, is there any capability to test the codec type before attempting to load?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants