2214 Commits

Author SHA1 Message Date
Eric Laurent
0df689495a AudioTrack: relax check on minimum buffer size
Current AudioTrack implementation enforces that the requested audio
buffer size is at least corresponding the audio latency.
This requirement is too strong and leads to problems with current
stagefright and AudioSink implementations when playing over output
streams with long latency.

Ultimately, the AudioSink design should be changed to specify a minimum
buffer size in time or frames units but not in buffer count units.

Change-Id: I8ba603956f92ac49143a8249572665aa548f2f0f

Conflicts:

	media/libmedia/AudioTrack.cpp
2012-03-16 12:22:07 -07:00
Mathias Agopian
bb1e7d4324 Merge changes I7e973a35,Ib3386fcc into ics-mr1
* changes:
  SurfaceTexture: add EGL_KHR_fence_sync option
  SurfaceTexture: add a blit-to-FBO test
2011-11-29 17:46:35 -08:00
Jamie Gennis
6f1dd757cb Merge "SurfaceMediaSource: use the vid enc usage bit" into ics-mr1 2011-11-29 17:25:09 -08:00
Jamie Gennis
77cec6132a SurfaceTexture: add EGL_KHR_fence_sync option
This change adds a compile-time option for SurfaceTexture to use the
EGL_KHR_fence_sync extension to synchronize access to Gralloc buffers.

Bug: 5122031
Change-Id: I7e973a358631fff5308acf377581b811911fe790
2011-11-29 17:09:01 -08:00
Andreas Huber
d12dc28460 Merge "If an error occurs that prevents us from reallocating buffers during a format change" into ics-mr1 2011-11-29 14:09:03 -08:00
Andreas Huber
351143fb0e Merge "Updated (internal) API for IStreamSource to signal discontinuities" into ics-mr1 2011-11-29 14:08:45 -08:00
Jeff Brown
6651a63834 Fix application launch shortcuts.
Improved quick launch bookmarks to support category-based shortcuts
instead of hardcoding package and class names for all apps.

Added a set of Intent categories for typical applications on the
platform.

Added support for some of the HID application launch usages to
reduce reliance on quick launch for special purpose keys.  Some
keyboard vendors have hardcoded launch keys that synthesize
"Search + X" type key combos.  The goal is to encourage them
to stop doing this by implementing more of HID.

Bug: 5674723
Change-Id: I79f1147c65a208efc3f67228c9f0fa5cd050c593
2011-11-29 12:17:22 -08:00
Andreas Huber
a10613fea8 Updated (internal) API for IStreamSource to signal discontinuities
Change-Id: Idd4b9d8e7cec16b3e3c91c70e75144d42be30f96
related-to-bug: 5553055
2011-11-29 11:59:10 -08:00
Andreas Huber
d03e7d62d5 If an error occurs that prevents us from reallocating buffers during a format change
we need to transition to executing state anyway to be able to properly flush/shutdown
in the future.

Change-Id: Ie48bc09ea31942009ae3a5a45aabc9ffad9fb91f
related-to-bug: 5655016
2011-11-28 10:54:12 -08:00
Andreas Huber
cb6fbc89c2 Merge "Report a runtime error instead of asserting on malformed avc configuration data." into ics-mr1 2011-11-22 08:39:11 -08:00
James Dong
02740dc49d Merge "Fix log spamming during time lapse video recording" into ics-mr1 2011-11-21 20:28:27 -08:00
Jamie Gennis
6deb4b538e SurfaceMediaSource: use the vid enc usage bit
This change makes SurfaceMediaSource add the VIDEO_ENC usage bit when
allocating its GraphicBuffers rather than the HW_TEXTURE bit.

Change-Id: Ie20e225c894fdbc31cad6bb82b3b64c7e98074eb
2011-11-21 17:48:19 -08:00
Jamie Gennis
87f3265bb0 EGL: default to swap interval 1
This change explicitly sets swap interval 1 on the window when an
EGLSurface is created to render to it.

Change-Id: I91eb29dbee3ae4a55076b921f084d503fbe94e03
2011-11-21 14:37:29 -08:00
James Dong
96af14d9b0 Fix log spamming during time lapse video recording
Change-Id: I4fc0809203684ebb02eaf217d7abad00aefc898f

related-to-bug: 5626569
2011-11-21 12:09:51 -08:00
Andreas Huber
0ba8660ea6 Report a runtime error instead of asserting on malformed avc configuration data.
Change-Id: Ibcd9c3fb5b6532eba843ed80ecdcdacaf50d8845
related-to-bug: 5641069
2011-11-18 12:22:59 -08:00
Mathias Agopian
90cbbd1f7f attempt to fix bug 5313580
the working theory here is that a Surface object has become non-promotable
because it lost its last reference; later Surface::readFromParcel is called
the previous surface is found in the cache, but can't be promoted. this causes
a new Surface object to be created which will promptly try to connect to the
CPU_API -- this in turn will fail because the previous (now dead) surface is
still connected.

To fix this, we make sure to disconnect from the SurfaceTexture when
Surface[TextureClient] is destroyed.

Change-Id: I422234868a05d7b7d283e9d5a85f7ab79e65d8a9
2011-11-17 18:46:09 -08:00
Jamie Gennis
fd6b64f6ad Merge "SurfaceTexture: Fix to return the oldest of free buffers to Client on Dequeue call" into ics-mr1 2011-11-16 11:34:30 -08:00
Jeff Brown
3e7497b4ec Merge "Eliminate hw.keyboards system properties." into ics-mr1 2011-11-15 19:17:09 -08:00
Jeff Brown
1e08fe90df Eliminate hw.keyboards system properties.
Stop using system properties to publish information about
the key character map path.  Instead, we can retrieve it
on demand by asking the window manager.

It was possible to exhaust the supply of system properties
when repeatedly adding and removing input devices.

Bug: 5532806
Change-Id: Idd361a24ad7db2edc185c8546db7fb05f9c28669
2011-11-15 18:00:10 -08:00
Sunita Nadampalli
f1e868f682 SurfaceTexture: Fix to return the oldest of free buffers to Client on Dequeue call
Surface Texture dequeue logic is modified to return the oldest of the
free buffers to Client on dequeue call.

Currently dequeue method is returning the first buffer index which is free.
The parsing is done in ascending order of the buffer slot indices.
This leads to returning the buffer which has been just queued to composer,
and hence display, and this defeats the purpose of having minimum dequeue count
as 2 in asynchrnouse mode.

This is fixed by checking all the free slots and returning the oldest buffer.

Change-Id: Ibbac10593c3994c278c601af0480b171635ecdd4
Signed-off-by: Sunita Nadampalli <sunitan@ti.com>
2011-11-15 11:43:35 -08:00
Hong Teng
481ffa505b Merge "Fix for issue 5309336 -add videoeditor maximum prefetch YUV frames in media_profiles.xml to limit the total memory usage." into ics-mr1 2011-11-15 09:42:37 -08:00
Hong Teng
7eb5319703 Fix for issue 5309336
-add videoeditor maximum prefetch YUV frames in media_profiles.xml to limit the total memory usage.

Change-Id: I41ffbc192fcce4c7635e5b0a1f2835852e5ee509
2011-11-14 13:02:59 -08:00
Mathias Agopian
b89d88f531 Define, document, and test the behavior of very large SurfaceTextures
updateTexImage() now throws a runtime exception when its native
counterpart fails

Bug: 5506633

Change-Id: I151a6f685d465966e7df4df624412ab2da62e95f
2011-11-11 18:44:35 -08:00
James Dong
77c500c9a1 Add support for retrieving location information in mp4/3gpp files
Change-Id: Ib8427704ef9ee5a4fa8fe1818c8a62d77b4ea687
related-to-bug: 5560253
2011-11-10 11:40:11 -08:00
Andreas Huber
26f70db99f Merge "Remove surface legacy APIs and code." into ics-mr1 2011-11-08 08:48:31 -08:00
Jeff Brown
88061d6b38 am 5462bc63: Fix a leak in Parcel::writeBlob.
* commit '5462bc6318b4b70e7a58c66994e2bd79f59d9739':
  Fix a leak in Parcel::writeBlob.
2011-11-05 02:35:57 +00:00
Jeff Brown
5462bc6318 Fix a leak in Parcel::writeBlob.
Was mistakenly assuming that Parcel::writeFileDescriptor took
ownership of the fd that was passed in.  It does not!
Added some comments and a default parameter to allow the caller
to specify whether it wishes the Parcel to take ownership.

Bug: 5563374
Change-Id: I5a12f51d582bf246ce90133cce7690bb9bca93f6
2011-11-04 19:26:03 -07:00
Jamie Gennis
236aea3579 Merge changes Ibc99cb1c,Ie1f4f6f8 into ics-mr1
* changes:
  BlobCache: implement cache serialization
  BlobCache: remove the mutex locking
2011-11-03 11:51:23 -07:00
Chih-Chung Chang
11ba6da460 am 4b6353ea: Merge "Update camera continuous autofocus javadoc." into ics-mr0
* commit '4b6353ea0265bfed52d0637abd1b17596ce25ff0':
  Update camera continuous autofocus javadoc.
2011-11-01 04:05:45 +00:00
Chih-Chung Chang
4b6353ea02 Merge "Update camera continuous autofocus javadoc." into ics-mr0 2011-10-31 21:04:01 -07:00
Jamie Gennis
9d9768dbd7 BlobCache: implement cache serialization
This change adds serialization and deserialization functionality to
BlobCache, conforming to the Flattenable interface.

Change-Id: Ibc99cb1c3d015f363d57d0713eabccec07ff975e
2011-10-31 18:49:32 -07:00
Jamie Gennis
94c1f148bb BlobCache: remove the mutex locking
This change removes the mutex from the BlobCache class.  The caller must
be responsible for thread synchronization in order to properly implement
the Flattenable interface, which is coming soon.  Otherwise would be the
potential for the cache contents to change between the call to the
getFlattenedSize and flatten methods.  Because the caller must do this
synchronization anyway there's no reason to also some synchronization
inside BlobCache.

Change-Id: Ie1f4f6f82b78744f46a41ce863cac0cad276a20e
2011-10-31 18:48:31 -07:00
Andreas Huber
95be24585f Remove surface legacy APIs and code.
All surfaces are now supported through surface textures.

Change-Id: I95dd823e7099c0c32a48a1121624149dcc29d9c6
2011-10-28 09:39:23 -07:00
Jamie Gennis
fc9592f8a5 am 08479cee: Merge "Stagefright: ANW::connect in MediaPlayerService" into ics-mr0
* commit '08479ceeba56c460fb52f60a24df27776f1936c3':
  Stagefright: ANW::connect in MediaPlayerService
2011-10-28 02:14:01 +00:00
Wu-cheng Li
0f4f97b70f Update camera continuous autofocus javadoc.
Suppose applications call autoFocus in CAF picture mode. If
CAF is in the middle of scanning, the picture is very likely to
be blurry. Change focus callback to return when the scanning
finishes.

bug:5514415
Change-Id: Ibcb8f92a5263d7dbd7cce54df3617fb21c6255d4
2011-10-28 00:38:02 +08:00
Jamie Gennis
2fa0ac2e44 Stagefright: ANW::connect in MediaPlayerService
This change moves the ANativeWindow connect and disconnect logic from
MediaPlayer to MediaPlayerService::Client.

Bug: 5502654
Change-Id: Ifc43b98b01ad8f35d62d7ece43110724ec7fda3d
2011-10-26 18:40:00 -07:00
Jamie Gennis
5ded5fc55f am b7b4eaaa: Merge "Stagefright: push blank buffers when tearing down" into ics-mr0
* commit 'b7b4eaaa05284634d50d581d924a250f1194f66d':
  Stagefright: push blank buffers when tearing down
2011-10-26 20:34:38 +00:00
Jamie Gennis
c0e4293794 Stagefright: push blank buffers when tearing down
This change makes OMXCodec push RGB 565 buffers filled with black to an
ANativeWindow when tearing down after decoding to protected gralloc
buffers.  This allows the OMX tear down to zero out any protected
buffers that were used without the possibility that the buffer is still
being used by SurfaceFlinger or HWComposer.

Bug: 5483222
Change-Id: I8acedd81a7bb67dfdc2fd15733e3375b6ce8d560
2011-10-25 18:35:02 -07:00
Dave Burke
149a14931e am 23d64420: Merge "Stagefright: idle OMX after ANW errors" into ics-mr0
* commit '23d644202a44383bf008ff86f6faa3ea7e447290':
  Stagefright: idle OMX after ANW errors
2011-10-19 22:38:45 -07:00
Dave Burke
23d644202a Merge "Stagefright: idle OMX after ANW errors" into ics-mr0 2011-10-19 22:37:18 -07:00
Jamie Gennis
6607b39baa Stagefright: idle OMX after ANW errors
This change fixes an issue in Stagefright where the state of an OMXCodec
object can get out of sync with the state of the OMX component.  In
particular, if one of the ANativeWindow functions failed and put the
OMXCodec into the ERROR state, this would cause Stagefright to skip
doing the Executing -> Idle transition.  Without this transition the
freeBuffersOnPort call would never be made, and the MediaBuffers would
end up being leaked (which would also leak the Gralloc buffers they
reference).

Bug: 5333695
Change-Id: I85ea0cf92d18e7ef6d35c7d1e2a7b4e2c9745d34
2011-10-19 21:22:19 -07:00
Dave Burke
2696d0520f am 70ac412b: Merge "Add a LayerScreenshot" into ics-mr0
* commit '70ac412b2fe7be2507189a9fdfb30c43b36d56ac':
  Add a LayerScreenshot
2011-10-18 23:00:08 -07:00
Mathias Agopian
0ab84ef507 Add a LayerScreenshot
A LayerScreenshot is a special type of layer that contains a screenshot of
the screen acquired when its created. It works just like LayerDim.

Make sure to call compositionComplete() after rendering into a FBO.

Bug: 5446982, 5467587, 5466259
Change-Id: I5d8a1b4c327f9973d950cd4f4c0bca7f62825cd4
2011-10-18 20:21:47 -07:00
Mathias Agopian
72cdc6d488 am 9a0732af: Merge "SensorManager reconnects to sensor service when the later dies" into ics-mr0
* commit '9a0732af1bd96a7d8247dee124a7da389137a52f':
  SensorManager reconnects to sensor service when the later dies
2011-10-17 15:52:31 -07:00
Mathias Agopian
9a0732af1b Merge "SensorManager reconnects to sensor service when the later dies" into ics-mr0 2011-10-17 15:50:36 -07:00
Mathias Agopian
a3dca6fdaa am 840b8a67: Revert "Add a LayerScreenshot"
* commit '840b8a678537519c27ddf2f818494eaa20a135d4':
  Revert "Add a LayerScreenshot"
2011-10-17 11:32:19 -07:00
Elliott Hughes
f21dd1eabe Merge branch 'master' of ssh://android-git:29418/platform/frameworks/base 2011-10-17 11:32:08 -07:00
Jamie Gennis
7f7362c02b Merge changes I4e5ff00c,Id5e3ca1d,I97cbba61
* changes:
  SurfaceFlinger: Remove display freezing code
  SurfaceFlinger: add some layer update tests
  SurfaceFlinger: make sync transactions explicit
2011-10-17 11:31:39 -07:00
Mathias Agopian
4b1415ebd9 am 57337eb7: Merge "Add a LayerScreenshot" into ics-mr0
* commit '57337eb78e65c160fb9c46a01e04c476d1bfdca1':
  Add a LayerScreenshot
2011-10-17 11:30:33 -07:00
Mathias Agopian
840b8a6785 Revert "Add a LayerScreenshot"
This reverts commit d6809f40cf61203573ec5dbc437f695cd132cc18.
2011-10-16 23:54:25 -07:00