Skip to content

ofAVFoundationPlayer slow setPosition #4538

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

Open
i-n-g-o opened this issue Nov 8, 2015 · 2 comments
Open

ofAVFoundationPlayer slow setPosition #4538

i-n-g-o opened this issue Nov 8, 2015 · 2 comments

Comments

@i-n-g-o
Copy link
Contributor

i-n-g-o commented Nov 8, 2015

calling setPosition() on ofAVFoundationPlayer is slow.
this is due to synchron disposal of resources (AVAssetReader).

disposing AVAssetReader on a backgroundThread (dispatch_async) would solve that issue, but has problems when called too quickly after each other. (in my case updating the position every 100ms works, but leaks memory (??!!) when calling every 50ms)

this needs further investigation.

fast-seek (async disposal) can be found in this branch:
https://github.com/i-n-g-o/openFrameworks/tree/ofAVFoundationPlayer_fast_seek

@i-n-g-o
Copy link
Contributor Author

i-n-g-o commented Nov 8, 2015

i see the memoryleaks with a 1080i50 file encoded with ProRes422

if ((ofGetElapsedTimeMillis() - timeLastLoaded > 50)) {
    fingerMovie.setPosition(ofRandomuf());
    timeLastLoaded = ofGetElapsedTimeMillis();
}

@dimitre
Copy link
Member

dimitre commented Mar 23, 2023

Potentially fixed by
#6797
#6791
one addresses the "infinite threads" issue and the other on some seek position issues.

@dimitre dimitre added the close label Mar 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants