Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit f9b80182 authored by Nipun Kwatra's avatar Nipun Kwatra
Browse files

Adding support for timelapse capture using still camera's takepicture.

Also moving entire implementation into a new class CameraSourceTimeLapse
which inherits from CameraSource.

For timelapse capture using still camera, we start a thread which runs a
loop in which it calls Camera::takePicture() and then sleeps until the next
frame should be captured.
The function dataCallback() handles the callback from the camera with the
raw image data. This function copies the data and creates an artificial
timestamp corresponding to one frame time ahead of the last encoded frame's
time stamp. It then calls dataCallbackTimestamp() of the base class which
will think that it recieved the frame from a video camera and proceed as usual.

For moving the implementation to the subclass CameraSourceTimeLapse, added a
few virtual functions to CameraSource, which do the current thing for the base
class, but specialized things for CameraSourceTimeLapse.
E.g. startCameraRecording() in the base class just calls mCamera->startRecording(),
while in CameraSourceTimeLapse it may start a thread for the still camera case.

Change-Id: Ib787f24bd2e1f41681513f0257e1c4ca10a2b4de
parent 2ef1cea4
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment