Commit Graph

27 Commits

Author SHA1 Message Date
Vladimir Chtchetkine
2a532ee388 Implement "takePicture"
With this CL the camera emulator is capable of taking pictures

Change-Id: I29feea0c75a78c619aaf854a5665a24afb507ba4
2011-09-15 18:24:32 -07:00
Vladimir Chtchetkine
49842cee05 Separate actual camera device start and frame delivery
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
2011-09-14 18:35:48 -07:00
Vladimir Chtchetkine
ba78a2f1d3 Fix locking issues in the callback notifier
Holding an object lock while macking the callbacks cause deadlocks
due to reentrance to the callabck notifier.

Change-Id: I5f2780989798ebf5c5d7aab34ac233bb5952079d
2011-09-14 14:24:03 -07:00
Vladimir Chtchetkine
4756fada1a Fix typos introduced during style adjustment
Change-Id: Ia9ca4849d4a410aea9d49d2c6246d36c4c7fc8f1
2011-09-14 13:56:48 -07:00
Vladimir Chtchetkine
4d47360672 Fix capture stopping
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
2011-09-14 07:06:23 -07:00
Vladimir Chtchetkine
16232484c7 Fix build
Change-Id: Ifb5dd0b11bd616ef5a5a1e79b510b00f1d55672a
2011-09-13 16:02:51 -07:00
Vladimir Chtchetkine
5467be2eef Refactored emulated camera HAL to comply with code style
Change-Id: If57b536ae6b1f9bad4213630488591a3b3cc9fdd
2011-09-13 14:35:25 -07:00
Vladimir Chtchetkine
33bda47528 Implements connection with the emulator
Change-Id: Ie3910a98e927f7b8ea556c403f8ced27e06bcdec
2011-09-13 09:44:32 -07:00
Vladimir Chtchetkine
b97c2f0b59 Fake camera implementation
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
2011-09-12 08:37:48 -07:00
Vladimir Chtchetkine
7c61dfc286 am dc6e4e64: am af0d8ed8: am 9a528ed9: Merge "Get rid of libqemu library."
* commit 'dc6e4e64de0036021dc4491ab0760d3aeb364019':
  Get rid of libqemu library.
2011-08-03 18:16:37 -07:00
Vladimir Chtchetkine
b2b6f2f9da Get rid of libqemu library.
Its implementation has been inlined in hardware/libhardware/include/hardware/qemu_pipe.h

Change-Id: I355764f87047c915ac43b85cd18bf0f27f06ede3
2011-08-03 09:10:14 -07:00
Ying Wang
6a42c746e5 Remove simulator conditionals.
Simulator is gone.

Change-Id: Ia4454bde6d16666830b553ec42e5c19359505103
2011-07-13 10:34:21 -07:00
David 'Digit' Turner
0ce5a57448 am c37aea7b: am ad41863c: am 3c84652d: Merge "emulator: Add libqemu static library to implement qemu pipes."
* commit 'c37aea7b46eef99555570e3e06de465d02e7312e':
  emulator: Add libqemu static library to implement qemu pipes.
2011-04-29 15:09:59 -07:00
David 'Digit' Turner
e1eea50214 emulator: Add libqemu static library to implement qemu pipes.
See hardware/libhardware/include/hardware/qemu_pipe.h for the API
implemented by the library. It enables very fast reads/writes between
the guest system and specific emulator services.

Define BUILD_LIBQEMU_TESTS=true in your environment to build the
test programs (a simple host ping-pong server, and a benchmark
guest program).

You can invoke them with:

1/ Testing TCP pipes:

   host:  test-libqemu-1 -tcp 8012
   guest: test-libqemu-2 -pipe tcp:8012

Alternatively

   guest: su
          test-libqemu-2 -tcp 8012

2/ Testing Unix pipes:

   host:  test-libqemu-1 -unix /tmp/libqemu-socket
   guest: test-libqemu-2 -pipe unix:/tmp/libqemu-socket

3/ Testing internal pingpong server (within the emulator)

   host:   /* nothing to do */
   guest:  test-libqemu-2

Change-Id: Ib50fc9cbee6b5f4581baca97412d6f69d4f84860
2011-04-28 16:48:15 +02:00
David 'Digit' Turner
de830eddbc am 62b21b41: am 832388de: am 13a0b81c: Merge "Revert 776bd3e46c2fb5c003ecec4fee99f01943876644"
* commit '62b21b41467dd8ebc4ce7518de8f4418389cf436':
  Revert 776bd3e46c
2011-04-14 07:42:08 -07:00
David 'Digit' Turner
a6e54e04a3 Revert 776bd3e46c
Unfortunately, we need to keep duplicate libraries under sdk/emulator/
to avoid breaking a few internal branches.

    commit 776bd3e46c
    Author: David 'Digit' Turner <digit@android.com>
    Date:   Thu Apr 7 10:58:07 2011 +0200

    emulator: Remove the global Make variable trick for emulator-specific system modules.

    Remove a sad trick that was used to smoothly move the platform-specific emulator
    modules from sdk/emulator/ to development/tools/emulator/system without creating
    build conflicts.

    Now that the sdk/ modules have been removed, we can get rid of the guard variable.

Change-Id: Id5c44a4160191d8ac9afcbbeeef7de0b9a5b0f6f
2011-04-14 14:06:05 +02:00
David 'Digit' Turner
9d62f6e437 am e40fb554: am 07dfa1b1: am 0ed88818: am cecd02c1: Merge "emulator: Remove the global Make variable trick for emulator-specific system modules."
* commit 'e40fb554a9bbb938fac2277ac965b01e2ef40051':
  emulator: Remove the global Make variable trick for emulator-specific system modules.
2011-04-11 17:32:02 -07:00
David 'Digit' Turner
776bd3e46c emulator: Remove the global Make variable trick for emulator-specific system modules.
Remove a sad trick that was used to smoothly move the platform-specific emulator
modules from sdk/emulator/ to development/tools/emulator/system without creating
build conflicts.

Now that the sdk/ modules have been removed, we can get rid of the guard variable.

Change-Id: I0261fcd6cdf6af7564106c5ab8d2b3bda001d567
2011-04-07 10:58:07 +02:00
Vladimir Chtchetkine
105b40da3f Merge "Fix build scripts for vbox_x86 target" 2011-04-04 09:40:35 -07:00
Vladimir Chtchetkine
3e254c17fd Fix build scripts for vbox_x86 target
Change-Id: I9a626711a887c26b0825d291ffa3f7400b728518
2011-04-01 08:27:02 -07:00
David Turner
5a4f0c40d4 am d56f61b3: am 201398b4: am 85d6342d: am 99d6295f: Merge "Enable lcd backlight in the emulator."
* commit 'd56f61b3fdd02cb4483a759e240180bac1dd23aa':
  Enable lcd backlight in the emulator.
2011-03-30 16:34:30 -07:00
David 'Digit' Turner
d6174475af am 74a30541: am 1ca79b34: am 8edebe1f: am 4712e4eb: Merge "qemud: disable debug traces"
* commit '74a30541a481ce598b61c2c3665020207c6351bd':
  qemud: disable debug traces
2011-03-30 16:34:17 -07:00
David Turner
99d6295f69 Merge "Enable lcd backlight in the emulator." 2011-03-28 07:04:33 -07:00
David 'Digit' Turner
5f64d75d1d qemud: disable debug traces
They're verbose and unuseful during normal usage.

Change-Id: Ia5e2fb89b0a4844ce911a735078efdafb56bc1b4
2011-03-24 17:14:44 +01:00
Tim Wan
eb02d8daa6 Enable lcd backlight in the emulator.
Adding a new lights.goldfish.so library to enable
lcd backlight in the emulator

Change-Id: I2a6c8af268859d7d30fd90b60ac2a0fe0d9625e8
2011-03-22 13:57:01 +01:00
Iliyan Malchev
1dcd97644a development: remove LOCAL_PRELINK_MODULE
Change-Id: I6ae5c92aba05c3991bda260c264de835244f7f3e
Signed-off-by: Iliyan Malchev <malchev@google.com>
2011-03-14 14:24:21 -07:00
David 'Digit' Turner
e59bd87056 emulator: Move platform-specific modules to development.git
This copies the platform-specific emulator modules from sdk.git into
development.git/tools/emulator/system/. Note the use of guard variables
to prevent clashes when the original modules are still in the tree.

The goal is to submit this and https://review.source.android.com/#change,21737,
then later remove the modules from sdk.git when we move the internal sdk branch
to the appropriate tools_rXXX branch.

Change-Id: I762d0efb72d93a935d96c4549f36029c258c3ef9
2011-03-11 16:38:28 +01:00