8050 Commits

Author SHA1 Message Date
Jean-Michel Trivi
d2bebb3ab8 DO NOT MERGE Audio virtualizer effect: add support for querying capabilities
Change-Id: Ib62bab6655996575d7703be0bcb55fa8559a68a2
(cherry picked from commit 57fa19dec7150678020e7f1fe6e6879fd9d873f5)
2014-07-15 15:45:16 +00:00
Wonsik Kim
969167dc05 TIF: Revisit availability changes
Bug: 15838097, Bug: 15973274
Change-Id: Ida060696cb6222c8ced576d86c100c25d94dc5c0
2014-07-15 02:58:33 +00:00
Lajos Molnar
7be24522ce MediaExtractor: set buffer offset/limit in readSampleData
also fix setting offset/limit in MediaCodec's getBuffer.

Bug: 13008204
Change-Id: Iadf0f006cfccc2546971cc5384058e1a2721780b
2014-07-15 02:30:32 +00:00
Eino-Ville Talvala
6dc599b995 Merge "MediaRecorder: Fix crash when given a released Camera object" into lmp-dev 2014-07-14 18:37:56 +00:00
Eino-Ville Talvala
6a5b1db177 MediaRecorder: Fix crash when given a released Camera object
Bug: 15617637
Change-Id: I420ecc3f7b946dcf705cf210a7d493290f838f09
2014-07-14 12:02:21 -07:00
RoboErik
44583d351e Merge changes I51f2e466,I5b67cb3e into lmp-dev
* changes:
  Make PlaybackState immutable with a builder
  Add API to set a default session in Activity
2014-07-14 18:37:56 +00:00
RoboErik
c785a78fb4 Make PlaybackState immutable with a builder
bug:15862252
Change-Id: I51f2e466bd2c41bbe80d20aa9785126a7ac6ab3f
2014-07-14 13:40:43 -07:00
John Spurlock
33f4e04e32 Volume: Delay adjustments made when showing ringer UI.
Since the volume rocker is now the primary system UI for
entering ringer modes, we need to provide a way to display
the ui without making a sound.

Change the policy for the ringer stream to only display the
UI on the initial adjustment request, don't actually make
an adjustment.  However, don't break previous ability to
press and hold the vol keys down to vibrate, so allow this
after the standard framework long-press delay.

Audio service had no way of knowing whether or not the registered
volume controller was visible, so add a mechanism for the
controller (volume panel) to send that info back to the service.

Found and fixed a discrepancy between AudioManager.handleKeyDown
and MediaSessionLegacyHelper so that an adjustment over the
keyguard is allowed to vibrate as well as play sound during
adjustments.

Bug:16202639
Change-Id: Icd36c23e8d08c4ed57922c05724b281f32049be7
2014-07-14 16:49:34 +00:00
Jeff Brown
1a937b04e6 Initial draft of new MediaRouter APIs.
This patch introduces basic infrastructure for the new MediaRouter
API.  The code is fully documented but incompletely implemented.
It is being submitted not to facilitate API reviews.

MediaRouter is a new class that applications used to discovery,
connect to, and control media devices as represented by media
destinations and their routes.  Routes may offer a variety of
capabilities.  This new class is a much more powerful replacement
for the existing MediaRouter.

MediaRouteService is a base class for creating media route services
which third-parties can implement to make routes available to
applications.  It is analoguous to the MediaRouteProvider
infrastructure of the old media router support library but it
is designed to be integrated into the framework and enable a
variety of new usages such as remote display projection.

Stay tuned for more...

Change-Id: I2c7c6013d9f751d71e83697e7fc9e49bf7751fef
2014-07-14 04:38:14 -07:00
Jeff Brown
01a500ed1c Delete first draft of media routing APIs.
The new APIs will not be as tightly integrated into MediaSession.

Change-Id: I5cfd37d9d8d0c5d46c55edb5cf0772a8f1ef13ab
2014-07-14 04:06:44 -07:00
Eino-Ville Talvala
b942b05093 Deprecate android.hardware.Camera
__
             ||
             ||
             ||
             ||---____-----+
             ||    \_/     |
             ||   /. .\    |
             ||  ||---||   |
             ||   |___|    |
             ||    | |     |
             ||---____-----+
             ||
             ||
             ||
_____________||_________________

Replaced by android.hardware.camera2

- Also deprecate MediaRecorder#setCamera
- Also deprecate all Camera inner classes
- Update reference documentation in various classes to point to camera2
- Add note to camera API guide that it uses the old API
  (until a new guide is available)
- Remove old hidden raw sensor format; superceded by RAW_SENSOR.

Change-Id: I3d839765fc9b9aae906751ee32d6956ef40451ce
2014-07-13 21:45:57 -07:00
Dongwon Kang
9b08edff23 do not merge. Implement onVideoAvailable/Unavailable in TIF.
Use cases:
  - VIDEO_UNAVAILABLE_REASON_TUNE: to show spinner on channel change.
  - VIDEO_UNAVAILABLE_REASON_WEAK_SIGNAL: to show a message and spinner on weak TV signal.
  - VIDEO_UNAVAILABLE_REASON_BUFFERING: to show spinner on buffering.
  - VIDEO_UNAVAILABLE_REASON_UNKNOWN: to show spinner.

Bug: 14126559
Change-Id: Ide2b68c74bd96d4ea1b9d85ab099a277253d05c7
(cherry picked from commit 1edfd8eb985ee41095c60f4aaf7029f56abff614)
2014-07-14 01:00:53 +00:00
Jae Seo
2c1c31c7ae TIF: Add a way to enable/disable caption
This is required to handle the case that an application wants to turn
on/off the caption explicitly (e.g. TvView in PIP). TV input service
implementation must respond to the request immediately to avoid any
legal implication since the captioning is imposed by the law in many
countries.

Bug: 14121898
Change-Id: I9600debae709fdc99065d7a0138ae69d1dffc9ba
2014-07-12 20:43:11 -07:00
Naveen Kumar Ponnusamy
ee64575cf7 Added a test for HEVC playback memory usage
Bug: 14571712
Change-Id: If5c4053dea23142b73aed77498c93e149b7ef9b2
2014-07-12 22:13:32 +00:00
Lajos Molnar
b1a236b85f add utility methods to util.Range, Rational and Size
Bug: 12065651
Bug: 11990470
Change-Id: I0d0929ea0289ac5de5c17cca90f25abc4e9dfd7a
2014-07-12 14:12:27 -07:00
Robert Shih
f79c22eb2c Merge "MediaRecorder: use fd from RandomAccessFile" 2014-07-11 23:25:18 +00:00
Robert Shih
0d5d3b7cc8 MediaRecorder: use fd from RandomAccessFile
Use RandomAccessFile instead of FileOutputStream so the underlying fd
is opened O_RDWR; O_RDWR is needed for mmap calls in the native webm
writer.

Change-Id: I444cbf40add96bc05905369ae2fa2b5446b0f9cc
2014-07-10 17:06:33 -07:00
Robert Shih
bef45561b0 Merge "MediaPlayer: added getSelectedTrack" 2014-07-10 20:49:26 +00:00
Chong Zhang
94686d13ca MediaCodec: change onError cb to send CodecException
Bug: 11990118
Change-Id: I8b6112f126c2f473f64e2aad6ffcfbc3f1d6e64a
2014-07-11 19:42:55 -07:00
Lajos Molnar
d4023114e8 MediaCodec: add new buffer and format APIs
Bug: 14562236
Bug: 14297827
Bug: 13008204
Bug: 10706245
Bug: 10672559
Bug: 9175531

Change-Id: Ia94d34f625e532619a9ed344eb27e0d26647982f
2014-07-12 01:43:56 +00:00
Robert Shih
464da703ca MediaPlayer: added getSelectedTrack
Change-Id: Ic39b9b3d5e72e13452320a0272deb489a0285913
2014-07-10 20:32:37 -07:00
Lajos Molnar
60fde9d254 media: add crop rectangle to Image
Bug: 10706245
Change-Id: I9c9150bdef418fd96228addaa7c35f16e5e1ccff
2014-07-12 01:04:03 +00:00
Lajos Molnar
82fa0e7f78 MediaCodec: update documentation on buffer metadata.
- Deprecated BUFFER_FLAG_SYNC_FRAME (as it actually marks key
  frames).
- Clarified that BUFFER_FLAG_KEY_FRAME is used for encoded output
  buffers.
- Clarified that presentationTimeUs is not an actual render
  timestamp (as opposed to releaseOutputBuffer's render timestamp).

Bug: 12006531
Change-Id: Ia27b9f606a9d7eef9c0c2900cd864a4421c7cf31
2014-07-11 15:43:36 -07:00
Chong Zhang
8d5e556b2b MediaCodec async callbacks
Bug: 11990118

Change-Id: I210d4302e1fd7e1a48d2228fd3f4f20c16b18a75
2014-07-11 11:53:03 -07:00
Jean-Michel Trivi
998ff75484 fix build: hide AudioAttributes.usageToString() method
Change-Id: I1041d9bf530df45878dd61e30e32f5a2f4f9d1a1
2014-07-11 10:01:00 -07:00
Jean-Michel Trivi
a8b6bd88cf Define audio policy, mixes, and mixing rules
An AudioMixingRule is a collection of AudioAttributes and match/exclude
   rules.
An AudioMix is defined by its AudioMixingRule, AudioFormat and
   routing flag.
An AudioPolicyConfig is a collection of AudioMix and is
   parcellable.
An AudioPolicy has an AudioPolicyConfig, and
   can be registered/unregistered through AudioManager.

bug 16009464

Change-Id: I01bf95d014967f48ba823648ea897779da099e5d
2014-07-11 09:10:46 -07:00
Dongwon Kang
1f213914c4 Support multiple tracks in TV Input framework.
Added API: getTracks/selectTrack/unselectTrack/onTrackInfoChanged
(onVideo/Audio/ClosedCaptionStreamChanged callbacks are removed in favor of onTrackInfoChanged)
Use cases: audio and closed caption track selection
Background: go/tif-multi-track

Bug:14073704, Bug:14121898, Bug: 16049453
Change-Id: I199ed16f690d4e757da0bb30c8bc8222a6fa1d7a
2014-07-11 18:46:25 +09:00
Jungshik Jang
6f34f5ab8a Revamp HDMI-CEC system audio mode integration with audio service.
In previous change we use setForceUse(FORCE_MEDIA, XXX) method
in order to set specific audio output type, such as LINE, HDMI_ARC,
and SPDIF. But it turns out that it conflicts with bluetooth
a2dp which uses the same setForceUse(FORCE_MEDIA, yyy).

This change is based on several conditions.

1. When other non-speaker devices are on, prevent system audio
   from turing on.
2. In order to keep track of other devices' connectivity and to
   turn off system audio if other device like bluetooth or
   headphone preempts current output, register OnAudioPortChangeListner
   to audio manager.
3. All possible system audio outputs can be merged with other
   outputs without priority.

Change-Id: Id4e47d99db64b9f77a17c2c28c47787ab8980bf7
2014-07-11 08:07:12 +09:00
Erik Pasternak
b2e93efcac Revert "Make PlaybackState immutable with a builder"
Will resubmit tomorrow for Build Breakage Friday as this change needs new SDK prebuilts for unbundled app branches.

This reverts commit aa746b27610680a2c0fbdf7d81a6455c4597f05e.

Change-Id: I28ba7e1b09234a5eb1b725aed043b9de98e1bc16
2014-07-10 22:51:34 +00:00
RoboErik
5a4e011143 Make PlaybackState immutable with a builder
bug:15862252
Change-Id: I8944b7753cd6a36a74b0091f71a386f77040c4ab
2014-07-10 22:39:03 +00:00
John Spurlock
cd22c3ec53 Merge "Volume: allow dialog to play sound over keyguard." 2014-07-10 00:46:47 +00:00
John Spurlock
6bd096c8d6 Volume: allow dialog to play sound over keyguard.
Now that we are allowing the volume dialog above the keyguard,
the old suppression rule does not apply.

Bug:16186697
Change-Id: I071f1a2856850218e267d1fbaf547db44b644382
2014-07-10 09:39:04 -04:00
RoboErik
3c45c29109 Pipe volume keys to adjustVolume instead of sendMediaKeyEvent
We were calling sendMediaKeyEvent with a KEYCODE_VOLUME key, which was being
ignored because it's not a media key. This redirects the volume keys to use
the adjustVolume methods instead. It also sends the appropriate flags to
make the lock screen consistent with the home screen and the volume keys
only affect active playback when the screen is off.

bug:15900519
Change-Id: I9f3853a2385869353a58debae6e6ca9933ba06ce
2014-07-10 16:15:45 +00:00
Andy Hung
285fa63c61 Add MediaCodec.CodecException
Also clarify MediaCodec exception handling in documentation.

Bug: 12034929
Change-Id: Ie82a15cc6ee4b772191edaf128823487cad00d0a
2014-07-10 03:32:42 +00:00
Andy Hung
806114bc6f Add float support to ByteBuffer AudioTrack write
Change-Id: I887b944ea40966b9849bd08c093994049671c9b4
2014-07-09 17:48:24 +00:00
Terry Heo
0543b17e84 Merge "AudioSystem: add definition for loopback input device" 2014-07-02 20:35:42 +00:00
Terry Heo
112c19ee8b AudioSystem: add definition for loopback input device
Bug: 15437484
Change-Id: I91d88d476693e9b9a72799f3c52a659a5843e446
2014-07-07 11:34:25 +09:00
Dongwon Kang
b93ccca613 Add onChannelRetuned callback in TV Input Framework.
Use cases:
  - Channel change from STB which is bound to a TV input.

Bug: 14126559
Change-Id: Icddab61be6cb11162c03960fdb41fee8504bcd61
2014-07-08 14:46:20 +09:00
John Spurlock
ae641c9ccd Implement new volume UI design.
- Add segmented zen-mode picker to the rocker UI.
- Add a new "no interruptions" value to the zen setting.
- Implement expandable condition subpanel on the rocker UI.
- Remove the old circle&slash icons.
- Suppress alarm sounds if in "no interruptions" mode.
- Add warning re: alarms to the condition UI.
- Allow rocker UI to display over the keyguard.
- Remove Notifications QS tile.
- Realign volume rocker to the top of the screen.
- Add support for new "days" sleepMode.
- New icon policy rules for "volume" slot.
- New important icon (star).

Associated Settings change:
  I6ed56791784968adfbd684f490dbbebed285a2dd

Bug:15831713
Change-Id: I35afe38646f04d2ba0dbac11c2c6356120a33694
2014-07-07 18:48:25 -04:00
Mike Reed
42a1d08df7 SkBitmap::Config is deprecated, use SkColorType
Change-Id: Ida181d2aac760072cf2d01409edac37699dea216
2014-07-07 18:11:24 -04:00
Zhijun He
d1988a98ed Add RAW10 image format
- Add RAW10 format in ImageFormat
- Add ImageReader support for this format

Bug: 15989722
Change-Id: Ic38ae596d5a472e990389d1fa221a82bea97b715
2014-07-07 08:01:06 -07:00
Jean-Michel Trivi
50f45d0185 Merge "AudioDevice class to expose concept of device in SDK" 2014-07-02 18:22:50 +00:00
Jean-Michel Trivi
3ef1812272 AudioDevice class to expose concept of device in SDK
Change-Id: I94c87e98061581a767d775f64dd6bd9a1f9956e1
2014-07-02 21:12:18 +00:00
Jean-Michel Trivi
6c09004ec0 Send media button events with FLAG_RECEIVER_FOREGROUND set
bug 11357318

Change-Id: Iccd000bebb31a2f6cb057e97d3ab276861d0b651
2014-07-02 21:10:43 +00:00
Jae Seo
6e90e4ea4f TvContract: Add a field for network affiliation to the Channels table
This is used to identify a channel that is commonly called by its
network affiliation instead of the display name.

Bug: 15993156
Change-Id: Ib5a15e0e44e815c98b762573b5a24289a86f9583
2014-07-02 13:01:35 -07:00
Jungshik Jang
41d974631c Add volume callback for Hdmi-Cec system audio mode.
Hdmi-Cec's system audio mode delegates audio control to
audio receiver from tv. It requires to delegate
volume change including mute to audio receiver
instead of consuming by tv.
In order to do this this change introduces three apis.
One is added to IAudioService, the others are added
to IHdmiControlService as hidden apis.

 1. IAudioService#setHdmiSystemAudioSupported;
    This is to notify system audio mode change to audio
    service so that it determines to notify volume or mute
    change to HdmiControlService.

 2. IHdmiControlService#setSystemAudioVolume;
    This is to notify volume change to HdmiControlService.
    It's called only where system audio mode is on.

 3. IHdmiControlService#setSystemAudioMute;
    This is to notify volume change to HdmiControlService .
    It's called only where system audio mode is on.

Change-Id: I3d8534b37ddf1a812e32012059a8778772044bf0
2014-07-03 10:09:32 +09:00
Jungshik Jang
70d34bb485 Define force usage and category for System Audio Control.
This is to be sync with change of system/core/include/system/audio_policy.h

Change-Id: Ibd371197775fb70a96df6e3eef82ec8ae10b0508
2014-07-03 00:42:20 +00:00
Eric Laurent
7edabadf78 Merge "AudioManager: add isVolumeFixed() API" 2014-07-01 23:33:37 +00:00
Eric Laurent
ba207e76b2 AudioManager: add isVolumeFixed() API
Indicates if the device implements fixed volume policy.
In this case, volume control APIs are not operational.

Bug: 11430859.

Change-Id: Ia82bdfe5b38d6b2ce132f00a493e6a04cb794ea0
2014-07-01 19:03:04 -07:00
Marco Nelissen
a4d4c200e4 am 1ed64c65: am 899c15ef: am db816cef: Merge "Make sure we clean up"
* commit '1ed64c65a7b4d33799ca42cb4422d8382929cac2':
  Make sure we clean up
2014-07-01 18:28:56 +00:00