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

Rename write_now to motion_detected in docs #729

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions docs/recipes1.rst
Original file line number Diff line number Diff line change
Expand Up @@ -306,12 +306,12 @@ and the size of the ring buffer underlying the stream).
A typical use-case for this sort of storage is security applications where one
wishes to detect motion and only record to disk the video where motion was
detected. This example keeps 20 seconds of video in memory until the
``write_now`` function returns ``True`` (in this implementation this is random
but one could, for example, replace this with some sort of motion detection
algorithm). Once ``write_now`` returns ``True``, the script waits 10 more
seconds (so that the buffer contains 10 seconds of video from before the event,
and 10 seconds after) and writes the resulting video to disk before going back
to waiting:
``motion_detected`` function returns ``True`` (in this implementation this is
random but one could, for example, replace this with some sort of motion
detection algorithm). Once ``motion_detected`` returns ``True``, the script waits
10 more seconds (so that the buffer contains 10 seconds of video from before the
event, and 10 seconds after) and writes the resulting video to disk before going
back to waiting:

.. literalinclude:: examples/circular_record1.py

Expand Down