2298 Commits

Author SHA1 Message Date
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
Marco Nelissen
84135337d1 am 53d86f6e: am f5cfe708: am e8acd367: Merge "When deleting a db file, Context.deleteDatabase() has to be called instead of File.delete() to guarantee all db related files like journal, wal, shm, etc are deleted together."
* commit '53d86f6e495e3f950191419645e34970779a3fea':
  When deleting a db file, Context.deleteDatabase() has to be called instead of File.delete() to guarantee all db related files like journal, wal, shm, etc are deleted together.
2013-08-08 14:14:10 -07:00
Glenn Kasten
d840526196 Merge "Update audio comments" 2013-08-07 17:17:56 +00:00
Marco Nelissen
e8acd367ac Merge "When deleting a db file, Context.deleteDatabase() has to be called instead of File.delete() to guarantee all db related files like journal, wal, shm, etc are deleted together." 2013-08-07 15:39:39 +00:00
Jeff Tinker
8f6c998cfb Merge "Define error codes for MediaCodec.CryptoException" 2013-08-07 01:44:09 +00:00
Glenn Kasten
86fad47e68 Update audio comments
Change-Id: If470efd77ed886da8d83a1b427c132bad77e668b
2013-08-06 13:38:16 -07:00
Jean-Michel Trivi
55e1bc6c58 Event handler should be private in MediaFocusControl
Change-Id: I034224d42a3cfed8c49bfee55b332068796f9977
2013-08-06 12:01:03 -07:00
Jean-Michel Trivi
34077aa6bb Merge "Reorder and comment MediaFocusControl code" 2013-08-06 18:40:55 +00:00
Jean-Michel Trivi
73673ab798 Reorder and comment MediaFocusControl code
Change-Id: Iacc03a7233789bd1588e9f7d2ca5df10a756fb0d
2013-08-06 10:42:45 -07:00
Zhijun He
708e359503 ImageReader: Add RGB format support.
Bug: 10155122
Change-Id: Id53d6ec815488e73bde6ca62b42c92d16bc813c9
2013-08-06 09:44:29 -07:00
Glenn Kasten
f239d9d7bb Merge "Don't doubly initialize fields in constructor" 2013-08-05 16:22:07 +00:00
Glenn Kasten
0bd2667e20 Merge "Clean up imports" 2013-08-05 16:18:25 +00:00
Glenn Kasten
07ede35514 Merge "Clean up throws in AudioRecord and AudioTrack" 2013-08-05 15:55:33 +00:00
Jeff Tinker
3ed38266c1 Define error codes for MediaCodec.CryptoException
Define specific failure cases so apps have the information they
need to deal with these conditions.

Also adds a new ResourceBusyException to MediaDrm

Change-Id: Iaecf269d58108f28179974b05671bf29b9fe4b7d
related-to-bug: 10157154
related-to-bug: 9695816
2013-08-03 10:23:41 -07:00
Elliott Hughes
a81dcd03dc am b56f10aa: am 32c308a5: Merge "If media wants ASCII lowercasing, it needs to ask for it."
* commit 'b56f10aa66914aeb880c624ed6e938e1941ff820':
  If media wants ASCII lowercasing, it needs to ask for it.
2013-08-02 17:58:31 -07:00
Glenn Kasten
97d50425a4 Don't doubly initialize fields in constructor
Change-Id: Id3b4911a7954a5a908764683cc7b8d8515d4482a
2013-08-02 15:12:04 -07:00
Glenn Kasten
896a7f5fee Clean up throws in AudioRecord and AudioTrack
Remove dead assignments to member fields in constructor prior to throw.
Execution doesn't continue execution, so no need to initialize fields.

throw doesn't need parentheses.

Fix indentation.

Change-Id: I2bf1b8bfa2c836e53a41eea67552cba40dc6fd43
2013-08-02 15:05:00 -07:00
Glenn Kasten
83db9ed199 Clean up imports
No need to import java.lang.*;
these imports are implicit in the language.

Change-Id: Ia903fb9546f2a295605dbc80ba69c4e6778627d6
2013-08-02 12:39:51 -07:00
Elliott Hughes
dcb1a58cf9 If media wants ASCII lowercasing, it needs to ask for it.
http://elliotth.blogspot.com/2012/01/beware-convenience-methods.html

Use toLowerCase(Locale.ROOT) if you want ASCII for machine consumption,
and use toLowerCase(Locale.getDefault()) if you want the user's locale's
casing rules for human consumption.

Bug: https://code.google.com/p/android/issues/detail?id=58359
Change-Id: Id9005a17e34217a81bef3b40031b9e2e6272f45d
2013-08-02 10:03:53 -07:00
Jean-Michel Trivi
68d6dedcc3 Remove whitespace in IAudioService.aidl
Change-Id: I537a2ad8356b04fec25bd7a5a8934f0bc343c1f6
2013-08-01 15:14:10 -07:00
Jean-Michel Trivi
3523a06375 Remove outdated comment in MediaFocusControl
The stream type is used in audio focus to better deal with
  RemoteControlClient/Display in the case of notifications
  during media playback. This comment is therefore outdated.

Change-Id: Ifa33bc4c0fbf065d8288ff5fdfaf1bc67b2a337e
2013-08-01 14:36:32 -07:00
Jean-Michel Trivi
9171db2798 Unhide android.media.AudioManager.AUDIOFOCUS_GAIN_TRANSIENT_EXCLUSIVE
Unhide android.media.AudioManager.AUDIOFOCUS_GAIN_TRANSIENT_EXCLUSIVE
Update android.media.AudioManager.requestAudioFocus() javadoc for the
  new focus type.

Bug 8251963

Change-Id: I7cd69faaf5f0169ee462b91d0aaa75dc6b092107
2013-08-01 09:19:58 -07:00
Jean-Michel Trivi
2380566deb Notification muting conditional to exclusive audio focus request
Summary of feature:
Do not mute notifications when speech recognition recording is
  active, but when an app has requested audio focus with
  AudioManager.AUDIOFOCUS_GAIN_TRANSIENT_EXCLUSIVE.

Implementation:
Move definition of AUDIOFOCUS_NONE to AudioManager where other
  audio focus codes are defined.
Add support for querying the current audio focus type.
When audio focus is requested as GAIN_TRANSIENT_EXCLUSIVE, make
  the corresponding loss by LOSS_TRANSIENT.
Before playing a notification, check whether GAIN_TRANSIENT_EXCLUSIVE
  has been requested.

Bug 8251963

Change-Id: I41edc77326b70639d2fdcb4642c53109995b72a8
2013-07-31 14:37:19 -07:00
jangwon.lee
3ed02535fd When deleting a db file,
Context.deleteDatabase() has to be called instead of File.delete()
to guarantee all db related files
like journal, wal, shm, etc are deleted together.

Signed-off-by: jangwon.lee<jangwon.lee@lge.com>

Change-Id: I3c3d7dfa13ffbe709ab7d8a5c7cfe6cfa2864fea
2013-07-31 07:18:25 +00:00
Jean-Michel Trivi
cbb212ff6f Focus gain sends focus loss through the focus stack
When a new focus owner lands on the stack, don't just make the
 previous top of the stack lose focus, propagate the loss throughout
 the stack.
Only dispatch focus loss on focus loss state change
Remove canDispatchFocus() method as it now doesn't need to be known
 (and shouldn't be known) outside of the implementation.
Fix error where the focus code for a focus gain request should
 always be a focus loss code.

Bug 8315302

Change-Id: I92c8f51fdcc090851d34d00fefed916e25da40c1
2013-07-30 17:13:00 -07:00
Jean-Michel Trivi
53e6e287ff Focus loss value takes into account previous loss
Implement a state machine to represent how to transition to the
 next audio focus loss state, given the current focus loss (state)
 and the given external focus gain (transition).

Bug 8315302

Change-Id: I4a3d5a4a53c842caceaa876206a993c4e5446681
2013-07-30 14:21:34 -07:00
Jean-Michel Trivi
fec4a907b1 Merge "Audio focus request managed by FocusRequester class" 2013-07-30 18:54:48 +00:00
Eino-Ville Talvala
92ed645159 Merge "Camera2 API: Rename package to android.hardware.camera2" 2013-07-30 18:42:20 +00:00
Eino-Ville Talvala
2f1a2e423e Camera2 API: Rename package to android.hardware.camera2
Change-Id: I77b7939e199f9fe8e12a59393c24cff08097448c
2013-07-30 11:37:31 -07:00
Jean-Michel Trivi
783cea4658 Merge "More refactor of audio focus, keep track of focus loss" 2013-07-30 18:31:13 +00:00
Jean-Michel Trivi
83283f23eb Audio focus request managed by FocusRequester class
Move all audio focus request functionality under a new class/file.
Clean up encapsulation of data related to the request.

Change-Id: I989796e1ee1a5fc99799a64e1612294e0e40fa6d
2013-07-30 11:27:08 -07:00
Marco Nelissen
4d4a137bf5 am 51cf3661: am f38b5287: Merge "MediaFormat: Explain that KEY_COLOR_FORMAT is used with decoders as well"
* commit '51cf3661fa658d7cec6a08ed3f916ce98203027c':
  MediaFormat: Explain that KEY_COLOR_FORMAT is used with decoders as well
2013-07-30 10:28:38 -07:00
Marco Nelissen
f38b528701 Merge "MediaFormat: Explain that KEY_COLOR_FORMAT is used with decoders as well" 2013-07-30 17:11:55 +00:00
Jean-Michel Trivi
00bf4b1817 More refactor of audio focus, keep track of focus loss
Move more audio focus-specific functionality into the class
  representing each audio focus owner, FocusStackEntry.
Keep track of how each FocusStackEntry instance lost focus.

Change-Id: I35df0717765a26ec747cb0110e2e951d155d1525
2013-07-29 18:15:29 -07:00
Jean-Baptiste Queru
0350f4167f am 00157c0d: am 6c0fe0df: Merge "MediaFormat: Fix the documentation link to the AAC profile constants"
* commit '00157c0d466786e7f125f58257ff706e132c52ef':
  MediaFormat: Fix the documentation link to the AAC profile constants
2013-07-29 16:40:21 -07:00
Jean-Baptiste Queru
6c0fe0df4e Merge "MediaFormat: Fix the documentation link to the AAC profile constants" 2013-07-29 23:03:00 +00:00
Chong Zhang
d7c05c2ca9 Merge "Select BT route when currently selected route becomes unavailable" 2013-07-26 23:46:46 +00:00
Chong Zhang
2e5fbf5521 Select BT route when currently selected route becomes unavailable
Bug: 10003524
Change-Id: I5de740fac9f2bc2a56125296defe892a8deb505e
2013-07-26 15:36:37 -07:00