2286 Commits

Author SHA1 Message Date
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
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
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
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
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
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
Chong Zhang
1f3ecaae63 wifi-display: add certification options
When certification mode is enabled:

- Pass wfd session info to wifi display settings

- Allow sink to connect to source

- Add interface in display manager for pausing/resuming session

- Add interface in WifiP2pManager for setting lc, oc and starting
  autonomous GO

Note that we're compliant regardless of certification mode, but
some confusing options (eg. allowing incoming connection from
sink) we want to hide when not being tested.

Bug: 9371882
Change-Id: Icc7dcae4e046453796cfa03f5f197055fabf234b
2013-08-23 16:02:09 -07:00
Jeff Sharkey
6398343e83 Return EXIF thumbnails when available.
Adds new ExifInterface method to extract the thumbnail range from
a larger image file, and use that to return an AssetFileDescriptor.

When decoding an AssetFileDescriptor thumbnail with offsets, read out
the raw data entirely, since Skia uses lseek() aggressively.

Bug: 10412208
Change-Id: I7906cdf82c0c3794cec7043c801a86f66efeb143
2013-08-23 12:19:19 -07:00
Zhijun He
af753a2dfc ImageReader: Fix API doc table misalignment issue
Also cleanup unused macro in ImageReader.

Bug: 10360518
Change-Id: I2332703c92df771a6339ff92069e92d50a6c5cd5
2013-08-23 09:25:27 -07:00
Jeff Tinker
76cf8fe75e Merge "Add ability to test supported content types to MediaDrm" into klp-dev 2013-08-22 23:08:07 +00:00
Marco Nelissen
f7bcf1951c Use explicit intent for MediaScannerConnection
b/10278751

Change-Id: I3fbc2b935a4fe6ec449c4bbf79400d4b48e613f7
2013-08-22 14:36:26 -07:00
Jean-Michel Trivi
198bc229c3 Merge "Ratings for RemoteControl" into klp-dev 2013-08-22 18:33:25 +00:00
Jean-Michel Trivi
f823fc4dba Ratings for RemoteControl
Add support for metadata of a RemoteControlClient that can be
 updated:
 - methods to control which keys can be edited,
 - interface for an application to receive new values for a key.

Add definitions for ratings.
 A rating 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)

Rating by user is editable metadata.

Bug 8440498

Change-Id: I1d45972f9ace4cb505ee0757e917f1d5dedd264e
2013-08-22 09:29:19 -07:00
Jeff Tinker
7cda491321 Add ability to test supported content types to MediaDrm
bug: 10244066
Change-Id: Ic96c2e23f36809faf1c88ede500f4bc2bad4142a
2013-08-21 17:30:06 -07:00
Johan Gustavsson
7337bee783 Updating Force Use toggling for Communication use case
setForceUse toggling is shaky when toggling either through
setSpeakerphoneOn and setBluetoothScoOn. Depending on call sequence
an application may unintentionally trigger a routing use case it
does not want.
The main root cause is that neither of these calls take the
previous state into account. A call to setSpeakerPhoneOn will for
example partly disable any active BT SCO routing.

Change-Id: I436ee5a8da2d9ea5a2e4e89eec083c8118a5ff7e
2013-08-21 09:35:20 -07:00
Chong Zhang
ea18a8db65 Merge "MediaPlayer: add listener for subtitle data" into klp-dev 2013-08-20 18:25:05 +00:00
Chong Zhang
a3132d975b Merge "MediaPlayer.TrackInfo: add getFormat() method" into klp-dev 2013-08-20 18:23:12 +00:00
Eric Laurent
dfb881f96a AudioSystem: new audioflinger restart detection
Add a specific method to AudioSystem for AudioService to poll
for AudioFlinger service restart instead of relying on current
callback mechanism which is flaky.

Bug: 9693068.
Change-Id: Id21d142a22b257205700201978cce1cb8b15180d
2013-08-19 18:26:21 -07:00
Jeff Brown
194c140c34 Merge changes Id3815fe8,I90a85921 into klp-dev
* changes:
  Define AudioSource.REMOTE_SUBMIX.
  Remove setRemoteSubmixOn method.
2013-08-19 23:57:11 +00:00
Jeff Brown
64dfb604e7 Define AudioSource.REMOTE_SUBMIX.
Add an API to allow applications to record from the remote
submix when they have the required permissions.

Bug: 10265163
Change-Id: Id3815fe82a6713e058ce4b8ab6128a898481df7e
2013-08-19 16:42:07 -07:00
Andreas Huber
e79ba15453 Merge "Expose KEY_REPEAT_PREVIOUS_FRAME_AFTER and KEY_PUSH_BLANK_BUFFERS_ON_STOP" into klp-dev 2013-08-19 15:39:29 +00:00
Matthew Xie
f855a2ff01 Merge "Adding support for Absolute Volume" into klp-dev 2013-08-18 19:46:42 +00:00
Jeff Brown
f15ef4b02c Remove setRemoteSubmixOn method.
The submix will be controlled automatically from now on based on
whether there is an active audio recorder.

Bug: 10265163
Change-Id: I90a8592136c6507680e70f054243df70cc82efad
2013-08-16 20:21:09 -07:00
Chong Zhang
83ddaf664c MediaPlayer: add listener for subtitle data
Bug: 10326117

Change-Id: I8fbd54df70e37a061c7c875743ded09f1922ef8f
2013-08-16 14:38:48 -07:00
Igor Murashkin
aa973d1d0b Merge "media: Fix ImageReader only using maxImages=1 no matter what" into klp-dev 2013-08-16 21:04:15 +00:00
John Du
5a0cf7a27f Adding support for Absolute Volume
Change-Id: I7bbc6f9296221ca219a50a5e377ebac9dcf5a407
2013-08-16 12:25:20 -07:00
Igor Murashkin
dd0643202d media: Fix ImageReader only using maxImages=1 no matter what
- No longer return null when some bad error happens
- Throws OutOfResourcesException when images need to be closed
- Throws IllegalStateException when an unknown internal error happens

Bug: 10333400
Change-Id: Ia53a5dd33f9ce53abd036e080e6fcc4ded9b251d
2013-08-16 12:20:09 -07:00
Lajos Molnar
1c56a67dbb MediaPlayer.TrackInfo: add getFormat() method
This returns the MediaFormat of the track or null (for now).

Change-Id: Ib88fc229b661942b2ed136204fdc43da427d7aed
Signed-off-by: Lajos Molnar <lajos@google.com>
Bug: 10326117
2013-08-15 12:35:14 -07:00
Lajos Molnar
dc775c66bf MediaFormat: added subtitle format
Added KEY_LANGUAGE that for now only refers to subtitles.
Added createSubtitleFormat() method to create base format.

Signed-off-by: Lajos Molnar <lajos@google.com>
Change-Id: I344c36a3fd0d88c285cdebf3f67e549553b37a8e
Bug: 10326117
2013-08-15 11:43:02 -07:00
Andreas Huber
8f4d43c3c4 Expose KEY_REPEAT_PREVIOUS_FRAME_AFTER and KEY_PUSH_BLANK_BUFFERS_ON_STOP
MediaFormat keys.

Change-Id: I37ec076f0b1f0aea9a460c9dc1751f1160860df9
2013-08-14 10:42:47 -07:00
Andreas Huber
ca2fb9158e Merge "Expose MediaCodec.setParameters API to" into klp-dev 2013-08-14 15:39:17 +00:00
Lajos Molnar
80c4437ebf MediaCodecInfo.java: Added isFeatureSupported method to CodecCapabilities
Added isFeatureSupported method to CodecCapabilities, so that applications
can query whether codecs support various features.  For now
added one video-decoder feature:

FEATURE_AdaptivePlayback

Media playback applications can query it to see if the codec
supports seamless resolution changes during decoding.

Change-Id: I56b2cf1429f39f9b9e0243a990c95e7a64dd7ff7
Signed-off-by: Lajos Molnar <lajos@google.com>
Related-to-bug: 7093648
2013-08-13 10:30:22 -07:00
Andreas Huber
226065bbe6 Expose MediaCodec.setParameters API to
- change video target bitrate on the fly
- request sync frames
- temporarily suspend feeding input buffers to the encoder

Change-Id: If5cf1162b2eeb28ac08288ecfa9f0e9823dd972e
2013-08-12 10:14:11 -07:00