Skip to content

Commit

Permalink
Add a note about the buffering behavior of Timeline to DummyReader
Browse files Browse the repository at this point in the history
Using DummyReader with a custom cache with a Timeline can lead to
strange exceptions due to Timeline's buffering.  Therefore adding a
note to the DummyReader documentation about that.
  • Loading branch information
musteresel committed Jun 12, 2020
1 parent c29174f commit bec21b1
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions include/DummyReader.h
Expand Up @@ -53,6 +53,12 @@ namespace openshot
* A dummy reader can be created with any framerate or samplerate. This is useful in unit
* tests that need to test different framerates or samplerates.
*
* @note Timeline does buffering by requesting more frames than it
* strictly needs. Thus if you use this DummyReader with a custom
* cache in a Timeline, make sure it has enough
* frames. Specifically you need some frames after the last frame
* you plan to access through the Timeline.
*
* @code
* // Create cache object to store fake Frame objects
* CacheMemory cache;
Expand Down

0 comments on commit bec21b1

Please sign in to comment.