5704 Commits

Author SHA1 Message Date
John Grossman
d72031cee3 Upintegreate AAH TX and RX players from ICS_AAH
Upintegrate the android at home TX and RX players developed in the
ICS_AAH branch.

Change-Id: I8247d3702e30d8b0e215b31a92675d8ab28dccbb
Signed-off-by: John Grossman <johngro@google.com>
2012-02-16 13:45:12 -08:00
John Grossman
3540a0197f Enhance Visualizer behavior in the case of mediaserver death.
Bring the Visualizer class into line with the SDK documentation by
returning ERROR_DEAD_OBJECT instead of ERROR_INVALID_OPERATION when
the Visualizer loses its binder connection to the mediaserver because
of a mediaserver restart.

Also add a new callback interface to allow clients to be
asynchronously notified in the case of server death.  Right now, the
interface definition and the registration method are flagged as hidden
pending API council review/approval.

See http://b/issue?id=5717519 for details.

Change-Id: Ic15856f27ed5a950a583ac11ca81f79bd7e9b1a0
Signed-off-by: John Grossman <johngro@google.com>
2012-02-16 13:45:11 -08:00
John Grossman
449725f9aa Reuse callback buffers in the Visualizer.
Don't re-allocate buffers used by Visualizer callbacks as this causes an
unacceptable amount of GC thrash.  Instead, lazily allocate the buffers and only
reallocate them when the required size changes.

See http://b/issue?id=5717519 for details.

Change-Id: Ibd157ed51f30687ce7c4ef0b4003258a484e0f5d
Signed-off-by: John Grossman <johngro@google.com>
2012-02-16 13:45:11 -08:00
John Grossman
d8cf2960d0 Upintegrate Audio Flinger changes from ICS_AAH
Bring in changes to audio flinger made to support timed audio tracks
and HW master volume control.

Change-Id: Ide52d48809bdbed13acf35fd59b24637e35064ae
Signed-off-by: John Grossman <johngro@google.com>
2012-02-16 13:45:11 -08:00
Eric Laurent
98ad9b9d6f Fix music volume regression on tablets
A regression was introduced by the change enabling per device volume:
music volume will not be completely silenced even if volume is shown at 0.

The problem is that when media volume goes to zero, silent mode is entered and
AudioService sends one message per stream/per connected device to the audiosystem
handler to mute volume on each stream. As those messages were sent with the
SENDMSG_NOOP attribute, some of them where lost.

Change-Id: Ic665b1e9dcaf09506a4ec19bf3fe6997d4b071fd
2012-02-15 17:21:37 -08:00
Glenn Kasten
4f7adcf76a Merge "Update comments" 2012-02-14 09:42:32 -08:00
Glenn Kasten
b3db213eb5 Update comments
We no longer put the filename at start of file.

Change-Id: Ic435b159a23105681e3d4a6cb1ac097bc853302e
2012-02-14 09:17:59 -08:00
Glenn Kasten
f4e1bdc13e Merge "Remove dead code AudioTrack::getLoop" 2012-02-14 09:09:03 -08:00
Glenn Kasten
6a20b26d99 AudioRecord and AudioTrack client tid
Inform AudioFlinger of the tid of the callback thread.

Change-Id: I670df92dd06749b057238b48ed1094b13aab720b
2012-02-14 07:30:48 -08:00
Marco Nelissen
2e0f67159a Merge "Further optimize media scanner." 2012-02-13 15:47:58 -08:00
Marco Nelissen
d121cfcbb4 Further optimize media scanner.
Inserts of directories can be done in bulk as long as they're inserted before
the files contained within. Extend MediaInserter to accommodate giving priority
treatment to directories.
Bulk deleting of entries can be further sped up (by a factor of ~3 in my tests)
by deleting entries in database order. Switch the file cache to use
LinkedHashMap instead of HashMap to allow iterating over the cache in database
order. Also use bindArgs to allow for better caching of sql statements.

Change-Id: Ieb9ffc4e866c6cd505bf795eb80ff5d03ffc56bd
2012-02-13 15:39:15 -08:00
Jean-Michel Trivi
e901a5c29b Playback rate on MediaPlayer
Add support for modifying the playback rate of a MediaPlayer
 by altering the sample rate of its AudioTrack.
The playback rate is expressed in permille, where 1000 is the
 playback at normal speed.

Change-Id: I981d060ab32f7bae7a767e82c60c88ae635dceed
2012-02-13 12:39:54 -08:00
Eric Laurent
65b8bbd3c9 Merge "Fix audio preprocessing library wrapper" 2012-02-13 12:27:27 -08:00
Mike Lockwood
f96901f8cc Merge "Add support for non-linear ramping of master volume adjustment" 2012-02-10 21:55:52 -08:00
James Dong
8fdaf785e2 Merge "Change the signature of method addTextSource() in AwesomePlayer" 2012-02-10 17:57:16 -08:00
Mike Lockwood
9760647dd0 Add support for non-linear ramping of master volume adjustment
Bug: 5472584

Change-Id: I1227007d1563eca739fb78b6d9595febc04a3f03
Signed-off-by: Mike Lockwood <lockwood@google.com>
2012-02-10 15:58:07 -08:00
Jason Simmons
1ce5b26d70 Only send master volume or mute updates if the settings have changed 2012-02-10 14:44:08 -08:00
Jason Simmons
e3f5979307 Make AudioManager.adjustMasterVolume public and hidden 2012-02-10 14:44:08 -08:00
Mike Lockwood
9063154a79 Restore persisted master volume if the media server restarts
Bug: 5755071

Signed-off-by: Mike Lockwood <lockwood@google.com>
2012-02-10 14:44:08 -08:00
Mike Lockwood
b7bd88a3b6 Don't allow changing master volume when muted
Bug: 5793021

Signed-off-by: Mike Lockwood <lockwood@google.com>
2012-02-10 14:44:07 -08:00
Mike Lockwood
5c55a051ad Defer persisting master data to avoid excessive database writes
Bug: 5705192

Signed-off-by: Mike Lockwood <lockwood@google.com>
2012-02-10 14:44:07 -08:00
Mike Lockwood
3194ea9434 Remove reference counting and client death notification for master mute
The use case for master mute is to toggle it on and off from a
KEYCODE_VOLUME_MUTE event, so this was unnecessary and prevented unmuting
in certain cases

Bug: 5724755

Signed-off-by: Mike Lockwood <lockwood@google.com>
2012-02-10 14:44:06 -08:00
Mike Lockwood
0dc37cce9d AudioService: Send broadcasts when master volume and mute state change
Signed-off-by: Mike Lockwood <lockwood@google.com>
2012-02-10 14:44:06 -08:00
Mike Lockwood
fa7b06147c AudioManager: Add wrapper methods for master volume support
Signed-off-by: Mike Lockwood <lockwood@android.com>
2012-02-10 14:44:05 -08:00
Mike Lockwood
ce952c8e13 AudioManager: Add support for master mute
Signed-off-by: Mike Lockwood <lockwood@android.com>
2012-02-10 14:44:05 -08:00
Mike Lockwood
4767690f09 AudioManager: transparently convert volume settings for other streams to master volume if config_useMasterVolume is set.
This allows Music2 and other media apps to control master volume without changing their code

Bug: 5567694

Signed-off-by: Mike Lockwood <lockwood@android.com>
2012-02-10 14:44:04 -08:00
James Dong
385f1cafa6 Merge "Move away from MediaDebug and use ADebug instead" 2012-02-10 14:17:06 -08:00
Glenn Kasten
1137be1a68 Follow raw pointer and sp<> conventions
Unconditional delete for raw pointers.
Use "if (sp != 0)" not "if (sp.get() != 0)" or "if (sp != NULL)".
Use "if (raw != NULL)" not "if (raw)".

Change-Id: I531a8da7c37149261ed2f34b862ec4896a4b785b
2012-02-10 13:48:44 -08:00
Glenn Kasten
5dd4754f58 Merge "No newline or space at end of ALOG format string" 2012-02-10 13:36:24 -08:00
James Dong
8e9d67a135 Move away from MediaDebug and use ADebug instead
Change-Id: I963a3b6f79a7292891973cbeeaf3378b38629f08
2012-02-10 11:43:09 -08:00
Mike Lockwood
8dc1dabd25 VolumePanel: Add support for master volume
Signed-off-by: Mike Lockwood <lockwood@android.com>
2012-02-10 09:05:49 -08:00
Mike Lockwood
8517e46f3d Save and restore master volume in the settings provider
Signed-off-by: Mike Lockwood <lockwood@android.com>
2012-02-10 09:05:39 -08:00
Mike Lockwood
cbdb49dc5e Simple master volume support
Still needs integration with Settings (for persistence) and VolumePanel UI.

Change-Id: I9eca92c4b1ef2df2564411006a35753ab9618dce
Signed-off-by: Mike Lockwood <lockwood@android.com>
2012-02-10 09:01:28 -08:00
James Dong
459f40dfb3 move away from MediaDebug and use ADebug instead for video editor engine
Change-Id: I2c0ad6c64f1bd03bd3dfe2c87792f8089dcbc101
2012-02-09 23:52:19 -08:00
James Dong
23cc716cc5 Change the signature of method addTextSource() in AwesomePlayer
o avoid a unnecessary copy constructor call

Change-Id: Ib598bbe42d42a835549e2d29502c6f196f859874
2012-02-09 17:32:57 -08:00
James Dong
9975229a73 Finish up B frame support in MPEG4Writer
o optimize to reduce the size of the size of the ctts box
o change the type for the time offset field in ctts table entry from int32_t to uint32_t according to the mp4 file spec
o also moved away from MediaDebug and used ADebug instead.

o related-to-bug: 4232183

Change-Id: I19364303728da64359c63169eec7487508c1d0f8
2012-02-09 15:02:08 -08:00
Andreas Huber
8f0f10a80a Merge "Experiment with seeking to closest frame instead of closest syncframe" 2012-02-09 14:52:58 -08:00
Andreas Huber
713f90f3ca Experiment with seeking to closest frame instead of closest syncframe
Also supports SEEK_CLOSEST mode in the Matroska/Webm extractor.

Change-Id: I257771648dfe41392a4cf8932f625489dcb9f234
2012-02-09 14:32:08 -08:00
Scott Main
e7eeace594 am ec12ae99: am 79cfde69: am 52bfc243: docs: fix misc doc bugs from external issue tracker
* commit 'ec12ae9933e463181338834387caa7c58b330635':
  docs: fix misc doc bugs from external issue tracker
2012-02-09 12:53:12 -08:00
Scott Main
79cfde69fd am 52bfc243: docs: fix misc doc bugs from external issue tracker
* commit '52bfc243684b2f340da326aaa38e9021e4e3b2e6':
  docs: fix misc doc bugs from external issue tracker
2012-02-09 12:48:08 -08:00
Scott Main
52bfc24368 docs: fix misc doc bugs from external issue tracker
Change-Id: If6ff3476670e42b321d56d4a1482ccff96d4d500
2012-02-09 12:45:16 -08:00
Glenn Kasten
0765c448ab No newline or space at end of ALOG format string
Change-Id: I0bef580cbc818cb7c87aea23919d26f1446cec32
2012-02-08 17:21:49 -08:00
Glenn Kasten
6c9ddd2cbb Remove dead code AudioTrack::getLoop
Change-Id: I868329c52f31bc20125f068500d8f892b4ec9796
2012-02-08 14:12:12 -08:00
James Dong
e1a409ba68 Merge "Enable B frame support in MPEG4Writer" 2012-02-08 10:42:35 -08:00
Glenn Kasten
8e0cc398e3 Merge "Use audio_io_handle_t consistently instead of int" 2012-02-08 10:22:11 -08:00
Marco Nelissen
b3f04a6569 Merge "Delete entries in bulk" 2012-02-08 10:15:01 -08:00
Marco Nelissen
9ff4774cac Delete entries in bulk
Deleting entries from the database in bulk greatly speeds up the media
scanner in some cases; removing 31k entries used to take about 2 hours,
now it takes about 15 minutes.

Change-Id: Ia8f3fd6d828289e3d67178e9ad10399ded8d70d2
2012-02-08 10:13:11 -08:00
Glenn Kasten
39d00cb442 Use audio_io_handle_t consistently instead of int
Other:
 - add a comment to nextUniqueId
 - made ThreadBase::mId const, since it is only assigned in constructor.

Change-Id: I4e8b7bec4e45badcde6274d574b8a9aabd046837
2012-02-08 10:06:32 -08:00
Glenn Kasten
6731333584 Effect UUID inputs passed by pointer are const
Change-Id: I1f5c338bcb7368e3dd8cd5f804b2e6d9fbe087f8
2012-02-08 09:21:39 -08:00
Glenn Kasten
1e3a8d3090 Merge "Remove dead mutex in AudioTrack/AudioRecord thread" 2012-02-08 08:34:33 -08:00