Emulator now allows fake camera to emulate both, back and front cameras at the same time.
Camera HAL is changed in this CL in order to support this.
Change-Id: I4dcf2d569bb0c6a3800b4a8da5edd4777b5a078a
The missing headers were being transitively included through a
Skia header which is being removed.
Change-Id: I6a5b26c1f1bb3ed4c65e7e39fff3b927cb14eabf
HAL_MODULE_INFO_SYM was declared as read-only, but
the struct is written to by libhardware. This causes
a segfault when -Wl,-z,relro is enabled.
Fixed.
Change-Id: I3a3e8366bc2468aef75a3480edd0b3e8fcfeafa5
Using fake camera implementation for WB/exposure, implement the same functionality
on frames comming from webcam emulator. Note that due to heavy computations that
are involved in implementing this, we will do all that math in the emulator
application in order to provide a decent performance.
Change-Id: Id6c37b472860674c91e6ca37522fc61f497515a3
Camera framework requires 352x288, and 320x240 frames for video preview and video
recording. If these dimensions are missing in camera properties the camera app
may abort when entering video mode, or start video recording.
Also truned off switching fake frames, leaving only the checker board.
(cherry picked from commit 6f00e7fc48)
Change-Id: Ic50225e1700ea3b04ae5445549548f2ffe4ae2df
Camera framework requires 352x288, and 320x240 frames for video preview and video
recording. If these dimensions are missing in camera properties the camera app
may abort when entering video mode, or start video recording.
Also truned off switching fake frames, leaving only the checker board.
Change-Id: I63d145c967f1ba83992141ec97700f094a9d53a7
Implement CAMERA_MSG_PREVIEW_FRAME callback
Also does better work detecting pixel format for video frames, depending on the
mode that camera is intended to be operated with.
Change-Id: Idb2dfc7c0a79e81eff58f83a14af769afc713096
Also does better work detecting pixel format for video frames, depending on the
mode that camera is intended to be operated with.
Change-Id: I352204b8d6d1a9e7857d77b6363de2bb5d5db0dd
Don't cofuse preview window with preview frames. Preview frames are relevant only
in panoramic mode that receives frames via CAMERA_MSG_PREVIEW_FRAME callback.
Change-Id: Ibecb345e43ba452856b8ca75449264d8d354a9d5
Sometimes framework chooses to override the default JPEG quality value (90), so we need to
respect that when compressing frame during picture taking.
Change-Id: Ic7ad8938d33d94d34ecd0b979e5c8c3e8246fd53
Apparently, video pixel format expected by the camera framework is YU12, and not YV12
as it was implemented.
Change-Id: Id33d8aa7f62f6e68276774ca2a7d25c04acd71cc
These two tasks (starting the camera device, and starting working thread that pulls frames
from the started camera device) should be clearly separated, and should not be combined in
one method (as it was with the 'startCapturing' method).
Change-Id: I779bee924d99d9a87257c6b76791545b76795e72
Holding an object lock while macking the callbacks cause deadlocks
due to reentrance to the callabck notifier.
Change-Id: I5f2780989798ebf5c5d7aab34ac233bb5952079d
When stopping the camera, the working thread should be stopped before sending
"stop" query to the emulator: we don't want "frame" queries to be floating around
while we're in the process of stopping the camera.
Change-Id: I16dc56ca1c2e304a07a074302001d2e27100f2ac
The code submitted here builds a camera.goldfish.so module that encapsulates a camera HAL.
The major components of the camera HAL implementation are:
* Generic HAL module implemented in emulated_camera_hal.cpp There is nothing much
to it: just exporting the required HAL header.
* EmulatedCameraFactory class that manages emulated cameras, and provides handling for
camera_module_methods_ methods. There is only one object of this class, that is statically
instantiated when camera.goldfish.so module is loaded.
* EmulatedCamera class that implements camera_device_ops_t API. Objects of this class are
instantiated during EmulatedCameraFactory construction, and they interact with objects
of EmulatedCameraDevice class to get frames.
* EmulatedCameraDevice class encapsulates an actual camera device. Objects of this class
are contained in EmulatedCameraDevice objects, and interact with them as required by the
API.
The fake camera implementation is shared between EmulatedFakeCamera, and EmulatedFakeCameraDevice
classes. They are pretty light. In fact, EmulatedFakeCamera is nothing more than just a
placeholder for EmulatedFakeCameraDevice instance, and EmulatedFakeCameraDevice does nothing
more, than just drawing a checker board with a bouncing square.
Other components / routines are minor: helpers, wrappers, etc. The code is heavily commented,
so there will be plenty of explanations between the lines.
Change-Id: I4463e14c255c6e3b1dcca17bed5f4efde32d9879