summaryrefslogtreecommitdiffstats
path: root/include
Commit message (Collapse)AuthorAgeFilesLines
* fix a memory leak and memory corruption in RefBaseMathias Agopian2011-08-111-17/+7
| | | | | | | | | | | | | | | | | we would leak a weakref_impl if a RefBase was never incWeak()'ed. there was also a dangling pointer that would cause memory corruption and double-delete when a custom destroyer was used to delay the execution of ~RefBase. it turns out that the custom destroyer feature caused most of the problems, so it's now gone. The only client was SurfaceFlinger who now handles things on its own. RefBase is essentially back its "gingerbread" state, but the code was slightly cleaned-up. Bug: 5151207, 5084978 Change-Id: Id6ef1d707f96d96366f75068f77b30e0ce2722a5
* Remove ParcelSurfaceTexture and update MediaPlayerTed Bonkenburg2011-08-111-37/+0
| | | | | | | | | This removes the ParcelSurfaceTexture class since that functionality has been folded into Surface.java. The change also updates the MediaPlayer to get rid of setParcelSurfaceTexture() and modifies setTexture() to use the new Surface functionality in order to simplify the code. Change-Id: Iafa75ea3188263928128325d8a726786971b4de4
* Audio effects: track CPU and memory use separatelyEric Laurent2011-08-112-0/+2
| | | | | | | | | | | | | | | | | | | | | | Before this change, CPU and memory usage for an audio effect were registered and checked against the limit by audio policy manager upon effect instantiation. Even if an effect was not enabled it would prevent another effect to be created if the CPU load budget was exceeded, which was too restrictive. This change adds a method to register/unregister CPU load only when an effect is enabled or disabled. It also adds a mechanism to place all effects on the global output mix in suspend state (disabled) when an effect is enabled on a specific session. This will allow applications using session effects to have the priority over others using global effects. Also fixes some issues with suspend/restore mechanism: - avoid taking actions when an effect is disconnected and was not enabled. - do not remove a session from the suspended sessions list when corresponding effect chain is destroyed. Change-Id: I5225278aba1ae13d0d0997bfe26a0c9fb46b17d3
* Merge changes I5174a6ec,I1f8538b6,Idb71fdcfMathias Agopian2011-08-101-3/+22
|\ | | | | | | | | | | | | * changes: fix a crasher in SurfaceTexture::updateTexImage() rework dequeueBuffer()'s main loop. error out when SurfaceTexture APIs are called while not connected
| * fix a crasher in SurfaceTexture::updateTexImage()Mathias Agopian2011-08-101-4/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | we now make sure to drain the buffer queue on disconnect. this happens only when in synchrnous mode. in async mode we clear all buffers except the head of the queue. for extra safety we also catch the null pointer in updateTexImage (which should never happen) and return an error. Bug: 5111008 Change-Id: I5174a6ecbb0de641c6510ef56a611cbb4e9e1f59
| * rework dequeueBuffer()'s main loop.Mathias Agopian2011-08-101-0/+5
| | | | | | | | | | | | | | | | this simplifies the code a bit and also makes sure we reevaluate mAbandoned and mConnectedApi each time we come back from waiting on mDequeueCondition Change-Id: I1f8538b62ad321b51ed79d953b700036daba796d
| * error out when SurfaceTexture APIs are called while not connectedMathias Agopian2011-08-101-1/+1
| | | | | | | | | | | | | | - also log a warning when freeAllBuffers is called with a non empty buffer queue - rename freeAllBuffers to freeAllBuffersLocked Change-Id: Idb71fdcf233b9ccae62d5a2a7c3c4bad2501d877
* | Merge "Fix typos and use new HAL_PRIORITY_URGENT_DISPLAY constant"Mathias Agopian2011-08-101-3/+4
|\ \
| * | Fix typos and use new HAL_PRIORITY_URGENT_DISPLAY constantMathias Agopian2011-08-091-3/+4
| |/ | | | | | | Change-Id: I703f8a96dd0dfec427e74363ad95729bfefc95c7
* | Revert "Notify the OMX component that it's going to be used in "secure" mode."Andreas Huber2011-08-102-12/+0
|/ | | | This reverts commit 7616178271e95f009452a21ea45e7225997dc27a.
* Merge changes Ie06e73e5,I7ac6b5b0Mathias Agopian2011-08-093-3/+10
|\ | | | | | | | | | | * changes: free all buffers when ANativeWindow::disconnect is called return correct value from query after connecting a surface
| * return correct value from query after connecting a surfaceMathias Agopian2011-08-083-3/+10
| | | | | | | | | | | | | | | | | | | | the first time a surface was connected, the values returned by query NATIVE_WINDOW_DEFAULT_{WIDTH|HEIGHT} and NATIVE_WINDOW_TRANSFORM_HINT were wrong until a call to queueBuffer was performed. Bug: 5137366, 5121607 Change-Id: I7ac6b5b0daa876638f6bed7c20f286a6e6d984f6
* | Keep effects sessions active when the caller dies.Marco Nelissen2011-08-092-0/+5
|/ | | | | | | | Don't remove effects until the session they are in goes away or all AudioEffects have been explicitly released. This allows the control panel process to die without stopping the effects. Change-Id: I4496e5df080230ca1af149dec95c1309ab8ea888
* Notify the OMX component that it's going to be used in "secure" mode.Andreas Huber2011-08-082-0/+12
| | | | | Change-Id: Id87c4b295eb38f7d24045918e73df298d7b842f9 related-to-bug: 5137212
* Eliminate superfluous memcpys by wrapping an ABuffer in a MediaBufferAndreas Huber2011-08-041-0/+4
| | | | | Change-Id: I1313f117cd7cdfaf7d6ec25413a0b4b8ea495037 related-to-bug: 5122973
* Add camera bayer image format.Wu-cheng Li2011-08-041-0/+3
| | | | | | | | The API are hidden. bug:5086073 Change-Id: Ic9a53e5d5007ad3f12a28406ee25098227f14cbc
* Pass camera frame metadata from camera service to Java.Wu-cheng Li2011-08-022-3/+7
| | | | | bug:4460717 Change-Id: I2fae6e1dfca6b8f3a5ee5716fc7817f5417bf657
* Add camera recording hint parameter.Wu-cheng Li2011-08-021-0/+11
| | | | | | | The API is still hidden. bug:4266229 Change-Id: I5e4c24e9e2808582aecb55ac4f1d5be3ed7e36a2
* Refactor input reader to add stylus support.Jeff Brown2011-07-312-1/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Bug: 5064702 Introduced the concept of an InputListener to further decouple the InputReader from the InputDispatcher. The InputListener exposes just the minimum interface that the InputReader needs to communicate with the outside world. The InputReader passes arguments to the InputListener by reference, which makes it easy to queue them up. Consolidated all of the InputReader locks into one simple global Mutex. The reason this wasn't done before was due to potential re-entrance in outbound calls to the InputDispatcher. To fix this, the InputReader now queues up all of the events it wants to send using a QueuedInputListener, then flushes them outside of the critical section after all of the event processing is finished. Removing all of the InputMapper locks greatly simplifies the implementation. Added tests for new stylus features such as buttons, tool types, and hovering. Added some helpers to BitSet32 to handle common code patterns like finding the first marked bit and clearing it. Fixed a bug in VelocityTracker where the wrong pointer trace could get cleared when handling ACTION_POINTER_DOWN. Oops. Changed PointerCoords so it no longer stores useless zero axis values. Removed editAxisValue because it is not very useful when all zero value axes are absent and therefore cannot be edited in place. Added dispatch of stylus hover events. Added support for distance and tool types. Change-Id: I4cf14d134fcb1db7d10be5f2af7b37deef8f8468
* Merge "Move extract native libraries to JNI code"Kenny Root2011-07-271-0/+15
|\
| * Move extract native libraries to JNI codeKenny Root2011-07-261-0/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | The built-in ZipFile class was quite a long time to find an unpack libraries. Move everything to using the libutils ZipFileRO class that goes quite a bit faster. Initial measurements are 6 times faster than the Java code. Also, read files off the disk and compare their CRC against the APK's CRC to see if we need to write the new file to disk. This also cuts down the bootup time by up to a second per APK that has native files. Change-Id: Ic464a7969a17368fb6a6b81d026888c4136c7603
* | Merge "Bug 4599730 Get audio channel count on MediaPlayer"Glenn Kasten2011-07-271-4/+13
|\ \
| * | Bug 4599730 Get audio channel count on MediaPlayerGlenn Kasten2011-07-271-4/+13
| | | | | | | | | | | | | | | | | | | | | Related changes: - Fix bug in get/setParameter* to recycle Parcels when done with them. Change-Id: Iaff05e91bbd99a14fccb79d816dd873359b6ae65
* | | Merge "Fix issue 4604090: notification sound interrupted."Eric Laurent2011-07-272-0/+70
|\ \ \ | |/ / |/| |
| * | Fix issue 4604090: notification sound interrupted.Eric Laurent2011-07-252-0/+70
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The problem is that the audio HAL fails to acquire the wake lock when playing the notification. This is because of a change that removed the mediaserver process form the system group for honeycomb. The fix consists in requesting the wake lock from PowerManagerService when AudioFlinger mixer wakes up. A consequence of this change is that audio HALs or pcm drivers do not have to hold wake locks anymore as in the past. Change-Id: I4fb3cc84816c9c408ab7fec75886baf801e1ecb5
* | | Add camera face detection API.Wu-cheng Li2011-07-271-0/+10
| | | | | | | | | | | | | | | | | | | | | API are still hidden. bug:4460717 Change-Id: I1a515061f141a89bd61c875257712789fb15d2d4
* | | Merge "remove dead code and member variables."Mathias Agopian2011-07-261-14/+2
|\ \ \ | |/ / |/| |
| * | remove dead code and member variables.Mathias Agopian2011-07-251-14/+2
| | | | | | | | | | | | | | | | | | also fix some comments and improve debugging logs. Change-Id: I83e55309f306332b59e1ec46104c4a7fffbf3c97
* | | Merge "Adding Metadata mode to SurfaceMediaSource"Pannag Sanketi2011-07-252-1/+15
|\ \ \
| * | | Adding Metadata mode to SurfaceMediaSourcePannag Sanketi2011-07-222-1/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | SurfaceMediaSource operates in metadata mode only, i.e. just the metadata is stored in videobuffers. SurfaceMediaSource passes the Gralloc buffer handle along with a 4 byte 'type' (indicating that the metadata is of type GrallocSource) to the encoder as opposed to the GrallocBuffer itself. Related to bug id: 4529323 Change-Id: I83aebc0dd10f317658cdf70be5802dfc35a1e72d
* | | | Merge "Added APIs for audio preprocessing"Eric Laurent2011-07-252-0/+34
|\ \ \ \
| * | | | Added APIs for audio preprocessingEric Laurent2011-07-252-0/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Added APIs to control pre processes applied on captured audio. Those APIs are still hidden until reviewed by API council. Three types of standard pre processes are supported: - Automatic Gain Control (AGC) by AutomaticGainControl class - Acoustic Echo Cancellation (AEC) by AcousticEchoCanceler class - Noise Suppression (NS) by NoiseSuppressor class A method is added to AudioEffect class to query audio pre processings applied by default by the platform on a given AudioRecord session ID. Change-Id: I0b9fceeb8c704dd06319c3b52b85c96fe871d51d
* | | | | Merge "Do not support still image capture mode for timelapse video recording"James Dong2011-07-253-79/+0
|\ \ \ \ \ | |/ / / / |/| | | |
| * | | | Do not support still image capture mode for timelapse video recordingJames Dong2011-07-243-79/+0
| | |/ / | |/| | | | | | | | | | | | | | | | | | related-to-bug: 4973779 Change-Id: Ica665217ab10247b2242acc4e93d4fe9f83e3f45
* | | | Merge "SurfaceTexture: enable RGB external textures"Jamie Gennis2011-07-251-5/+0
|\ \ \ \
| * | | | SurfaceTexture: enable RGB external texturesJamie Gennis2011-07-221-5/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This change removes support for conditionally using the GL_TEXTURE_2D target for SurfaceTexture textures with RGB buffers. It also enables and fixes the RGB-based SurfaceTexture tests. Change-Id: I9a251a981cf66af6b048b2e4c3fe7231e4774f4d
* | | | | Merge "Add support for creating a Surface from a a SurfaceTexture."Ted Bonkenburg2011-07-251-2/+5
|\ \ \ \ \ | |_|_|_|/ |/| | | |
| * | | | Add support for creating a Surface from a a SurfaceTexture.Ted Bonkenburg2011-07-221-2/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The Surface is already using SurfaceTexture internally and it is parcelable. This is intended to replace and phase out ParcelSurfaceTexture in favor of creating a new Surface.java object from an existing SurfaceTexture. Change-Id: I8e2dd86614523da6abed6403e1d705a68fa19fdf
* | | | | Merge "Do not wait forever for output buffers in OMXCodec.cpp and error out ↵James Dong2011-07-241-0/+1
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | in case time out happens"
| * | | | | Do not wait forever for output buffers in OMXCodec.cpp and error out in case ↵James Dong2011-07-151-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | time out happens o Deal with vendor codec hang bug Change-Id: Ic8449afd43045f09a9e0bd3d1be9a320e59ccabe
* | | | | | Merge "QueryCodecs() signature change"Jean-Michel Trivi2011-07-241-0/+7
|\ \ \ \ \ \ | |_|_|_|/ / |/| | | | |
| * | | | | QueryCodecs() signature changeJean-Michel Trivi2011-07-221-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Restore QueryCodecs() signature exactly as used by third-party libs. Add an alternative function to select HW only codecs. Change-Id: Ibb2cb4dd36fc0c6599eb93aa5751c216397e3b6f
* | | | | | Merge "Connect MediaRecorder Native to SurfaceMediaSource"Pannag Sanketi2011-07-224-3/+21
|\ \ \ \ \ \ | | |_|_|_|/ | |/| | | |
| * | | | | Connect MediaRecorder Native to SurfaceMediaSourcePannag Sanketi2011-07-224-3/+21
| | |_|_|/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Making a connection from MediaRecorder Native layer to the SurfaceMediaSource for the purpose of encoding GL Frames. This will be called from the java side inside the Mobile Filter Framework. The mediarecorder native layer (client), when set the videosource to option VIDEO_SOURCE_FRAMES, asks the StageFrightRecorder on the mediaserver side to create a SurfaceMediaSource object and pass it back as a sp<ISurfaceTexture> object. Using that, the client side will dequeue and queue buffers. Connecting the GL Frames to the obtained sp<ISurfaceTexture> is not part of this CL. Related to bug id: 4529323 Change-Id: I651bec718dd5b935779e7d7a050b841c2d0b0fcd
* | | | | SurfaceTexture: add the abandon method.Jamie Gennis2011-07-223-3/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This change adds the 'abandon' method to the SurfaceTexture C++ class. This method may be used to put the SurfaceTexture in an abandoned state, causing all ISurfaceTexture methods to fail. Change-Id: Ibd261f7b73f44e2bec36a8508bf92113cfb7cf95
* | | | | SurfaceMediaSource: remove getAllocator methodJamie Gennis2011-07-221-7/+0
|/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | This change removes the getAllocator method from SurfaceMediaSource because that method is no longer a part of the ISurfaceTexture interface. Change-Id: I0e2f0bc3bc1c8cd3c1b4b14246f07b9b4e3066c3
* | | | Merge changes I799532f7,I5cffa6ebJamie Gennis2011-07-223-12/+1
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | * changes: SurfaceTexture: fix a comment SurfaceTexture: remove getAllocator
| * | | | SurfaceTexture: fix a commentJamie Gennis2011-07-211-2/+1
| | | | | | | | | | | | | | | | | | | | Change-Id: I799532f77f8fbb6b8ee6888fdd8852b6f28e8c33
| * | | | SurfaceTexture: remove getAllocatorJamie Gennis2011-07-212-10/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This change removes the SurfaceTexture::getAllocator method, as it's no longer needed. Proper refcounting of the Gralloc buffers is now handled by the IGraphicBufferAlloc binder marshalling code. Change-Id: I5cffa6ebfc1bc5828fb7ce0e0a5b2f55cd8479da
* | | | | Merge "Renaming SurfaceEncoder to SurfaceMediaSource"Pannag Sanketi2011-07-221-18/+17
|\ \ \ \ \