75 Commits

Author SHA1 Message Date
Chih-Chung Chang
e86ae1bed1 Still do dump() if we cannot get mServiceLock for a while. 2010-03-05 15:21:02 -08:00
Chih-Chung Chang
d7381a199b Fix the rgb to yuv422sp conversion. The order of uv is different from the
original version, but it should be ok as the original Y,Cb,Cr are all incorrect.
2010-02-18 14:02:56 -08:00
Mathias Agopian
5a48712501 fix [2447659] fix improper usage of the YCbCr_420_SP format 2010-02-16 20:45:21 -08:00
Mathias Agopian
8f2423e8f3 get rid off the YUV formats at the libui layer 2010-02-16 17:33:37 -08:00
Mathias Agopian
000479f9e3 split libsurfaceflinger_client and libcamera_client out of libui 2010-02-11 13:16:22 -08:00
Andreas Huber
2564300936 API Extension: Support for optionally specifying a map of extra request headers when specifying the uri of media data to be played.
related-to-bug: 2393577

Original change by Andrei Popescu <andreip@google.com>
2010-01-28 11:52:43 -08:00
Chih-Chung Chang
d1d7706fce Add support for setting camera display orientation. 2010-01-26 11:07:07 -08:00
Chih-Chung Chang
e1ceec234c Add an orientation parameter for overlay, so we can do camera preview in portrait mode. 2010-01-21 20:20:08 -08:00
Joe Onorato
f5d95cbc1a less log spew 2010-01-08 15:46:24 -05:00
Dave Sparks
c95a176d6f Remove some logging from camera operations. Bug 2346606. 2010-01-04 08:55:04 -08:00
Doug Kwan
a493294753 Add missing library in linker option. Currently the library is used by the
executable but not specified.  It is included via dependency of another shared
object.
2009-12-09 16:32:04 -08:00
Android (Google) Code Review
54f32f562b Merge change I5ff64f6f into eclair-mr2
* changes:
  Add CameraServiceTest.
2009-12-02 02:48:40 -08:00
Eric Laurent
5e392e2b02 am bb3bb57a: Merge change I524dc046 into eclair
Merge commit 'bb3bb57a6330f71323fcd7e93e88dbdab55daec3' into eclair-mr2

* commit 'bb3bb57a6330f71323fcd7e93e88dbdab55daec3':
  Fix issue 2192673: Music Pausing Even when notifications are set to silent.
2009-12-01 17:04:24 -08:00
Eric Laurent
524dc046b1 Fix issue 2192673: Music Pausing Even when notifications are set to silent.
Do not play ringtones, notifications or camera sounds if ringer mode is silent.
2009-11-27 05:07:55 -08:00
Owen Lin
d82f452fdc Set more camera parameters initial values.
We will need those values for new camera framework. And change the canned jpeg
image to match the new width and height setting.

Change-Id: I49f8fb63d2b859b9e9f1c5d27657a10203315bb6
2009-11-27 12:52:32 +08:00
Chih-Chung Chang
5b0fc3d920 Add CameraServiceTest. 2009-11-13 12:50:58 +08:00
Dave Sparks
05fd0df0f3 Fix potential deadlock in stopPreview/stopRecord.
Some camera HALs spin up a preview thread and need to wait for
the thread to exit. This can create a potential deadlock. In
stopPreview, we take the main lock. If a preview callback occurs
while the lock is held, the preview thread will block. If the
camera HAL is waiting for the preview thread to exit, this will
cause a deadlock.

This patch breaks out the preview buffer heap into a separate
mutex. This mutex is never held when the main lock is held, thus
preventing the deadlock from occuring.
2009-11-10 17:08:08 -08:00
Dave Sparks
c8093c1128 Hold a lock while we access the preview heap.
copyFrameAndPostCopiedFrame was not holding a lock while it accessed
the preview heap. If the client process is torn down while the heap
is accessed, the memcpy could access memory that was deallocated.

This patch creates a local sp reference to the preview heap while
holding the lock, then releases the lock. This should prevent the
heap from being pulled out from underneath us.
2009-11-06 11:47:13 -08:00
Wu-cheng Li
4cb04c4654 Use image rect information to display zoomed picture. 2009-10-29 13:20:26 +08:00
Dave Sparks
dd158c9a90 Don't callback on NULL client. Bug 2180510.
We weren't checking to see if there was a valid camera client when
calling the notify callback function. Now we grab a strong pointer
before the callback to guarantee that the client is not destroyed
before we complete the callback. This change also fixes other
places in the code where we weren't holding a local strong pointer.
2009-10-15 15:18:08 -07:00
Dave Sparks
2133640028 Retry overlay create if it fails. Bug 2153980.
Occasionally we see references to the overlay hanging around long
enough to cause problems in applications when they tried to destroy
the overlay and re-create it. This patch causes the camera HAL to
retry the overlay creation call if it fails every 20ms up to 50
times before it gives up.
2009-10-07 19:22:02 -07:00
Wu-cheng Li
36f68b8f24 Add zoom functions and sendCommand.
b2060030
2009-10-06 13:25:10 -07:00
Chih-Chung Chang
244f8c2636 Fix 2083478: Camera needs an auto-focus cancel API
Change-Id: I13bda991b32aee47e82b5cf9d43b3021c416a9a2
2009-09-15 18:29:03 +08:00
James Dong
6085b4e7b5 Pass return code from Camera HAL for setParameters().
bug 2116866
2009-09-13 17:12:35 -07:00
Snigdha Sinha
fd98ff8b39 CameraService change for OVERLAY_FORMAT_DEFAULT
Originally from: https://partner.source.android.com/g/#change,829
2009-09-08 18:28:15 -07:00
Benny Wong
da83f4674a Modified the camera HAL interface to use the same generic callback architecture as camera services 2009-08-13 10:46:28 -07:00
Marco Nelissen
ae7f3c5dcb In the simulator, make sure that the preview thread is a Java thread,
since we won't be going through the binder in single process mode.
2009-08-13 09:24:47 -07:00
Eric Laurent
a553c25b33 Fix issue 1795088 Improve audio routing code
Initial commit for review.
Integrated comments after patch set 1 review.
Fixed lockup in AudioFlinger::ThreadBase::exit()
Fixed lockup when playing tone with AudioPlocyService startTone()
2009-07-23 06:03:39 -07:00
Benny Wong
6d2090e214 Hardware overlay support
Enable hardware overlay support for camera and video playback use cases
2009-07-16 14:31:20 -07:00
Dave Sparks
6698d16b95 resolved conflicts for merge of 04c7d0f8 to master 2009-07-08 17:26:05 -07:00
Dave Sparks
59c1a93529 Add timestamps to video frames to improve A/V sync.
Bug 1927069.
2009-07-08 15:59:25 -07:00
Wu-cheng Li
0795684839 am b8a10fe4: Allow setPreviewDisplay after startPreview.
Merge commit 'b8a10fe45657f2dcc50cae8a06805f8438a6937e'

* commit 'b8a10fe45657f2dcc50cae8a06805f8438a6937e':
  Allow setPreviewDisplay after startPreview.
2009-07-01 11:20:08 -07:00
Wu-cheng Li
b8a10fe456 Allow setPreviewDisplay after startPreview. 2009-07-01 01:41:25 +08:00
Android (Google) Code Review
c0767064c6 am c6a482e7: Merge change 5199 into donut
Merge commit 'c6a482e778e7b5fc5790edf22e554c93f53b1112'

* commit 'c6a482e778e7b5fc5790edf22e554c93f53b1112':
  Only remove client after the hardware is teared down, so a new client
2009-06-24 20:34:35 -07:00
Chih-Chung Chang
d5d1ebd768 Only remove client after the hardware is teared down, so a new client
is rejected before old client is done.

Also check mUsers in all cases to make sure there are no existing client.
2009-06-25 11:03:55 +08:00
Android (Google) Code Review
5310745b14 am 82a32714: Merge change 5190 into donut
Merge commit '82a32714f07d25259b91163d383ccdb74a166d2d'

* commit '82a32714f07d25259b91163d383ccdb74a166d2d':
  Fix 1933269: startPreview failed.
2009-06-24 13:53:24 -07:00
Chih-Chung Chang
6fcba313e9 Fix 1933269: startPreview failed.
The reason we need this count is a new CameraService::connect() request may
come in while the previous Client's destructor has not been run or is still
running. If the last strong reference of the previous Client is gone but
destructor has not been run, we should not allow the new Client to be created
because we need to wait for the previous Client to tear down the hardware
first.
2009-06-24 15:50:57 +08:00
Android (Google) Code Review
a44e01d46b am 8570e5fc: Merge change 4907 into donut
Merge commit '8570e5fcf15f6b7c22c3023e8b4757c6a880a598'

* commit '8570e5fcf15f6b7c22c3023e8b4757c6a880a598':
  Add more debug messages for CameraService.
2009-06-22 03:44:04 -07:00
Chih-Chung Chang
1f25ec8b1e Add more debug messages for CameraService. 2009-06-22 17:06:32 +08:00
Android (Google) Code Review
7942359005 am 7f148d65: Merge change 4316 into donut
Merge commit '7f148d65051e577cc4a002183ec55d625b51de85'

* commit '7f148d65051e577cc4a002183ec55d625b51de85':
  Revert "dumpstate: Temporarily disable dumping /proc/slabinfo to avoid kernel crash."
  Enable more debug message to debug the Camera startPreview bug.
2009-06-16 08:37:35 -07:00
Chih-Chung Chang
4b4900b6b7 Enable more debug message to debug the Camera startPreview bug. 2009-06-16 17:19:02 +08:00
Android (Google) Code Review
259f55a513 am 084af5e1: Merge change 3551 into donut
Merge commit '084af5e1977e2278e68a69615f55d5fe3bb6c1a4'

* commit '084af5e1977e2278e68a69615f55d5fe3bb6c1a4':
  Allow the owner to reconnect to Camera.
2009-06-10 00:20:15 -07:00
Chih-Chung Chang
c8b24085f5 Allow the owner to reconnect to Camera. 2009-06-09 13:58:51 +08:00
Mathias Agopian
aaf834a284 some work to try to reduce the code size of some native libraries
- make sure that all binder Bn classes define a ctor and dtor in their respective library.
  This avoids duplication of the ctor/dtor in libraries where these objects are instantiated.
  This is also cleaner, should we want these ctor/dtor to do something one day.

- same change as above for some Bp classes and various other non-binder classes

- moved the definition of CHECK_INTERFACE() in IInterface.h instead of having it everywhere.

- improved the CHECK_INTERFACE() macro so it calls a single method in Parcel, instead of inlining its code everywhere

- IBinder::getInterfaceDescriptor() now returns a "const String16&" instead of String16, which saves calls to String16 and ~String16

- implemented a cache for BpBinder::getInterfaceDescriptor(), since this does an IPC. HOWEVER, this method never seems to be called.
  The cache makes BpBinder bigger, so we need to figure out if we need this method at all.
2009-05-26 16:12:20 -07:00
Dave Sparks
67d5fc6b59 am 7283fb18: Merge commit \'7b7225c8fdbead25235c74811b30ff4ee690dc58\' into manual_merge
Merge commit '7283fb18022674daee4dcdc3a218190791f8cd0e'

* commit '7283fb18022674daee4dcdc3a218190791f8cd0e':
  AI 149133: Enable the camera permission check.
2009-05-21 10:27:18 -07:00
Dave Sparks
7283fb1802 Merge commit '7b7225c8fdbead25235c74811b30ff4ee690dc58' into manual_merge
Conflicts:
	camera/libcameraservice/CameraService.cpp
2009-05-21 10:17:23 -07:00
Android (Google) Code Review
a59fa9b6cb am db79edc5: Merge change 2168 into donut
Merge commit 'db79edc5dc39e103356cad8781148a8794520bc5'

* commit 'db79edc5dc39e103356cad8781148a8794520bc5':
  Fix permission hole in camera service. Some debugging code was added
2009-05-21 09:42:24 -07:00
Dave Sparks
7b7225c8fd AI 149133: Enable the camera permission check.
Some debugging code was added to camera service. Later it was #ifdef'd
  out, but this change also removed the camera permission check. This
  change puts the permission check back in.
  BUG=1869264

Automated import of CL 149133
2009-05-21 09:18:18 -07:00
Dave Sparks
b1f3b8f7cb Fix permission hole in camera service. Some debugging code was added
to CameraService::onTransact() method during development. Later on
the entire onTransact() method was #ifdef'd out, which inadvertently
omitted the permissions check code. This change restores the code.
2009-05-20 20:02:59 -07:00
Mathias Agopian
0795272aa2 move libbinder's header files under includes/binder 2009-05-20 12:55:03 -07:00