ufo-kit/libuca — pull request #44 by matze (2014-08-13 09:08:55+00:00)
Title: Finalize recording state policy

This change fixes and unifies handling of different "is-recording" states. First
of all there are potentially two different states: the priv->is_recording state
from the base class and some device-specific state. Device authors can override
the "is-recording" property to provide device-specific information. This change
sets the global recording state as follows:

1. uca_camera_is_recording returns the value of ::is-recording.

2. priv->is_recording is the default state that is returned for ::is-recording
and set after successfully calling uca_camera_start_recording and
uca_camera_stop_recording.

3. uca_camera_start_recording, uca_camera_stop_recording, uca_camera_trigger
use ::is-recording to determine how to proceed.

4. For performance reasons, uca_camera_grab relies on priv->is_recording.