873 Commits

Author SHA1 Message Date
Marco Nelissen
1c1d1e7ed7 Merge "Gapless playback, step 1." 2012-03-13 13:23:07 -07:00
Marco Nelissen
84b8320545 Gapless playback, step 1.
Currently able to play Ogg Vorbis, PCM WAV and other lossless files seamlessly
by reusing the initial AudioTrack for subsequent players.

Change-Id: Ie7cf6b9076bdf4f9211574456d192c02c04fecc7
2012-03-13 13:13:14 -07:00
James Dong
7cd59760be Merge "Switched to use the header files in /frameworks/native and deleted the duplicate header files in /frameworks/base" 2012-03-13 12:44:54 -07:00
Glenn Kasten
18db49a462 Whitespace and indentation
Fix indentation to be multiple of 4.
Make it easier to search:
  sp< not sp < to
  "switch (...)" instead of "switch(...)" (also "if" and "while")
Remove redundant blank line at start or EOF.
Remove whitespace at end of line.
Remove extra blank lines where they don't add value.

Use git diff -b or -w to verify.

Change-Id: I966b7ba852faa5474be6907fb212f5e267c2874e
2012-03-13 11:09:47 -07:00
James Dong
e1dea48f92 Switched to use the header files in /frameworks/native
and deleted the duplicate header files in /frameworks/base

o related-to-bug: 6044887

Change-Id: I17e0692d9a9b5c8796ded36677c833ca8ab36795
2012-03-12 21:28:57 -07:00
Glenn Kasten
db9c21e754 Merge "Remove virtual from methods that don't need it" 2012-03-12 15:05:21 -07:00
Glenn Kasten
28b269f341 Use audio_policy_output_flags_t consistently
This affects:
 - IAudioFlinger::openOutput
 - AudioTrack::AudioTrack
 - AudioTrack::set
 - apps that call these

Change-Id: I26fb281bac6cb87593d17697bc9cb37a835af205
2012-03-09 15:32:22 -08:00
Glenn Kasten
df0d3ab4d0 Merge "Use AudioRecord::record_flags consistently" 2012-03-09 15:23:45 -08:00
Glenn Kasten
8d8557ad57 Remove virtual from methods that don't need it
Change-Id: I30e17e61aae25b036436c0e270313c80c43e5f06
2012-03-09 12:48:18 -08:00
Glenn Kasten
f60a5d7162 Use AudioRecord::record_flags consistently
Change-Id: I6f369a2b99eb515603bc7d5629a07db2b96783fe
2012-03-08 18:11:55 -08:00
Eric Laurent
d10a5992f9 Merge "audio policy: use audio_devices_t when appropriate" 2012-03-08 17:45:44 -08:00
Eric Laurent
c9ab9f5c2c audio policy: use audio_devices_t when appropriate
Change-Id: I1b3a5879e81c789fb53d356af3d3a1ee2dca955f
2012-03-08 15:57:09 -08:00
Glenn Kasten
ffed04ac3c IAudioFlingerClient::ioConfigChanged param2 const
The 3rd parameter (param2) to AudioFlingerClient::ioConfigChanged
is used as an input.  So changed it from void * to const void *.
It is then cast to const OutputDescriptor *
or const audio_stream_type_t * depending on the event.

Change-Id: Ieec0d284f139b74b3389b5ef69c7935a8e5650ee
2012-03-06 16:43:19 -08:00
Eric Laurent
54682583ba Merge "AudioTrack: relax check on minimum buffer size" 2012-03-06 10:52:18 -08:00
James Dong
b7fdddab0d Merge "Remove unused code - MediaSourceSplitter" 2012-03-06 10:23:58 -08:00
James Dong
5fe7057960 Remove unused code - MediaSourceSplitter
Change-Id: Icf37832a1c234501ee3ff91ff13eece2242425ae
2012-03-05 19:30:08 -08:00
Eric Laurent
bd6b74ce46 AudioTrack: relax check on minimum buffer size
Current AudioTrack implementation enforces that the requested audio
buffer size is at least corresponding the audio latency.
This requirement is too strong and leads to problems with current
stagefright and AudioSink implementations when playing over output
streams with long latency.

Ultimately, the AudioSink design should be changed to specify a minimum
buffer size in time or frames units but not in buffer count units.

Change-Id: I8ba603956f92ac49143a8249572665aa548f2f0f
2012-03-05 17:18:36 -08:00
Jean-Michel Trivi
b93a765ba6 Merge "Add channel mask in AudioSink" 2012-03-05 14:51:54 -08:00
Jean-Michel Trivi
4ed260feda Add channel mask in AudioSink
Add support for specifying a channel mask when opening an AudioSink.
  This parameter does not replace the channel count parameter in order
  to not have to duplicate the logic to derive a mask from the
  channel count everywhere an AudioSink is used without a known mask.

A mask of 0 (CHANNEL_MASK_USE_CHANNEL_ORDER) means a mask will
  be automatically derived from the number of channels.

Update existing AudioSink implementations to use the channel mask,
  and users of AudioSink to specify the mask if available, and
  CHANNEL_MASK_USE_CHANNEL_ORDER otherwise.

Change-Id: Ifa9bd259874816dbc25ead2b03ea52e873cff474
2012-03-02 17:26:49 -08:00
Glenn Kasten
92454de63c Merge "Fix typos and line length in AudioRecord comments" 2012-03-02 13:48:35 -08:00
John Grossman
720aa28279 Switch the way we configure for MediaPlayer retransmission.
This is a cherry-pick of I6ab07d89b2eeb0650e634b8c3b7a0b36aba4e7dd
with merge conflicts addressed by hand and additional changes made in
response to code review feedback.

Move in the direction of a more publishable API for configuring a
media player for retransmission.  It used to be that we used a custom
invoke and a modified URL (prefixed with aahTX://).  There are many
issues with this technique and it was never meant to stand the test of
time.

This CL gets rid of all that.  A new (but currently hidden) method was
introduced to the java level MediaPlayer API, called
setRetransmitTarget(InetSocketAddress), which allows an app writer to
set the retransmit target.  For now, this method needs to be called
before a call to setDataSource (which is pretty unusual for the
MediaPlayer API) because this mid level code uses this as a cue to
instantiate an aahTX player instead of relying on the data source to
select a player.  When retranmit functionality becomes part of the
existing android player implemenation, this
set-retrans-before-set-data-source behavior can go away, along with
the aahTX player itself.

Change-Id: I3b46c5227bbf69acb2f3cc4f93cfccad9777be98
Signed-off-by: John Grossman <johngro@google.com>
2012-03-01 14:41:35 -08:00
Andreas Huber
faf88b85e2 Merge "Instead of hardcoding OMX component names in our code, support" 2012-03-01 12:41:10 -08:00
Andreas Huber
3d3864fff4 Instead of hardcoding OMX component names in our code, support
a config file instead.

Change-Id: I5835903ab9f1c4a22ccc605ca99ed966767adf57
2012-03-01 11:30:10 -08:00
Eric Laurent
45d8c80dea renamed audio policy output flag.
Renamed AUDIO_POLICY_OUTPUT_FLAG_INDIRECT to AUDIO_POLICY_OUTPUT_FLAG_NONE
which is more appropriate.

Change-Id: Ia14d60397df0f2dcd9bea0186400a09da35bc104
2012-03-01 09:43:32 -08:00
Glenn Kasten
d67f2cf943 Merge "AudioRecord const methods" 2012-02-29 14:45:25 -08:00
Andreas Huber
0c9aa1b6fc Merge "Separate the notion of "stop" from that of "release", i.e." 2012-02-29 09:20:25 -08:00
Andreas Huber
4484bdd2f9 Separate the notion of "stop" from that of "release", i.e.
stop - means transition back to LOADED state and keeping the component
instance allocated.

release - means we get rid of the component completely.

Change-Id: I40ad01ce70821faaad43f57999249904f9144924
2012-02-28 15:54:51 -08:00
Glenn Kasten
bd714b6cbe AudioRecord const methods
Change-Id: Ifae4fd7820b650aaca2b13c8658c292db1c46c0f
2012-02-28 08:50:18 -08:00
Insun Kang
3008f0329b Moves TimedTextDriver.h into include/media/stagefright/timedtext.
So that other players can include TimedTextDriver.h properly.

Change-Id: I15e72bf655de8555eef6244a6c853c27a0828a1d
2012-02-27 17:14:28 +09:00
Mathias Agopian
af01feafc3 remove dependency on android_native{s_priv|buffer}.h
Change-Id: Ie4b95f7061c240f37c504414259f92d72c4ffc89
2012-02-24 18:26:01 -08:00
Glenn Kasten
bd3db2f54e Fix typos and line length in AudioRecord comments
Change-Id: I85cfb9a2b9b3ade098161aa7687b4d4f7eb226ea
2012-02-24 13:00:45 -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