Commit Graph

13 Commits

Author SHA1 Message Date
Jamie Gennis
67eedd74ab Fix a bug in SurfaceTexture::setBufferCount.
We need to reset mCurrentTexture and mLastQueued in setBufferCount
because it frees all of the buffers associated with the buffer slots.

Change-Id: Ie2f834ec1c07ce7a4ab9b2b5fc5fe8c294010c60
2011-01-09 16:40:06 -08:00
Jamie Gennis
e70d8b4393 Add method logging to the SurfaceTexture C++ class.
Change-Id: Ic05b05428d34c04634ce9fc3f924ff3322bb2da2
2011-01-09 16:40:06 -08:00
Jamie Gennis
3461e0fadf Initialize the SurfaceTexture buffer slots.
Change-Id: I81a562ad897173f33cd6a2127737718a7db610eb
2011-01-09 16:40:06 -08:00
Jamie Gennis
8ba32fade1 Add the SurfaceTexture C++ implementation.
This change adds the C++ implementation of SurfaceTexture and related
classes. The goal of this is for a SurfaceTexture to be passed to
camera service or Stagefright in place of a Surface to allow camera
preview or decoded video frames to be streamed to an OpenGL ES texture
that an application can use.

Change-Id: I55c83a7017f1ecb81c9c9e3252cbd118b914296c
2011-01-06 13:20:47 -08:00
Mathias Agopian
2ffb24799e Fix typo which causes sensors to fail miserably
Change-Id: Ieca18fc089e2bdf7d049f213836971b54d11cd76
2010-09-16 21:41:13 -07:00
Mathias Agopian
aeda9afdba part of fix for [3004226] Cannot end the call - Proximity sensor doesn't work
- In SensorEventQueue, only bail on errors from Looper::loopOnce
- Improve sensor error logging

Change-Id: Ib3cf8d5d9fdac8513a3d753155827e0feeda1662
2010-09-16 17:33:48 -07:00
Jeff Brown
59abe7e090 Replace epoll() with poll() and rename PollLoop to Looper.
As part of this change, consolidated and cleaned up the Looper API so
that there are fewer distinctions between the NDK and non-NDK declarations
(no need for two callback types, etc.).

Removed the dependence on specific constants from sys/poll.h such as
POLLIN.  Instead looper.h defines events like LOOPER_EVENT_INPUT for
the events that it supports.  That should help make any future
under-the-hood implementation changes easier.

Fixed a couple of compiler warnings along the way.

Change-Id: I449a7ec780bf061bdd325452f823673e2b39b6ae
2010-09-14 01:59:45 -07:00
Dianne Hackborn
45e0acb41a Modify native ALooper to take an explicit ident.
The ALooper API now uses an explicit "identifier" for the integer
that is returned rather than implicitly using the fd.  This allows
the APIs that had the fd to be a little more sane.

Change-Id: I8507f535ad484c0bdc4a1bd016d87bb09acd7ff0
2010-09-07 15:46:55 -07:00
Mathias Agopian
a48bcf62b6 Added SensorManager.getMinDelay()
Exposed the new "min delay" sensor property through native and
java sensor apis. This allows the caller to know what is the
maximum rate at which a sensor can return events, or, if a sensor
works in "update" mode (events returned only when the value changes).

Also augmented SensorManager.regusterSensorEvent() so that it can
accept a value in microsecond in addition to the 4 constants already
defined.

Change-Id: If425e9979892666df8c989d7de3c362230fa19e0
2010-07-29 18:18:00 -07:00
Mathias Agopian
d03d9ced3f Fix a memory corruption when writting Sensor into a parcel
Change-Id: I03f703ae2224f43924031bfea4c68aa979bb9f05
2010-07-22 18:57:41 -07:00
Mathias Agopian
e3c8234765 propagate sensor event rate properly
Change-Id: I32e67d30e4295285a6827956cc8161b2025d70bc
2010-07-21 16:09:39 -07:00
Mathias Agopian
a7352c9f4a new SensorService
remove old sensor service and implement SensorManager
on top of the new (native) SensorManger API.

Change-Id: Iddb77d498755da3e11646473a44d651f12f40281
2010-07-19 17:57:29 -07:00
Mathias Agopian
589ce85ee4 first step at implementing the native sensor support
in this commit:
- implemented the C stub
- implemented the binder interfaces involved
- implemented most of the C++ client side

missing:
- SensorManager cannot connect to the SensorServer yet
(because there is no SensorServer yet)

Change-Id: I75010cbeef31c98d6fa62fd5d388dcef87c2636b
2010-07-13 22:21:56 -07:00