2145 Commits

Author SHA1 Message Date
Lakshman Gowda
db62a245f9 Set crop params to ANative Window during Initialization.
The native_window_set_crop() is called when port reconfig event callback comes from decoder's and
crop parameters are changed from default getconfig() OMX_IndexConfigCommonOutputCrop values.
Since the default crop params are same as port reconfig crop params, the native_window_set_crop()
is not called, hence resulting in displaying the whole frame(paddedWidth x paddedHeight).
By calling native_window_set_crop() during initilaization of output port of decoder ensures
in setting up ANative window to crop region.

Change-Id: I68926464a1f5c7e6053804615c8b9bd32ea85688
Signed-off-by: Lakshman Gowda <lakshman79@ti.com>
2011-10-05 10:29:27 -07:00
Dianne Hackborn
c04db7e067 Fix handling of "allow fds" state.
Didn't take into account nesting of bundles.  Boo.

Change-Id: Ic8cf21ad8d6f4938a3e105128624c9d162310d01
2011-10-03 21:09:35 -07:00
Jeff Brown
6579a9d6fe Transfer large bitmaps using ashmem.
Bug: 5224703

Change-Id: If385a66adf4c6179a0bb49c0e6d09a9567e23808
2011-10-03 17:28:13 -07:00
Dianne Hackborn
9ecebbfbf7 Add mechanism for Parcel to not allow FDs to be written to it.
This is to help implement issue #5224703.

Change-Id: I026a5890495537d15b57fe61227a640aac806d46
2011-10-03 16:58:41 -07:00
Jamie Gennis
8606fefa21 SurfaceTexture: parameterize the texture target
This change adds a hack to allow Android Browser to use a SurfaceTexture
to stream RGBA images to a GL_TEXTURE_2D texture object.

Change-Id: Idb90064d5d4b920959ef3be7451362ac5012460e
2011-09-30 14:19:41 -07:00
Gilles-Arnaud Bleu-Laine
9a6ed36ba5 Gracefuly return on detecting wrong AAC format from corrupted files
Return BAD_VALUE error upon detection of wrongly formatted files.
The client should abort the initialization upon error detection.

The current CHECK() interrupts the configurecodec() preventing a graceful
exit.

Change-Id: Ic79313fa76a63284897df5d91635de87d06f3100
Signed-off-by: Gilles-Arnaud Bleu-Laine <gilles@ti.com>
2011-09-30 10:46:12 -07:00
Andreas Huber
3e408f39ef Support AMR, G.711 and vorbis audio in ACodec and friends.
Change-Id: I08c03219bf2d60fc5c6e89957bd4b4c615570983
2011-09-28 12:37:36 -07:00
Jamie Gennis
feb158b3cb Merge changes Ib302d79e,Ib4ee085f
* changes:
  SurfaceFlinger: set layer names on SurfaceTextures
  SurfaceTexture: add name support
2011-09-27 14:24:09 -07:00
Andreas Huber
928baf1f54 Propagate error signalled by the source all the way to the output EOS notification.
Change-Id: I30e959a6d669f09745c59fbdebee08f869511cf7
related-to-bug: 5372901
2011-09-26 10:53:29 -07:00
Bart Sears
b637717096 Revert "Transfer large bitmaps using ashmem. Bug: 5224703"
This reverts commit 56c58f66b97d22fe7e7de1f7d9548bcbe1973029

This CL was causing the browser to crash when adding bookmarks, visiting the bookmarks page, and sharing pages (see bug http://b/issue?id=5369231
2011-09-25 14:30:21 -07:00
Jeff Brown
56c58f66b9 Transfer large bitmaps using ashmem.
Bug: 5224703

Change-Id: Ic7481dd9f173986f085a8bbdcc59bbe9830d7a44
2011-09-23 21:20:47 -07:00
Wei Huang
e448f557f6 am 3d9a9e55: Merge "Update camera javadoc about AE and AWB lock." into ics-factoryrom
* commit '3d9a9e55df85c720573e69ec3062efc331ea69bb':
  Update camera javadoc about AE and AWB lock.
2011-09-23 10:05:22 -07:00
Jamie Gennis
44a052203e SurfaceTexture: add name support
This change adds support for setting a string that can be used to
identify a SurfaceTexture object in log messages.

Change-Id: Ib4ee085f36c8830dc964c05ef1654f5a55dfcd60
2011-09-22 17:49:10 -07:00
Wu-cheng Li
b4f95be03e Update camera javadoc about AE and AWB lock.
- Autofocus does not lock AE and AWB.
- stopPreview and takePicture do not clear AE and AWB locks.

bug:5356404

Change-Id: I55d9b35f4ff746ecd2bff112c2674f1aa2543aca
2011-09-22 18:19:02 +08:00
Jeff Brown
01a98ddbdf Handle orientation changes more systematically.
Bug: 4981385

Simplify the orientation changing code path in the
WindowManager.  Instead of the policy calling setRotation()
when the sensor determined orientation changes, it calls
updateRotation(), which figures everything out.  For the most
part, the rotation actually passed to setRotation() was
more or less ignored and just added confusion, particularly
when handling deferred orientation changes.

Ensure that 180 degree rotations are disallowed even when
the application specifies SCREEN_ORIENTATION_SENSOR_*.
These rotations are only enabled when docked upside-down for
some reason or when the application specifies
SCREEN_ORIENTATION_FULL_SENSOR.

Ensure that special modes like HDMI connected, lid switch,
dock and rotation lock all cause the sensor to be ignored
even when the application asks for sensor-based orientation
changes.  The sensor is not relevant in these modes because
some external factor (or the user) is determining the
preferred rotation.

Currently, applications can still override the preferred
rotation even when there are special modes in play that
might say otherwise.  We could tweak this so that some
special modes trump application choices completely
(resulting in a letter-boxed application, perhaps).
I tested this sort of tweak (not included in the patch)
and it seems to work fine, including transitions between
applications with varying orientation.

Delete dead code related to animFlags.

Handle pausing/resuming orientation changes more precisely.
Ensure that a deferred orientation change is performed when
a drag completes, even if endDragLw() is not called because the
drag was aborted before the drop happened.  We pause
the orientation change in register() and resume in unregister()
because those methods appear to always be called as needed.

Change-Id: If0a31de3d057251e581fdee64819f2b19e676e9a
2011-09-21 19:26:15 -07:00
Mathias Agopian
44bfbbe501 Merge "fix the float Rect in OpenGLRenderer to handle NANs" 2011-09-20 14:02:44 -07:00
James Dong
3907c79aeb am 92d0a64b: Merge "Add QVGA resolution to CamcorderProfile" into ics-factoryrom
* commit '92d0a64b909cd95e8f4ce587438b0cc6d2daeaa0':
  Add QVGA resolution to CamcorderProfile
2011-09-19 20:09:00 -07:00
James Dong
07b9ae3312 Add QVGA resolution to CamcorderProfile
Change-Id: Icebbafb68d8164370f98a2c36699845d10ef081b
related-to-bug: 5145483
2011-09-19 19:32:26 -07:00
Mathias Agopian
83b186a246 fix the float Rect in OpenGLRenderer to handle NANs
- we want functions like isEmpty() to return true if NANs are
involved in the Rect

- also clean-up the intersect familly of calls

- minor cleanup in the int32_t Rect as well

These played a role in http://b/5331198.

Bug: 5331198

Change-Id: I5369725ab482e4b83da9f1bd4cee5256e5de75b2
2011-09-19 16:50:07 -07:00
Andreas Huber
bcba155942 A new API "androidGetThreadPriority"
Change-Id: I6baeead8c70460863343fd557250635fb1e6a170
2011-09-16 09:33:22 -07:00
Jeff Brown
93578af23e Merge "Velocity Tracker II: The Revenge of Velocity Tracker Bug: 5265529" 2011-09-14 21:27:25 -07:00
Jeff Brown
b59ab9f41f Velocity Tracker II: The Revenge of Velocity Tracker
Bug: 5265529

Rewrote the velocity tracker to fit a polynomial curve
to pointer movements using least squares linear regression.
The velocity is simply the first derivative of this polynomial.

Clients can also obtain an Estimator that describes the
complete terms of the estimating polynomial including
the coefficient of determination which provides a measure
of the quality of the fit (confidence).

Enhanced PointerLocation to display the movement curve predicted
by the estimator in addition to the velocity vector.

By default, the algorithm computes a 2nd degree (quadratic)
polynomial based on a 100ms recent history horizon.

Change-Id: Id377bef44117fce68fee2c41f90134ce3224d3a1
2011-09-14 19:16:37 -07:00
James Dong
1318864fa7 Merge "Change an assert failure due to unsupported level by HW AVC decoder and report the error to applications" 2011-09-14 17:42:22 -07:00
Eric Laurent
3f0c821740 Merge "Issue 5298399: Lost speech after a crash in gTalk." 2011-09-13 17:50:31 -07:00
Eric Laurent
7e8626fd75 Issue 5298399: Lost speech after a crash in gTalk.
Fixed problem in AudioTrack::restoreTrack_l() causing a permanent
failure if the IAudioTrack interface to AudioFlinger could not be
restored at the first attempt.

Change-Id: I039d4fe2dca8d3baf71f1a6c51119f27a67b6611
2011-09-13 17:33:29 -07:00
James Dong
0209da1cb1 Change an assert failure due to unsupported level by HW AVC decoder and report the error to applications
Change-Id: I522a994981d86329ccc86c3b536b561dc6e40eeb
related-to-bug: 5300618
2011-09-13 11:00:17 -07:00
Andreas Huber
d41108c91f Turn an another assertion into a runtime error in ACodec's implementation
Change-Id: I6779b29f200b90d088273ab3204724ef3d8d59bd
related-to-bug: 5284760
2011-09-12 14:14:08 -07:00
Ben Komalo
6c048260f3 Merge "Revert encryption mapping for device wipes." 2011-09-11 16:48:32 -07:00
Jeff Brown
0e23c2efb0 Merge "Tweak VelocityTracker. Bug: 5265529" 2011-09-09 17:01:25 -07:00
Jeff Brown
581761d4aa Tweak VelocityTracker.
Bug: 5265529

Calculate the velocity using the most recent touch sample as the
point of reference instead of the oldest.  This change more heavily
weights recent touch samples and reduces the sample time window
used for calculation.  This significantly improves the accuracy
of fling gesture detection.

Change-Id: Ib1940933e786e5f6a731552a99bcd9400741d55f
2011-09-09 16:04:09 -07:00
Guang Zhu
973f553be4 Make MediaScanner skip certain directories
The list of directories to skip are configurable via setprop.
The main motivation is that some test data folder takes long time
to scan, and media scanner may compete for CPU time against perf
tests therefore skewing the results.

Bug: 5263115
Change-Id: I568213e2a4babf6033021c1d336ef0347c0e3315
2011-09-09 15:36:42 -07:00
Ben Komalo
13c7197da8 Revert encryption mapping for device wipes.
External storage volumes that were emulated+encrypted needed to have
their encryption mapping removed so that it doesn't try to encrypt the
volume after formatting them.

This just wires through an argument through vold, and assumes that vold
will do the right thing even if there is no encryption mapping set.

Bug: 5017638
Change-Id: I858fae3d12cb415bc34637f520f71220ad9daaad
2011-09-09 14:44:40 -07:00
Dave Burke
fc301b0bb5 Require INTERNET permission for network-based content.
Bug #1870981

Change-Id: Ia3ad166390c4d60cea19c3783895b078a2c4c15f
2011-09-02 11:26:59 +01:00
Wu-cheng Li
98bb251c8b Add video snapshot camera parameter.
The API is still hidden.

bug:5187868

Change-Id: I59e1b5774ca32be049723d1a0887faa90d8884bb
2011-09-01 13:37:14 +08:00
Pannag Sanketi
abf82f9ea4 Merge "Incr. MIN_UNDEQUEUED_BUFFERS in SurfaceMediaSource" 2011-08-31 22:00:35 -07:00
Pannag Sanketi
ffd056fc73 Incr. MIN_UNDEQUEUED_BUFFERS in SurfaceMediaSource
The buffers in SurfaceMediaSource were 4 earlier, whereas
we need 5 for one of the devices.

Change-Id: I87bf5e28bbb0f7c9661dc01b040baa903d95d2c2
2011-08-31 17:43:24 -07:00
Eino-Ville Talvala
b2c4f0bf11 Merge "Fix SurfaceMediaSource timestamp handling." 2011-08-31 13:41:06 -07:00
Mathias Agopian
c21843a8b5 Merge "fix Surface positions are not floats" 2011-08-30 19:24:04 -07:00
Mathias Agopian
34cb9f2a96 fix Surface positions are not floats
Added Surface.setPosition(float, float) which allows to set a surface's
position in float.

Bug: 5239859
Change-Id: I903aef4ad5b5999142202fb8ea30fe216d805711
2011-08-30 18:51:54 -07:00
Eric Laurent
0e35c78d25 Merge "226483: A2DP connected, but music out to speaker" 2011-08-30 10:51:54 -07:00
Eino-Ville Talvala
728e08bc3f Fix SurfaceMediaSource timestamp handling.
Was not basing timestamps on startTimeUs.
Now synchronizes properly with audio.

Bug: 4510826
Change-Id: I613db0aa91e51fc75d120e65540e742d8ab2ae43
2011-08-30 10:49:15 -07:00
Eric Laurent
05ce094164 226483: A2DP connected, but music out to speaker
When the A2DP headset is connected, there is a possible
race condition when the audio tracks are moved from
the mixer thread attached to the speaker output to the thread
attached to A2DP output.
As the request to clear the stream type to output mapping cache in
the client process is asynchronous, it is possible that the flag
indicating to the client audio track to re-create the IAudioTrack
on the new thread is processed before the cache is invalidated.
In this case, the track will be attached to the old thread and
music will continue playing over the device speaker instead of being
redirected to A2DP headset.

Change-Id: Ib2ce1eb5320eaff83287b93779061bf4e7a330df
2011-08-30 10:19:38 -07:00
Glenn Kasten
b4bf90b40e Merge "Add C++ thread API androidGetThreadSchedulingGroup" 2011-08-29 14:38:52 -07:00
Pannag Sanketi
b8a9e15c2a Merge "Modify enum value of OMX_COLOR_FormatAndroidOpaque" 2011-08-26 20:05:58 -07:00
Pannag Sanketi
4da5660eee Modify enum value of OMX_COLOR_FormatAndroidOpaque
The enum value chosen earlier had a conflict with one of the vendors.

Change-Id: I47832dd1157447f89324d56e8ab146260cd7927c
2011-08-26 19:38:13 -07:00
Andreas Huber
539340fe2c Merge "Support for posting messages and synchronously waiting for a response." 2011-08-26 13:47:26 -07:00
Jean-Michel Trivi
22cb204cbb Bug 4364249 Play position is 0 after flushing AudioTrack
AudioTrack::stop() is not synchronous, so a stop() followed
 by flush(), which is synchronous, will not always report
 a playhead position of 0 after being called.
This CL adds a flag to mark a track as flushed, and report the
 correct playhead position in this state.
Bug 5217011 has been created to address the real issue in the
 future, where flush could be made synchronous, to properly
 address bug 4364249.

Change-Id: Icf989d41a6bcd5985bb87764c287f3edb7e26d12
2011-08-25 17:33:49 -07:00
Andreas Huber
e688257456 Support for posting messages and synchronously waiting for a response.
Change-Id: Id6c7a08c34fd5cb6c4632f78ece9e7898b29e52c
2011-08-25 16:28:18 -07:00
Pannag Sanketi
409f95ff89 Merge "Testing the GL/ CPU encoding w/ Gralloc buffers" 2011-08-24 15:18:07 -07:00
Pannag Sanketi
557b7092cc Testing the GL/ CPU encoding w/ Gralloc buffers
This is the test for Gralloc buffers based encoding.
contains a combination of two main changes:

1. GL based encoding tests added to SurfaceMediaSource_test

2. SurfaceMediaSource ::read() colorformat

The SurfaceMediaSource::getformat() sets it to OMX_COLOR_FormatAndroidOpaque.
The omx encoder needs to interpret that colorformat and reads the format
from the Gralloc buffers directly

Change-Id: Iee2fe8901384109a4952e1d6c528c59eb01eb5b1
2011-08-24 13:57:46 -07:00