7349 Commits

Author SHA1 Message Date
Lajos Molnar
24390c11b2 MediaFormat: add getInteger with default value convenience method
Change-Id: I58947a2f4a286fef74f74cb189469278056d4759
Signed-off-by: Lajos Molnar <lajos@google.com>
Bug: 10326117
2013-09-12 15:35:31 -07:00
Lajos Molnar
9d48089595 Fix CalledFromWrongThreadException in MediaPlayer's subtitle support
Call selectTrack/setSubtitleWidget only from MP's looper or the
applications's event thread, which is the same for now (we only
support subtitles in VideoView.)

Change-Id: Ic1de923b801f28657f37e0330b95c321931a6960
Signed-off-by: Lajos Molnar <lajos@google.com>
Bug: 10691837
Bug: 10326117
2013-09-12 15:35:31 -07:00
Lajos Molnar
03cd51cd17 Merge "MediaFormat.java: Add KEY_MAX_WIDTH and KEY_MAX_HEIGHT" into klp-dev 2013-09-12 00:19:17 +00:00
Eric Laurent
95a181397d Merge "Add HOTWORD as an AudioSource" into klp-dev 2013-09-12 00:15:31 +00:00
Eino-Ville Talvala
ede3eeb72c Merge changes Ia6300c23,Idd2ae8ad into klp-dev
* changes:
  Camera2: Immutable metadata
  Camera2: Listener rework and other API updates
2013-09-12 00:08:04 +00:00
Ruben Brunk
91019c9ef3 Merge "Remove dependency on JNIHelp header side effects." into klp-dev 2013-09-12 00:01:28 +00:00
Chong Zhang
bcb97996eb Merge "Pass subtitle track properties to SubtitleController" into klp-dev 2013-09-11 23:51:45 +00:00
Chong Zhang
f8ca13b7a0 Pass subtitle track properties to SubtitleController
Bug: 10326117
Change-Id: I387406adf3e1bd835b031dd5fbd2e1cdeaf2fe87
2013-09-11 15:02:47 -07:00
Zhijun He
e550446dcf Merge "ImageReader: Skip size check for BLOB format" into klp-dev 2013-09-11 21:31:54 +00:00
Eino-Ville Talvala
70c2207c34 Camera2: Immutable metadata
Make all camera metadata immutable once created; requests are
created using CameraRequest.Builder.

- Separate CameraMetadata implementation from interface
- Implement deep copying of metadata
- Requests/results/properties have-a native implementation

Bug: 10360518
Change-Id: Ia6300c237219d39f70c63156fa9ca666d951a36e
2013-09-11 13:18:10 -07:00
Zhijun He
37682135da ImageReader: Skip size check for BLOB format
HAL_PIXEL_FORMAT_BLOB is for JPEG capture, the buffer width/height by definition
shouldn't be the same as the image width/height.

Bug: 10360518
Change-Id: I32146a0e8e15439bb8fe199403db4ff37d1ab1af
2013-09-11 13:18:00 -07:00
Eric Laurent
d5da9de816 Stress test for AudioTrack shared memory bug
Changes in patch set 2:
 - add call to ProcessState::self()->startThreadPool()
 - remove dead code AudioSystem::get_audio_flinger
 - use simpler MemoryDealer isntead of MemoryHeapBase
 - AudioTrack now must be sp<> instead of raw pointer
 - use new constants from audio.h
 - change LOGx macros to ALOGx
 - fix file permission on Android.mk

Bug: 2801375
Change-Id: I899b08e0aa91deca328523f66f71e667011b4522
2013-09-11 12:48:17 -07:00
Dianne Hackborn
95d785346b Fix issue #10688644: Java crash in com.android.phone:
java.lang.SecurityException: Operation not allowed

There was a situation I wasn't taking into account -- components
declared by the system has a special ability to run in the processes
of other uids.  This means that if that code loaded into another
process tries to do anything needing an app op verification, it will
fail, because it will say it is calling as the system package name but
it is not actually coming from the system uid.

To fix this, we add a new Context.getOpPackageName() to go along-side
getBasePackageName().  This is a special call for use by all app ops
verification, which will be initialized with either the base package
name, the actual package name, or now the default package name of the
process if we are creating a context for system code being loaded into
a non-system process.

I had to update all of the code doing app ops checks to switch to this
method to get the calling package name.

Also improve the security exception throw to have a more descriptive
error message.

Change-Id: Ic04f77b3938585b02fccabbc12d2f0dc62b9ef25
2013-09-11 09:59:47 -07:00
Ruben Brunk
87eac99a21 Remove dependency on JNIHelp header side effects.
Bug: 10680559
Change-Id: I47870d6c48906e0a420c52b7bc5945ffe29c68a2
2013-09-10 20:47:43 -07:00
Eric Laurent
357263da0e Add HOTWORD as an AudioSource
- This is a low-priority source that can be preempted by others
- This is required for scenarios where someone wants an alway-on
  graceful microphone

Bug: 10640877.

Change-Id: Idb3577541103717cb713a7a93d3762ad2c2f4710
2013-09-10 18:03:10 -07:00
Zhijun He
82d11f8e94 Merge "MediaMuxer: Add setLocation API" into klp-dev 2013-09-10 19:41:11 +00:00
Glenn Kasten
d9f4e0cf2c Merge "AudioTrack.getTimestamp() return type is now boolean" into klp-dev 2013-09-10 16:36:23 +00:00
Zhijun He
cfd47481d1 MediaMuxer: Add setLocation API
This API could be used for camera recording when MediaMuxer is used to write
output media file.

Bug: 10594784
Change-Id: Ide2d6e1d87b246100a5def49bfb8646dc984a512
2013-09-10 07:52:25 -07:00
Glenn Kasten
596fb8e796 AudioTrack.getTimestamp() return type is now boolean
Change-Id: Ie231652dc0959343f0726dcb985b6715bfe014f6
2013-09-09 15:19:12 -07:00
Alan Viverette
013634cc44 Merge "Add WebVTT caption renderer" into klp-dev 2013-09-09 20:31:14 +00:00
Glenn Kasten
5e8f278f08 Unhide AudioTimestamp and getTimestamp
Change-Id: I56687f42f83c4be7dc3fd1baa81a13e71113f22e
2013-09-06 19:11:29 -07:00
Alan Viverette
d43daf361e Add WebVTT caption renderer
Currently missing support for region anchor points, robust layout
when snapping to lines, and vertical text.

BUG: 10260603
Change-Id: I3463b4aa0039442159144e66922d67f5dfee58ed
2013-09-06 18:06:23 -07:00
Lajos Molnar
9a4575c314 MediaFormat.java: Add KEY_MAX_WIDTH and KEY_MAX_HEIGHT
KEY_MAX_WIDTH and KEY_MAX_HEIGHT are optional video decoder
format keys.  Specify both to request seamless resolution-
change support from video decoders that support this feature.
You can check this via CodecCapabilities.isFeatureSupported.

The codecs use the MAX_WIDTH/HEIGHT values as hints for the
range of resolutions that needs to be supported.  Note,
however, that some codecs may require more memory just by
_preparing_ for larger maximum resolutions, whether or not
that resolution is actually used.

Change-Id: I00fe986ef894fec4bb39bceed081da0e88725d59
Signed-off-by: Lajos Molnar <lajos@google.com>
Related-to-bug: 7093648
2013-09-06 11:13:33 -07:00
Lajos Molnar
a67a4439ca MediaPlayer.MTP: fix issue when main thread had no looper
We fall back to using the application's main looper similarly to MP,
and even create our own looper if MP was created outside of an
application context.  Always creating our own looper is a waste
of resources.

Also resolved issue with MP.reset() when created outside of an
application context, and removed MP.MTP's unused getHandler().

Change-Id: I9c3b8a2f05a9e231ae9c008bc1a48d6b991cec1d
Signed-off-by: Lajos Molnar <lajos@google.com>
Bug: 10634238
2013-09-06 08:53:20 -07:00
Glenn Kasten
04c58e9ec1 Merge "Java API for AudioTrack timestamps" into klp-dev 2013-09-04 22:29:19 +00:00
Glenn Kasten
948c2e6ff4 Java API for AudioTrack timestamps
This change adds android.media.AudioTimestamp and
android.media.AudioTrack.getTimestamp, with implementation, but hidden.

Change-Id: Ic314f04ff775baca05c57d19b5ea91133dbd0be1
2013-09-04 15:23:27 -07:00
Lajos Molnar
171c63db92 Merge "Add subtitle support to VideoView." into klp-dev 2013-09-04 21:32:43 +00:00
Lajos Molnar
2a59f3f240 Merge "Internal WebVtt subtitle support" into klp-dev 2013-09-04 21:22:46 +00:00
Timothy Knight
1b039b1d2e Merge "Camera2: Updated Rational for denom=0." into klp-dev 2013-09-04 20:25:35 +00:00
Lajos Molnar
76935a5890 Internal WebVtt subtitle support
Change-Id: Ia55673a68a99c277dd6e3246e6f1913c8eb476d8
Signed-off-by: Lajos Molnar <lajos@google.com>
Bug: 10326117
2013-09-04 12:17:10 -07:00
Lajos Molnar
4958c9d616 Merge "Add MediaTimeProvider to MediaPlayer" into klp-dev 2013-09-04 18:58:12 +00:00
Timothy Knight
23c8809568 Camera2: Updated Rational for denom=0.
Handle NaN and INF using the same semantics as Java floats. No longer
throw an exception if a rational is constructed with a zero-denominator.

This commit is required for the ITS pdk app, since without it, the app
fails when it tries to deserialize rational values that are
(incorrectly) set to 0/0.

Bug: 10337323

Change-Id: I890ec2092f2945abc0f531fc46f9a7f5c71d2dbf
2013-09-04 16:58:58 +00:00
Ben Murdoch
295659002a Fix the build.
Fix javadoc typo.

Change-Id: I3e5f8f43650ce7b0958512bacc36e0ee744efa40
2013-09-04 13:09:10 +01:00
Lajos Molnar
484ff7a922 Add subtitle support to VideoView.
Change-Id: Ibfde491a624272c4f9733098529ad70c6aa93fe0
Signed-off-by: Lajos Molnar <lajos@google.com>
Bug: 10326117
2013-09-03 23:33:05 -07:00
Lajos Molnar
87399fc21b SubtitleController: update to new CaptioningManager APIs
This resolves the build issue.

Change-Id: I4db018c1abd9677ceb6d355921e4f7fa4be3b037
Signed-off-by: Lajos Molnar <lajos@google.com>
Bug: 10326117
2013-09-03 22:54:38 -07:00
Lajos Molnar
3d99856f80 Add MediaTimeProvider to MediaPlayer
Change-Id: Ie56331ef4eb4bdffa606598f241edb1cb2c2e2dc
Signed-off-by: Lajos Molnar <lajos@google.com>
Bug: 10326117
2013-09-03 19:23:25 -07:00
Lajos Molnar
03c25794b6 Internal subtitle base support
Change-Id: I3fc57d6280773dc24f4822be21c9497ae70f7374
Signed-off-by: Lajos Molnar <lajos@google.com>
Bug: 10326117
2013-09-03 17:19:56 -07:00
Lajos Molnar
a861245f06 Merge "VideoView: add addSubtitleSource" into klp-dev 2013-09-03 22:51:32 +00:00
Jean-Michel Trivi
4a5931e2ae Merge "Public API for RemoteControlClient ratings and editable metadata" into klp-dev 2013-09-03 17:19:55 +00:00
Lajos Molnar
af30982435 VideoView: add addSubtitleSource
A way to add external subtitle file to VideoView.

Change-Id: Ic110238408550a5b4088851bc5da5e94eb58d831
Signed-off-by: Lajos Molnar <lajos@google.com>
Bug: 10326117
2013-08-30 14:59:46 -07:00
Igor Murashkin
c7d515aa21 Merge "media: ImageReader throws OutOfResourcesException when out of buffers" into klp-dev 2013-08-29 18:59:10 +00:00
Jean-Michel Trivi
b23cd118ce Public API for RemoteControlClient ratings and editable metadata
A rating for RemoteControlClient content is:
  - a value between 0 and 100
  - or a value indicating there is no rating
 For a same piece of content, a rating can come from:
  - the user
  - "others" (i.e. not the user), to provide an average rating
 Rating styles are:
  - heart (a toggle)
  - thumb up / down
  - stars (with a configurable maximum number of stars)

For editable metadata, add:
  - methods to control which keys can be edited,
  - interface for an application to receive new values for a key.

Rating by user is editable metadata.

Bug 8440498

Change-Id: Ia9f61e750772658051cea1ac7c316187717f0f58
2013-08-29 11:41:04 -07:00
Marco Nelissen
ee9d443842 Merge "Use explicit intent for MediaScannerConnection" into klp-dev 2013-08-28 17:19:47 +00:00
Zhijun He
5b6ce5a292 Merge "ImageReader: Fix null listener case" into klp-dev 2013-08-28 02:22:37 +00:00
Igor Murashkin
d901c03375 media: ImageReader throws OutOfResourcesException when out of buffers
Bug: 10507939
Change-Id: I34c66485695ad6141388be85903cbecb9ebaa5ab
2013-08-27 16:42:24 -07:00
Zhijun He
e2a11bb74d ImageReader: Fix null listener case
Only do the handler check when listener is not null.

Bug: 10360518
Change-Id: I9940942ae95a492c92e028e5f862beea16e1da80
2013-08-27 16:02:21 -07:00
Eino-Ville Talvala
fb3d78118b Merge "Camera2: Add CameraDevice#flush()" into klp-dev 2013-08-27 16:49:04 +00:00
Jean-Michel Trivi
22e3eb64bf "Year" is an authorized metadate long field.
MediaMetadataRetriever.METADATA_KEY_YEAR is listed as one of the
 supported long fields but is not declared in the list of authorized
 long keys.

Change-Id: If277f0c300e2bfed10472e23a2eeba08bfa6ed33
2013-08-26 11:23:32 -07:00
Chong Zhang
5de1faca16 Merge "wifi-display: add certification options" into klp-dev 2013-08-23 23:18:52 +00:00
Jeff Sharkey
365768fd35 Merge "Return EXIF thumbnails when available." into klp-dev 2013-08-23 23:18:11 +00:00