6458 Commits

Author SHA1 Message Date
Eric Laurent
3172d5e3e7 AudioService: synchronized access to volume index
Add synchronization to prevent concurrent accesses to
volume indexes HashMap in VolumeStreamState.

Use ConcurrentHashMap for VolumeStreamState mIndex and
mLastAudibleIndex.

Issue 6421841.

Change-Id: I6dee805a79aa5e2cd0ba4072014a2fcdda4ed507
2012-05-10 14:55:20 -07:00
Andreas Huber
15ad6fe94d am b2725f7c: am 1bc1b8a5: Merge "Make sure crop rect information is visible from java." into jb-dev
* commit 'b2725f7c7e30dd547a81a8d057bbeab75f35616e':
  Make sure crop rect information is visible from java.
2012-05-10 11:58:22 -07:00
Pannag Sanketi
745e7f25c1 am b53bc725: am 1870c696: Merge "Adding disconnect call to the SurfaceTextureTarget" into jb-dev
* commit 'b53bc725655056ac275e745bfeeffeaf1479ea38':
  Adding disconnect call to the SurfaceTextureTarget
2012-05-10 11:58:09 -07:00
Ruei-sung Lin
a2172c4403 am af9eb5a0: am c2e393f8: Merge "pseudo random number generator in shader with limited precisions" into jb-dev
* commit 'af9eb5a05b7770fb5fb0901f0a1289951e24664e':
  pseudo random number generator in shader with limited precisions
2012-05-10 11:57:27 -07:00
Andreas Huber
1bc1b8a5b8 Merge "Make sure crop rect information is visible from java." into jb-dev 2012-05-10 11:42:15 -07:00
Dianne Hackborn
d293b4b339 am 1ccc8953: am e2c7e2ad: Merge "Add compression level key for FLAC encoding" into jb-dev
* commit '1ccc8953a0ef17076fc2f8088159556c70fbb9c5':
  Add compression level key for FLAC encoding
2012-05-10 11:38:59 -07:00
Andreas Huber
b842599e51 Make sure crop rect information is visible from java.
Change-Id: Ib914de3d42349efcd7af301d43bec82a21d24ce5
related-to-bug: 6471684
2012-05-10 11:32:15 -07:00
Pannag Sanketi
1870c69693 Merge "Adding disconnect call to the SurfaceTextureTarget" into jb-dev 2012-05-10 11:16:59 -07:00
Ruei-sung Lin
c2e393f86c Merge "pseudo random number generator in shader with limited precisions" into jb-dev 2012-05-10 10:02:44 -07:00
Jean-Michel Trivi
08fb063f07 Add compression level key for FLAC encoding
Change-Id: Ic4c32694841b6f37ca44061d14bb81fc267696cc
2012-05-09 19:16:14 -07:00
Pannag Sanketi
b939760679 Adding disconnect call to the SurfaceTextureTarget
Related to b/5873421.
When an app using the SurfaceTextureTarget filter and the activity goes
out of focus such as onPause(), the underlying surfacetexture might not
be available anymore to the filter. The filter needs to be told about
that so that it does try to render into the surface corresponding to the
surfacetexture. For example, in Camera app, the VideoCamera activity has
to let the underlying effects graph know about the disconnect in the
onPause() method.

Change-Id: Iee3af16715432d84fef4438d1671f4d6d261b3d7
2012-05-09 18:51:48 -07:00
Ruei-sung Lin
a75c7bbc63 pseudo random number generator in shader with limited precisions
Change-Id: I3289155824bf71b274c00d1b16366bb319588831
2012-05-09 17:33:25 -07:00
Andreas Huber
610ac933fc am 039495d3: am ea86b36f: Merge "Remove SEEK_CLOSEST constant from MediaExtractor, its implementation makes no" into jb-dev
* commit '039495d3dc19b96e3953fde81b74c44d0ac5c2f0':
  Remove SEEK_CLOSEST constant from MediaExtractor, its implementation makes no
2012-05-09 13:27:03 -07:00
Andreas Huber
f86374adec Remove SEEK_CLOSEST constant from MediaExtractor, its implementation makes no
sense for the java API.

Change-Id: I3f2eabb5ca5ffb6c1f03141bfd303310111e8774
related-to-bug: 6276111
2012-05-09 11:32:51 -07:00
James Dong
dc8967edf0 am 4c2a7bdf: am 3b5fdf51: Merge "Fix: Missed parcel recycling in MediaPlayer." into jb-dev
* commit '4c2a7bdf21ae2f1cba8abfbffa1ea749e2eaaa39':
  Fix: Missed parcel recycling in MediaPlayer.
2012-05-09 10:10:58 -07:00
Eric Laurent
ec9323509d am 776339fe: am c8ade15d: Merge "Silent and Vibrate mode clean up" into jb-dev
* commit '776339fe4c6254fd8e344496a793ce4a11b6f450':
  Silent and Vibrate mode clean up
2012-05-09 10:10:07 -07:00
Andreas Huber
de8fe04ca5 am 10ae406f: am eb194d5d: Merge "Return codec buffers that are marked as having host endianness." into jb-dev
* commit '10ae406f00dc51d6462116f1ac7fca103fd27288':
  Return codec buffers that are marked as having host endianness.
2012-05-09 10:09:53 -07:00
Andreas Huber
c34df8ba52 am 17b3420f: am c2182c67: Merge "Clarification of MediaCodec behaviour when codec specific data is included" into jb-dev
* commit '17b3420f4e1edcf4a0e5460fbe9f4fb3cd49faca':
  Clarification of MediaCodec behaviour when codec specific data is included
2012-05-09 10:09:35 -07:00
Insun Kang
8902097bb6 Improve notifying TimedText by reducing marshall/unmarshalling.
o Removes mParcel from TimedText class.
o Converts native parcel into java parcel object directly without
copying to an intermediate byte array.
o JNIMediaPlayerListener::notify checks for Java exceptions, logs them,
and clears the exception state.

related-to-bug: 6405934

Change-Id: I8b82d3cd5b9b3ef8cad27e805202a0e445a88a45
2012-05-09 20:14:09 +09:00
James Dong
3b5fdf510b Merge "Fix: Missed parcel recycling in MediaPlayer." into jb-dev 2012-05-08 18:29:44 -07:00
Eric Laurent
c8ade15dad Merge "Silent and Vibrate mode clean up" into jb-dev 2012-05-08 15:15:49 -07:00
Eric Laurent
bffc3d1bd3 Silent and Vibrate mode clean up
Clean up related to new Vibration policy.
The vibrate behavior is now only derived from:
 - presence of a vibrator on the device
 - current ringer mode selected: NORMAL, VIBRATE or SILENT
If no vibrator is present the ringer mode can only be NORMAL or SILENT.

The control of ringer mode via volume keys when volume keys control the "master"
stream type (RING on phones, MUSIC on tablets) is as follows:
If a vibrator is present:
 VOL- and volume equals 1: NORMAL => VIBRATE
 VOL- and volume equals 0 and not continuous press: VIBRATE => SILENT
 VOL+ and in SILENT mode: SILENT => VIBRATE
 VOL+ and in VIBRATE mode: VIBRATE => NORMAL, volume = 1
If no vibrator is present:
 VOL- and volume equals 0 and not continuous press: NORMAL => SILENT
 VOL+ and in SILENT mode: SILENT => NORMAL, volume = 0

VIBRATE_ON and VIBRATE_IN_SILENT settings are not stored/retreived any more.

AudioService checks and corrects ringer mode and stream volumes if necessary when reading from
DB at boot time.

Also:
 Added dump for stream volumes in AudioService.
 Added device names missing in AudioSystem for USB accessory and USB device.

Issue: 6036529
Issue: 6414950
Issue: 6448163

Change-Id: I77fb821ec63e4e566320cac2701b4ac466e86aef
2012-05-08 15:10:37 -07:00
Andreas Huber
3dd7fd08a8 Return codec buffers that are marked as having host endianness.
Change-Id: Iedfd829d108e65ee368909af14ace68b63e0e168
related-to-bug: 6364139
2012-05-08 13:50:45 -07:00
Andreas Huber
8aa735f71e Clarification of MediaCodec behaviour when codec specific data is included
in the format passed to configure().

Change-Id: I150f52e8092c0f7d897891f02ba6b1d89b6230f4
related-to-bug: 6364139
2012-05-08 11:33:12 -07:00
Jeff Sharkey
54cb5592b6 am 83abfb3c: am 476b03b0: Merge "Handle silent ringtone, title without permission." into jb-dev
* commit '83abfb3cab53314fd5a7601e427b4b8b714f6f06':
  Handle silent ringtone, title without permission.
2012-05-08 11:32:45 -07:00
Jeff Sharkey
1d8e5c5880 Handle silent ringtone, title without permission.
Silent ringtones have a valid Uri, but isn't openable by MediaPlayer,
so treat as no-op playback instead of throwing.  Also handle missing
permissions when resolving title.

Bug: 6448074, 6447538
Change-Id: I656675d7fc2e78a6ba05824e13bdd43193fcfdf2
2012-05-07 13:30:10 -07:00
Insun Kang
be0ea968bf Fix: Missed parcel recycling in MediaPlayer.
Change-Id: I2c99f771b33bf627af10e8baea455181558360e6
related-to-bug: 6405934
2012-05-07 11:31:18 +09:00
Jean-Baptiste Queru
2f81ea26f1 Merge "Update notice files for libstagefright codecs." 2012-05-06 18:22:24 -07:00
Andreas Huber
4b27a9133e am 9d8aa0e4: am c52c957c: Merge "Various changes to Media* APIs requested by the api council." into jb-dev
* commit '9d8aa0e4ac0498e2a139bd60342d986c42251e2b':
  Various changes to Media* APIs requested by the api council.
2012-05-04 08:58:22 -07:00
Andreas Huber
c52c957c45 Merge "Various changes to Media* APIs requested by the api council." into jb-dev 2012-05-04 08:53:23 -07:00
Christopher Tate
f131611d03 resolved conflicts for merge of b89ce434 to master
Change-Id: Ida7ef25adc2f4b9f22d8662c9f0e8a1ec9df0d55
2012-05-03 18:18:34 -07:00
Andreas Huber
60d610bf10 Various changes to Media* APIs requested by the api council.
Change-Id: Iec2f50c99cf5f00a442737231361334e9ab46340
related-to-bug: 6432753
2012-05-03 16:02:29 -07:00
Christopher Tate
b89ce43499 Add streamlined config-based path for no volume key sounds
This lets us avoid a Binder roundtrip to the system process during
volume changes.  Previously volume change would be staged at key-down,
then applied at key up in tandem with playback of the sonic feedback
about volume key presses.  The reason for this two-stage handling was
to defer playback of the sound [at the target volume] while the volume
key was being held for repeat.

On some devices volume is always sent as key down/up pairs rather than
down-repeat-up sequences. On these devices it is more efficient to
apply the new volume immediately during down handling, and have the
up handling be a no-op.  This CL adds a configuration resource item
selecting this new fast path.

Bug 6433943

Change-Id: Icffa56e958243b841d514e2fe4609ba3a7b20f14
2012-05-03 15:41:34 -07:00
Jean-Baptiste Queru
cd9adbcea0 am 00f94e88: Merge "Enable chromium http stack for x86"
* commit '00f94e88f96ed87c95ea65563396609c61e72dca':
  Enable chromium http stack for x86
2012-05-03 15:14:56 -07:00
Jean-Michel Trivi
c919816155 Merge "Make AudioService aware of device orientation changes" into jb-dev 2012-05-03 15:13:06 -07:00
Ruei-sung Lin
cc6475e173 Fix b/5974573 Please increase intensity of film grain effect
Change-Id: Ia984aa91bf3ae8aef47e24a0074b1b0f1624c1a0
2012-05-03 13:08:15 -07:00
Ruei-sung Lin
f4b403159f Fix b/5974247
Change-Id: I8c5cf035f195142607875739604d163c7a43e305
2012-05-02 15:16:57 -07:00
Jean-Michel Trivi
f26f01784e Make AudioService aware of device orientation changes
If the "ro.audio.monitorOrientation" system property is
 defined and true, monitor device configuration changes
 and see if the device orientation changed. If it did,
 set the "orientation" audio system parameter to one
 of "landscape", "portrait", "square" or "undefined".
Set orientation when starting AudioService, and
 when media server restarts.

Change-Id: Idce548f93abf3aab30149e5952daaa7051630232
2012-05-02 11:20:22 -07:00
Jun Tian
ba71cdcba4 Enable chromium http stack for x86
Use chromium http stack as the online media http stack for x86 platform.

Change-Id: I16a7a8697127a51fab8105833f7463911852f0b3
2012-05-02 15:12:45 +08:00
Eric Laurent
f3afe15754 Merge "AudioManager: deprecate vibrate settings" into jb-dev 2012-05-01 16:29:39 -07:00
Eric Laurent
cd1cd73bae AudioManager: deprecate vibrate settings
Deprecate methods, intent and constants related to vibrate
settings management: getVibrateSetting(), setVibrateSetting(),
shouldVibrate() ...

According to new vibrate/notification policy, applications should
maintain their own vibrate settings.

Issue 6036529.

Change-Id: I99bcef2c5f602131f1d9b0222f7fb39f3bbef823
2012-05-01 16:26:04 -07:00
Jean-Baptiste Queru
78821e8e22 am 1b34c1bc: Merge "stagefright: Remove useless declarations"
* commit '1b34c1bc240e6c2e085eee2b03c728b56b049e23':
  stagefright: Remove useless declarations
2012-05-01 15:37:18 -07:00
Jean-Baptiste Queru
1b34c1bc24 Merge "stagefright: Remove useless declarations" 2012-05-01 14:48:06 -07:00
James Dong
cb6662ac53 Merge "Add video scaling mode support with a new public method in MediaPlayer.java class" into jb-dev 2012-05-01 13:34:28 -07:00
Andreas Huber
48dc91b514 Make java constants consistent with native counterparts.
Change-Id: I481dfc18c170b4c60682ef1b38b57e10fb73d004
2012-05-01 12:27:26 -07:00
James Dong
454014e55f Add video scaling mode support with a new public method in MediaPlayer.java class
o related-to-bug: 5454345

Change-Id: I379b679eb6dd87f47f87a58791a5d0c7251b3a74
2012-05-01 12:22:35 -07:00
Eric Laurent
94affdd80e Merge "fix unmute from volume panel on tablets" into jb-dev 2012-05-01 10:47:57 -07:00
Eric Laurent
f740664cd8 fix unmute from volume panel on tablets
Changing STREAM_MUSIC from volume panel on tablets should exit silent
mode as does changing STREAM_RING on phones.

Issue 5970208.

Change-Id: Ia8ed62033da07a5d4dfcfa84b0b47b27414bdd9a
2012-05-01 10:05:21 -07:00
Jean-Michel Trivi
8ccfbdddab Merge "Optimize how AudioService receives media button events" into jb-dev 2012-05-01 08:57:18 -07:00
Ruei-sung Lin
56ce3c00fb Merge "Fix b/5821633: Could not activate GLEnvironment" into jb-dev 2012-04-30 17:55:09 -07:00