openframeworks / openframeworks/openFrameworks

ofAVFoundationPlayer slow setPosition

Open
#4,538 2 comments 0 reactions 1 assignee View on GitHub

@i-n-g-o is already working on this.

Since Nov 9, 2015.

close core macOS section-video
Dominant language
C++
Stars
10.4k
Forks
2.6k
Avg merge
1d 21h
Merged PRs (30d)
9

Description

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

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.