diff options
author | Daniel Drake <dsd@laptop.org> | 2011-08-05 17:24:55 (GMT) |
---|---|---|
committer | Daniel Drake <dsd@laptop.org> | 2011-08-05 17:31:20 (GMT) |
commit | 8daca9741a0f2e1b9d9071a2e9c8e8f9ce071a6e (patch) | |
tree | c9ec67dbb5f166b16a4cde64edd4a900fdcd0f93 /constants.py | |
parent | 280547bd2ff79ea30b74708ced0cea66af7afe4f (diff) |
Release audio/video on visibility change (OLPC#10659)
When visibility is lost, stop recording, live feeds, countdowns, etc.
Allows multiple camera-using apps to run simultaenously.
This doesn't quite work correctly, having 2 Records open and switching
from one to the other doesn't work as expected. Perhaps the events
are being delivered without strict order, or not enough time is being
given to the old Record to release its resources before activating the
new one.
Diffstat (limited to 'constants.py')
-rw-r--r-- | constants.py | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/constants.py b/constants.py index 9b0ed4a..2e0f54c 100644 --- a/constants.py +++ b/constants.py @@ -11,10 +11,11 @@ TYPE_PHOTO = MODE_PHOTO TYPE_VIDEO = MODE_VIDEO TYPE_AUDIO = MODE_AUDIO -STATE_READY = 0 -STATE_RECORDING = 1 -STATE_PROCESSING = 2 -STATE_DOWNLOADING = 3 +STATE_INVISIBLE = 0 +STATE_READY = 1 +STATE_RECORDING = 2 +STATE_PROCESSING = 3 +STATE_DOWNLOADING = 4 MEDIA_INFO = {} MEDIA_INFO[TYPE_PHOTO] = { |