843 Commits

Author SHA1 Message Date
Mathias Agopian
af01feafc3 remove dependency on android_native{s_priv|buffer}.h
Change-Id: Ie4b95f7061c240f37c504414259f92d72c4ffc89
2012-02-24 18:26:01 -08:00
Andreas Huber
5c850396b3 Add new APIs AMessage::(set|find)Buffer to make it safer to pass
ABuffer objects through messages.

Change-Id: I9f8b4e4c4767d0d70a0105e0c0813b754379b49d
2012-02-22 16:20:59 -08:00
Andreas Huber
88572f7a3e Implementation of a java media codec interface and associated tools.
Change-Id: I13e54062d4de584355c5d82bb027a68aeaf2923b
2012-02-22 15:06:06 -08:00
James Dong
f65934a721 Merge "Limit the amount of audio record data in each buffer" 2012-02-21 11:10:35 -08:00
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
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
James Dong
745fcc0571 Limit the amount of audio record data in each buffer
o The size of each input buffer should be less than or equal to kMaxBufferSize
o related-to-bug: 5977032

Change-Id: I04343169aac3df56694aad4ba7967ec45337ad7e
2012-02-15 12:54:17 -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
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
James Dong
8e9d67a135 Move away from MediaDebug and use ADebug instead
Change-Id: I963a3b6f79a7292891973cbeeaf3378b38629f08
2012-02-10 11:43:09 -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
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
Glenn Kasten
09b9ba0db2 Merge "AudioTrack declare more methods const" 2012-02-08 07:42:40 -08:00
Glenn Kasten
16d64ad699 Merge "Declare more IAudioFlinger methods const" 2012-02-08 07:39:27 -08:00
James Dong
7251673821 Enable B frame support in MPEG4Writer
This patch allows us to automatically detect whether ctts box is needed in MPEG4Writer.
MPEG4Writer uses ctts version 0 (non-negative offset value) store the composition time
offset on a needed basis.

Currently, the size of the ctts box is not optimized. Optimization will be addressed
in a subsequent patch.

o also changed the private method retrieveDecodingTime(bool) in OMXCodec
  to getDecodingTime()

o related-to-bug: 4232183

Change-Id: Ic6dc7b25ecd258c2506ca4b9c25156e922456e51
2012-02-07 18:32:29 -08:00
James Dong
f5a9f439b6 Don't call virtual function in destructor of SurfaceMediaSource
Change-Id: I3cbc2b1222335b61c814b5cdcfaefa495148b0ec
2012-02-06 12:17:44 -08:00
James Dong
cea2c396c5 Merge "Don't call virtual functions in the destructor for audio and camera source classes" 2012-02-04 05:54:54 -08:00
Glenn Kasten
7c2e37dd32 AudioTrack declare more methods const
Change-Id: I4999e984460893961d0d8092cff17f3cf07d7214
2012-02-03 15:48:25 -08:00
Glenn Kasten
3f6d83a68a Declare more IAudioFlinger methods const
This is just documentation, as C++ method const-ness doesn't mean anything
for a binder API.  Instead, here const means "no side effects".

Change-Id: Iaa9cd2fe477db10ae9a40cac4f79f0faa9b4e5e6
2012-02-03 15:40:56 -08:00
James Dong
4651c0ea80 Merge "Don't call virtual functions in destructors for the writer classes" 2012-02-03 15:37:40 -08:00
Glenn Kasten
f55bc56490 Merge "Use audio_in_acoustics_t consistently" 2012-02-03 08:31:01 -08:00
Glenn Kasten
191c849283 Merge "Use ToneGenerator::tone_type consistently" 2012-02-03 08:00:52 -08:00
Glenn Kasten
3694ec1f19 Use NULL not 0 for raw pointers
Use if (p != NULL) instead of if (ptr)

Change-Id: Iaec3413a59ccbf233c98fcd918cc7d70ac5da9fa
2012-02-03 07:57:01 -08:00
James Dong
946ab0ff30 Don't call virtual functions in the destructor for audio and camera source classes
Change-Id: Ia74ffc1c0cbd7971697f5e3c476e340ec5c7727a
2012-02-02 18:11:53 -08:00
James Dong
c2240b127b Don't call virtual functions in destructors for the writer classes
Have not found any concrete bugs related to these calls yet, but we should avoid
calling virtual functions in destructors, regardless.

Change-Id: I2d47b79d3fb2d29f418619bee83aa147d232a5d4
2012-02-02 15:13:56 -08:00
Glenn Kasten
91a7b145df Merge "More audio_stream_type_t" 2012-02-02 13:26:12 -08:00
Glenn Kasten
4b80abcdd5 Remove dead mutex in AudioTrack/AudioRecord thread
The client callback threads had mutexes called AudioTrackThread::mLock
and ClientRecordThread::mLock.  These mutexes were only used by start()
and stop(), and were unused by the thread itself.  But start() and
stop() already have their own protection provided by AudioTrack::mLock
and AudioRecord::mLock.  So the thread mutexes can be removed.

Change-Id: I098406d381645d77fba06a15511e179a327848ef
2012-02-02 11:23:30 -08:00
Andreas Huber
f6b4ca408e Slighly improve the API to discover if the OMX stack is running in the local
process.

Change-Id: Idd3c2f0d4a9542af01a3fdfd3b0bfab90e083505
2012-01-31 11:16:24 -08:00
Glenn Kasten
b7cffb4140 More audio_stream_type_t
Change-Id: I1260259efe0aa3fc1ef13de69758aaa592e1f815
2012-01-27 16:33:43 -08:00
Glenn Kasten
23f7ad39ef Use ToneGenerator::tone_type consistently
Also remove defaults in startToneCommand(), they're not needed and the
default for tone type was nonsense.

Change-Id: I70fa8cee4f3dbb8c66ceb3719c8d3d2f447f05b9
2012-01-27 16:01:44 -08:00
Glenn Kasten
882c0a20c5 Use audio_in_acoustics_t consistently
Change-Id: I0a9dd668fb2e57b1c3ece3190588194974b99062
2012-01-27 13:31:54 -08:00
Glenn Kasten
c14639a9a1 Merge "Use audio_source_t consistently" 2012-01-27 09:06:00 -08:00
Glenn Kasten
0f0fbd9441 Use audio_source_t consistently
Was a mix of audio_source_t, uint8_t, and int.

Related fixes:
 - fix comments in MediaRecorder.java
 - AudioPolicyService server side was not checking source parameter at
   all, so if the client wrapper was bypassed, invalid values could be
   passed into audio HAL
 - JNI android_media_AudioRecord_setup was checking source for positive
   values, but not negative values. This test is redundant, since already
   checked at Java and now checked by AudioPolicyService also, but might
   as well make it correct.

Change-Id: Ie5e25d646dcd59a86d7985aa46cfcb4a1ba64a4a
2012-01-26 16:50:19 -08:00
Andreas Huber
afe02df45e The software AAC encoder is now an OMX component.
Yay.

Change-Id: I74938a20b4e0a622836ea5184d3761180eb0f5de
2012-01-26 15:45:38 -08:00
Glenn Kasten
34f9f8bb83 Remove AudioFlinger dependencies on client
Change-Id: Ibb591e41a3ca5d7015e2b66b98b8fef5f415fb37
2012-01-20 17:12:59 -08:00
Glenn Kasten
0a204ed0f5 Use audio_format_t consistently, continued
Was int or uint32_t.

When AudioFlinger::format can't determine the correct format,
return INVALID rather than DEFAULT.

Init mFormat to INVALID rather than DEFAULT in the constructor.
Subclass constructors will set mFormat to the correct value.

Change-Id: I9b62640aa107d24d2d27925f5563d0d7407d1b73
2012-01-20 14:41:34 -08:00
Glenn Kasten
15f51ccee1 Merge "Remove dead file include/media/thread_init.h" 2012-01-20 12:15:38 -08:00
Glenn Kasten
7524a59252 Merge "Remove dead setRingerMode(mode, mask)" 2012-01-20 10:07:06 -08:00
Glenn Kasten
96f46033b4 Remove dead file include/media/thread_init.h
Change-Id: I98688bb7109b5f82953988935c7c33fe3c7f4ec0
2012-01-19 10:13:52 -08:00
Glenn Kasten
92ecdd6303 Merge "Fix incorrect includes of AudioTrack.h" 2012-01-19 06:10:37 -08:00
Glenn Kasten
a6dafea172 Fix incorrect includes of AudioTrack.h
Remove unnecessary includes of AudioTrack.h.
Use forward declaration of class names in preference to #include when possible.

Change-Id: I12982811fa75c2c7695d8bbfa595a7aaec047dc0
2012-01-18 16:06:47 -08:00
Glenn Kasten
ee7fea9f2f Remove dead setRingerMode(mode, mask)
Change-Id: Ia4cc8be8424a40b3dcb7ebd0264fdff4e5247f7f
2012-01-18 15:10:31 -08:00
Andreas Huber
28ea013f25 Temporarily restore AudioSystem/AudioTrack APIs with their former signatures
until we get updated prebuilts from vendor.

Change-Id: I8aae81d2513edca0ab268053a11c8c4206879e61
2012-01-18 10:51:55 -08:00
Eric Laurent
1be4afecb7 Merge "audio framework: manage stream volume per device" 2012-01-17 17:35:03 -08:00