6569 Commits

Author SHA1 Message Date
Jeff Brown
64a55af0ac Add plumbing for new surface flinger display API.
Cleaned up the implementation of Surface and SurfaceSession
to use more consistent naming and structure.

Added JNI for all of the new surface flinger display API calls.

Enforced the requirement that all Surfaces created by
the window manager be named.

Updated the display manager service to use the new methods.

Change-Id: I2a658f1bfd0437e1c6f9d22df8d4ffcce7284ca2
2012-08-27 14:34:54 -07:00
Jean-Baptiste Queru
c77c6898b3 am 3221b333: am 26ad1e78: am 03d16e12: Merge "Make setCaptureRate locale safe"
* commit '3221b33322b480fe9d4ba9dc0e7cd684ebe8c96a':
  Make setCaptureRate locale safe
2012-08-27 13:10:57 -07:00
Jean-Baptiste Queru
3221b33322 am 26ad1e78: am 03d16e12: Merge "Make setCaptureRate locale safe"
* commit '26ad1e7874f3151ec331e142fdcb8b3a22ddc26a':
  Make setCaptureRate locale safe
2012-08-27 11:29:29 -07:00
Johan Redestig
1c7928e8c6 Make setCaptureRate locale safe
Dont use the default String.format in setCaptureRate as it is both
locale unsafe and less efficient than regular string concatenation
in this case.

Change-Id: I29418ec0352ef8c79967592b6eb8ff66cc9c99f0
2012-08-27 14:24:10 +02:00
James Dong
2adac496a8 Added some common error codes in MediaPlayer.java
o related-to-bug: 6770717

Change-Id: Iea8ba6943755a9af8df5b6e91284c7c1b32c3c6c
2012-08-26 14:15:57 -07:00
Marco Nelissen
c209a06cfd Let apps provide a custom data source for extractors
Adds android.media.DataSource, which is modeled after its native namesake,
and a new method on MediaExtractor that lets apps specify their implementation
of a DataSource as the source of data for the extractor.

Change-Id: If1b169bd18d2691ebc4f8996494dfc8ee0894b6c
2012-08-24 10:36:51 -07:00
Teng-Hui Zhu
2253eeab6c Add context support into the filter framework.
Basically we need the context to pass the content URI into MediaPlayer.
bug:6837809

Change-Id: I9390b57baff06f80246584fb3a4b746e1a308ff2
2012-08-21 14:17:02 -07:00
Jean-Baptiste Queru
1abb7b5415 am f96fcd50: am 26f8ce83: Merge "To avoid the JNI memory leaks in video editor codes"
* commit 'f96fcd5095e751fc9402d8bbecdf59f53e00d854':
  To avoid the JNI memory leaks in video editor codes
2012-08-20 15:26:53 -07:00
Jean-Baptiste Queru
f96fcd5095 am 26f8ce83: Merge "To avoid the JNI memory leaks in video editor codes"
* commit '26f8ce83e04c4efd10c09bb83cfacdcd154d9450':
  To avoid the JNI memory leaks in video editor codes
2012-08-20 14:50:45 -07:00
bo huang
240582eabe MtpData bmp format file can't recognize when copy bmp into DUT
add support for bmp format.

Change-Id: I67d4703b43cd32abad638bae57bbceb65b4be6de
Author: bo huang <bo.b.huang@intel.com>
Signed-off-by: bo huang <bo.b.huang@intel.com>
Signed-off-by: Wu, Hao <hao.wu@intel.com>
Singed-off-by: Shuo Gao <shuo.gao@intel.com>
Signed-off-by: Bruce Beare <bruce.j.beare@intel.com>
Signed-off-by: Jack Ren <jack.ren@intel.com>
Author-tracking-BZ: 24555
2012-08-17 10:28:51 +08:00
wfeng6
c96a7294a4 To avoid the JNI memory leaks in video editor codes
There is a protential memory leak in video editor JNI codes.
When importing so many video clips, the number of local reference
will exceed 512, which will cause the Dalvik virtual machine
crash. The patch will free each local reference when it's no
longer used to avoid memory leaks.

Change-Id: Iecd986c83f05a1103641746d6d43eef0a9c5ee40
Author: Wei Feng <wei.feng@intel.com>
Signed-off-by: Wei Feng <wei.feng@intel.com>
Singed-off-by: Shuo Gao <shuo.gao@intel.com>
Signed-off-by: Bruce Beare <bruce.j.beare@intel.com>
Signed-off-by: Jack Ren <jack.ren@intel.com>
Author-tracking-BZ: 40786
2012-08-17 10:22:57 +08:00
Jean-Baptiste Queru
97fb26c838 am b18bcf13: am d2fb6e99: Merge "Fix Issue #35489: drm content corruption on GB"
* commit 'b18bcf13fd47102a2527e599cde0b1d59ab7c51e':
  Fix Issue #35489: drm content corruption on GB
2012-08-16 15:32:55 -07:00
Jean-Baptiste Queru
b18bcf13fd am d2fb6e99: Merge "Fix Issue #35489: drm content corruption on GB"
* commit 'd2fb6e99bda1ae607b5dfbb68905030f2133f8e8':
  Fix Issue #35489: drm content corruption on GB
2012-08-16 15:29:47 -07:00
git-you.kim72.gmail.com
fd20296c27 Fix Issue #35489: drm content corruption on GB
If rawContent is copied into mediaBuf, readBuf is copied to wrong address.
mediaBuf should be forwarded by readBytes.

Change-Id: I4fc9c1f7f4e3d5dfe3c7e5cd92261608f6b3e248
Signed-off-by: git-you.kim72.gmail.com <you.kim72@gmail.com>
2012-08-13 15:03:48 -07:00
Jean-Baptiste Queru
0bf666a875 am 4da3769d: Merge "mediacodec: Don\'t crash if trying to open a codec that does not exist"
* commit '4da3769d30851f0b517a688a5c835715d7d0b0bf':
  mediacodec: Don't crash if trying to open a codec that does not exist
2012-08-13 09:48:24 -07:00
Martin Storsjo
e68323325b mediacodec: Don't crash if trying to open a codec that does not exist
Change-Id: If75e3156517993629f50622a84a9ac573fced815
2012-08-13 08:47:01 -07:00
Jean-Baptiste Queru
d0604565ee am d2388b50: am 53ad027c: Merge "MtpStorage: correct the size of reserve space for MTP"
* commit 'd2388b50a5c16b920bdd656448107a21e49d753b':
  MtpStorage: correct the size of reserve space for MTP
2012-08-10 12:44:09 -07:00
Jean-Baptiste Queru
d2388b50a5 am 53ad027c: Merge "MtpStorage: correct the size of reserve space for MTP"
* commit '53ad027c46bf578e26e5db70319b17a671ce8a36':
  MtpStorage: correct the size of reserve space for MTP
2012-08-10 09:26:47 -07:00
Jean-Baptiste Queru
53ad027c46 Merge "MtpStorage: correct the size of reserve space for MTP" 2012-08-10 09:03:42 -07:00
Jean-Baptiste Queru
6736cca08d am 52410be8: Merge "mediacodec: Don\'t suggest calling getOutputFormat() immediately"
* commit '52410be8ec092bfa7e84f2d8facdc161d6107ac3':
  mediacodec: Don't suggest calling getOutputFormat() immediately
2012-08-08 13:08:21 -07:00
James Dong
aef4af4cd1 Merge "Add MEDIA_ERROR_SERVER_DIED error constant to MediaRecorder.java class" into jb-mr1-dev 2012-08-08 11:38:05 -07:00
James Dong
a35379ae98 Add MEDIA_ERROR_SERVER_DIED error constant to MediaRecorder.java class
o As a result, applications can listen for death notification from MediaRecorder onError callbacks

Change-Id: I49896c4ae8130bd67b52deff6eb97a22b43d3f32
2012-08-07 19:15:35 -07:00
Mike Lockwood
2d286f4984 MediaFile: Fix case sensitive file extension matching for computing MTP format code
Bug: 6939136

Change-Id: Iefd4083aefbd4b175a2f8c860a9e13c99ded9c82
Signed-off-by: Mike Lockwood <lockwood@google.com>
2012-08-07 14:43:59 -07:00
Martin Storsjo
d932de9aff mediacodec: Don't crash if trying to open a codec that does not exist
Change-Id: If75e3156517993629f50622a84a9ac573fced815
2012-08-07 11:11:24 -07:00
Martin Storsjo
b529e4c9ca mediacodec: Don't suggest calling getOutputFormat() immediately
Calling getOutputFormat() at this point currently crashes in
native code. (After a fix to the native code, this gives an
IllegalStateException instead.)

Change-Id: Ia45c4820bb3d9ed435a0aeef1ff8c230524f2e1f
2012-08-07 11:07:12 -07:00
bo huang
3b60dacb4e MtpStorage: correct the size of reserve space for MTP
According to description in frameworks/base/core/res/res/xml/storage_list.xml,
"mtpReserve: (integer) number of megabytes of storage MTP should reserve for free storage".
Mtpstorage class use it directly and doesn't change it to correct size in megabyes.
Mtp initor can not get correct storage information from android.

Change-Id: Icf59eb1eb478e67ea5990be96a9decb41aa55504
Signed-off-by: Bo Huang <bo.b.huang@intel.com>
Signed-off-by: Jack Ren<jack.ren@intel.com>
Signed-off-by: Bruce Beare <bruce.j.beare@intel.com>
2012-08-07 13:02:59 +08:00
Marco Nelissen
8ab2dc2f96 Improve scan time for some cases
When the path being matched has a sqlite wildcard character in it, a "like"
match will be quite slow. Unfortunately this is fairly common, since "_"
is a wildcard character. However, because in most cases the case of the path
in the database will match the case on disk, an "=" match will work, so it
is worthwhile to try an "=" match first, before trying a "like".

If there are no wildcard characters, the "like" will be as fast as the "=",
because of the case-insensitive index on the _data column, so there is no
need to try "=" first in that case.

b/6751354

Change-Id: I1cd4efbd56a37886cb44a86acb73eb9a3c9f303d
2012-08-02 12:32:05 -07:00
James Dong
9984833191 Added a key to retrieve the rotation angle in MediaMetadataRetriever.java class
o related-to-bug: 6872687

Change-Id: I94569bb8357c39e8309974ede8284b33a996866c
2012-07-31 14:50:49 -07:00
James Dong
b10ec1f4b1 Fix a typo (dependant => dependent)
Change-Id: I0337bec1a26e852c32ea9f1ce54f270f79ee3ab1
2012-07-30 15:45:50 -07:00
Jean-Michel Trivi
1f9196a8e5 Relax rules for media apps to stay on RemoteControlDisplay
The playback of notification would make the display of the
 RemoteControlClient disappear from the lockscreen.

Fixed by modifying which AudioFocus owner to consider when
 reevaluating how the RemoteControlDisplay needs to be updated:
 use the first (starting from the top of the AudioFocus stack) that
 uses STREAM_MUSIC, or that uses any other stream type for a short
 period.

Change-Id: Id7cef00c5eed1f6ebfa59634eea8e2c9b2f3f5eb
2012-07-27 11:34:02 -07:00
Jean-Baptiste Queru
33806e25b1 Remove unnecessary stagefright notices
They now live in frameworks/media

Change-Id: Ic8b457c422359f260d6a1fed8c499b74aa9c6491
2012-07-26 14:10:16 -07:00
Jeff Smith
ddd88726a2 am 71930dd7: am a45746ef: Fix several cases of broken droiddoc syntax external issue 35214
* commit '71930dd77e4dc6f6be5c648019d2ab0da5f0584c':
  Fix several cases of broken droiddoc syntax external issue 35214
2012-07-25 15:05:23 -07:00
Jeff Smith
71930dd77e am a45746ef: Fix several cases of broken droiddoc syntax external issue 35214
* commit 'a45746efadd11bb7dfab026fb3c81a25fae74ca4':
  Fix several cases of broken droiddoc syntax external issue 35214
2012-07-25 10:56:03 -07:00
Jeff Smith
a45746efad Fix several cases of broken droiddoc syntax
external issue 35214

patch contributed by Jeff Smith <whydoubt@yahoo.com>

Change-Id: I70dcee88a140699bf3e1ab369bed6dcd2fdd3d83
2012-07-25 10:49:25 -07:00
James Dong
15a89e6b48 Added MEDIA_INFO_VIDEO_RENDERING_START as an informational event
o MEDIA_INFO_VIDEO_RENDERING_START indicates that the player just pushed the very first video frame
  of a video source for rendering.

Change-Id: I32dad93990f5d48b70fc79d841ca3ce3b1af4027
related-to-bug: 6851811
2012-07-23 15:47:27 -07:00
James Dong
c64c1cbef4 am d1a0a53e: am 5d478b9c: Merge "Changed to obtain a parcel in each notify() call in jni." into jb-dev
* commit 'd1a0a53eec141b615697652b3a8907a60298a414':
  Changed to obtain a parcel in each notify() call in jni.
2012-07-18 20:18:41 -07:00
James Dong
d1a0a53eec am 5d478b9c: Merge "Changed to obtain a parcel in each notify() call in jni." into jb-dev
* commit '5d478b9c1009b077649f7f870d993832d380d63c':
  Changed to obtain a parcel in each notify() call in jni.
2012-07-18 20:15:11 -07:00
James Dong
5d478b9c10 Merge "Changed to obtain a parcel in each notify() call in jni." into jb-dev 2012-07-18 18:43:37 -07:00
Adam Powell
41a48e4a99 am c36b8acd: am 38895394: Merge "Properly switch MediaRouter to wired audio over a2dp." into jb-dev
* commit 'c36b8acd1e850619de0bbf678b9573d4d761d836':
  Properly switch MediaRouter to wired audio over a2dp.
2012-07-16 17:36:49 -07:00
Adam Powell
c36b8acd1e am 38895394: Merge "Properly switch MediaRouter to wired audio over a2dp." into jb-dev
* commit '388953942b536b5eebd942ef78ae5b7499bc2078':
  Properly switch MediaRouter to wired audio over a2dp.
2012-07-16 17:33:40 -07:00
Martin Storsjo
fdd3241a24 mediacodec: Don't suggest calling getOutputFormat() immediately
Calling getOutputFormat() at this point currently crashes in
native code. (After a fix to the native code, this gives an
IllegalStateException instead.)

Change-Id: Ia45c4820bb3d9ed435a0aeef1ff8c230524f2e1f
2012-07-13 14:10:21 +03:00
Adam Powell
bcf21e913a Properly switch MediaRouter to wired audio over a2dp.
The system gives priority to physically connected
headphones/speakers/docks/etc. Reflect this in MediaRouter and
associated UI.

Bug 6777592

Change-Id: Ibabf3d7512207117e892c99f004443490c3d0612
2012-07-12 16:53:04 -07:00
Yu Shan Emily Lau
0fb362b41e am 413b5c19: am 10366b93: Merge "Remove the unnecssary intent call." into jb-dev
* commit '413b5c19a681bb4fda4cc5a6e8347d37792aa905':
  Remove the unnecssary intent call.
2012-07-10 16:51:20 -07:00
Yu Shan Emily Lau
413b5c19a6 am 10366b93: Merge "Remove the unnecssary intent call." into jb-dev
* commit '10366b93157718ed8621f5af087e7a771191b41a':
  Remove the unnecssary intent call.
2012-07-10 16:49:31 -07:00
Yu Shan Emily Lau
10366b9315 Merge "Remove the unnecssary intent call." into jb-dev 2012-07-10 16:47:09 -07:00
Yu Shan Emily Lau
e60393ae71 Remove the unnecssary intent call.
Change-Id: Ia0a460ca8532ccb2f4b0f0205d192b1ba907b5b6
2012-07-10 16:45:38 -07:00
Jean-Michel Trivi
f2b0c11f4e Fix sound effect attenuation calculation
The sound effect volume attenuation calculation is wrong: the
 division by 20 was always returning 1 or 0.
In AudioService, rename the sound effect attenuation value to
 follow the naming conventions for static variables.

Change-Id: I3c36d50f4470ff09ca98cb944aefb5ad0f968782
2012-07-10 13:24:23 -07:00
Eric Laurent
28b7809e30 Merge "AudioService: fix a2dp force use delay" 2012-07-10 09:46:54 -07:00
Insun Kang
333c09945e Changed to obtain a parcel in each notify() call in jni.
Change-Id: I5faf0f5d1fdf76a5b4bd1cff37aa58df79d18e85
related-to-bug: 6785452
2012-07-10 22:23:01 +09:00
Eric Laurent
c390bed06b AudioService: fix a2dp force use delay
Fixed setBluetoothA2dpOnInt() so that AudioSystem.setForceUse()
is called synchronously and not via a message.

This is because the order in which setForceUse() and setDeviceConnectionState()
are executed is important to avoid audio glitches when called from
onSetWiredDeviceConnectionState().

Bug 6720482.

Change-Id: I09c975d1108fd38f31b047c082acdf944ab790a7
2012-07-09 10:50:37 -07:00