Skip to content

Commit

Permalink
Re: #320
Browse files Browse the repository at this point in the history
Add a note regarding buffer starvation to the overlay images recipe.
  • Loading branch information
waveform80 committed Sep 29, 2016
1 parent a12c8de commit 59cb88e
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions picamera/renderers.py
Original file line number Diff line number Diff line change
Expand Up @@ -397,6 +397,13 @@ def update(self, source):
used to create the overlay. There is currently no method for changing
the size of an existing overlay (remove and recreate the overlay if you
require this).
.. note::
If you repeatedly update an overlay renderer, you must make sure
that you do so at a rate equal to, or slower than, the camera's
framerate. Going faster will rapidly starve the renderer's pool of
buffers leading to a runtime error.
"""
buf = self.renderer.inputs[0].pool.get_buffer()
buf.update(source)
Expand Down

0 comments on commit 59cb88e

Please sign in to comment.