History log of /frameworks/wilhelm/src/
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
0f6da1a299c8dd924d19714ee69d343915c32d2c 14-Nov-2014 Raph Levien <raph@google.com> Reduce audio output latency

This patch reduces latency in the OpenSL ES player path by calling the
callback immediately before data is consumed, rather than after.

Bug: 12246268
Change-Id: I8273b4a03f16011beec21dd52545f8ad1a25fd95
ndroid/AudioPlayer_to_android.cpp
tf/IBufferQueue.c
tfstruct.h
460bdad43aaec3c6ffe7f259719e00807742ad6d 24-Apr-2014 Glenn Kasten <gkasten@google.com> Audio recorder missing a callback protector

Bug: 14291968
Change-Id: I620d5e82f58e57e87097984a649b5c3a25c42963
ndroid/AudioRecorder_to_android.cpp
ndroid/AudioRecorder_to_android.h
lasses.h
tf/IEngine.c
bjects/CAudioRecorder.c
d0081ece36dcb6ecdadeb9fc0ee912cffb7effc7 28-Jul-2014 Eric Laurent <elaurent@google.com> rename AudioSystem::newAudioSessionId()

Rename AudioSystem::newAudioSessionId() to
AudioSystem::newAudioUniqueId() as it can be used
also for I/O handles.

Bug: 12378680.

Change-Id: I5f0eaaadc21ff2aacf81670490ad42c54537d86b
ndroid/AudioPlayer_to_android.cpp
ndroid/MediaPlayer_to_android.cpp
d03d766459462a0f86a800ac4cc0cecb05e97beb 02-Jul-2014 Eric Laurent <elaurent@google.com> audio: fixed channel count determination from channel mask

Do not use popcount() to derive channel count from channel mask.

Bug: 15000850.
Change-Id: I7af794e4515cd0f85e5b9744bd4e53e33aa0d5eb
ndroid/AudioPlayer_to_android.cpp
e57c13397185f9ad0f162855e9a8ebeb0c94bfc4 24-May-2014 Andy Hung <hunga@google.com> Add float playback capability to OpenSL ES

Add SLAndroidDataFormat_PCM_EX to match OpenSLES 1.1 header file,
together with related SL_ANDROID_PCM_REPRESENTATION_* constants.
Use slesTest_playbq as the test application.

Change-Id: I04bcd170f5c517051a799bacf8f52da5f1353ad6
ndroid/AudioPlayer_to_android.cpp
ndroid/android_sles_conversions.h
ata.c
ata.h
tf/IEngine.c
1580f7ab4e02ed2881ac7cdeab2044e990f2e9e6 28-May-2014 Glenn Kasten <gkasten@google.com> Fix regression in AudioRecorder

Interfaces were out of order

Change-Id: I027dc9d8ed93514d93a5b05063a8711b9841aaf4
PH_to.c
lasses.c
lasses.h
c323fec2a2639c0cf7463016d592d0eb0539657c 24-May-2014 Andy Hung <hunga@google.com> Add 24 bit and 32 bit playback capability to OpenSL ES

slesTest_playbq is the test application.

Change-Id: Iaa453471d2e9ff4e6b11ac5c68690993179fea2b
ndroid/AudioPlayer_to_android.cpp
ndroid/android_sles_conversions.h
ata.c
76de029ec49b535ca8aa3aef777d0dfb1838889e 24-May-2014 Andy Hung <hunga@google.com> Add mono to android_audioPlayer_validateChannelMask

Change-Id: I898401a1a0b6081dc0d4e9d41be09cb38c675951
ndroid/AudioPlayer_to_android.cpp
759687c36cbeaaa40408960eafa3ffd14e76cbc6 17-May-2014 Ji-Hwan Lee <jihwan@google.com> Fix build on x86_64 targets

Change-Id: Ib60d8552468901af476db61eb7bf666e1ffd81fd
ndroid/android_Effect.cpp
43bde29538bf33d444d41a0b9cc0d60793fb20fa 17-May-2014 Paul McLean <pmclean@google.com> Merge "Initial Implementation of new NDK effect interfaces"
f8b3141926967ba37d315cc8d3956d7214958e6b 15-May-2014 Paul McLean <pmclean@google.com> Initial Implementation of new NDK effect interfaces

Support for Acousic Echo Cancellation, Automatic Gain
Control and NoiseSuppression effects on AudioRecorder

Change-Id: I85dcb988f59dacaaed540737018b8f629efeaad3
ndroid.mk
PH.h
PH_to.c
penSLES_IID.c
ndroid/android_Effect.cpp
utogen/IID_to_MPH.c
utogen/MPH_to_3DGroup.h
utogen/MPH_to_AudioPlayer.h
utogen/MPH_to_AudioRecorder.h
utogen/MPH_to_Engine.h
utogen/MPH_to_LEDDevice.h
utogen/MPH_to_Listener.h
utogen/MPH_to_MediaPlayer.h
utogen/MPH_to_MetadataExtractor.h
utogen/MPH_to_MidiPlayer.h
utogen/MPH_to_OutputMix.h
utogen/MPH_to_Vibra.h
lasses.c
lasses.h
nterfaces.c
tf/IAcousticEchoCancellation.c
tf/IAutomaticGainControl.c
tf/INoiseSuppression.c
tfstruct.h
l_iid.c
les.c
t/OpenSLESUT.c
bb74f23cd3dc877c7eaf4db2132f724d11aeeb8f 15-May-2014 Paul McLean <pmclean@google.com> Initial Implementation of new NDK audio formats

Support for 24-bit audio formats - Support for Quad, 5.1 and 7.1
multi-channel output

Change-Id: I4e4f5d2915a43970ae01f552ba506591902aa070
ndroid/AudioPlayer_to_android.cpp
ndroid/android_sles_conversions.h
ata.c
6d9ffdd133415d1e2750298106ffa4d9df2ed08c 20-Mar-2014 Glenn Kasten <gkasten@android.com> am e773894b: Merge "Revert "Only build libwilhelm, libOpenSLES, libOpenMAXAL in 32-bit""

* commit 'e773894b714268396562b942d1556a3575c5f97f':
Revert "Only build libwilhelm, libOpenSLES, libOpenMAXAL in 32-bit"
7107dd44ecaced736f370e60c7a8a50c5e4e1020 20-Mar-2014 Glenn Kasten <gkasten@android.com> Revert "Only build libwilhelm, libOpenSLES, libOpenMAXAL in 32-bit"

This reverts commit c6d1318d2d5d215cfe7ee642c02ff3aeb2c3c809.
ndroid.mk
0ad401297dcc5479015baf32b4f80170ffed203b 18-Mar-2014 Glenn Kasten <gkasten@android.com> am dde6053e: Merge "Only build libwilhelm, libOpenSLES, libOpenMAXAL in 32-bit"

* commit 'dde6053ebebcf6d836308dc80623099195cd5e0b':
Only build libwilhelm, libOpenSLES, libOpenMAXAL in 32-bit
c6d1318d2d5d215cfe7ee642c02ff3aeb2c3c809 01-Mar-2014 Glenn Kasten <gkasten@android.com> Only build libwilhelm, libOpenSLES, libOpenMAXAL in 32-bit

This change is temporary: native audio APIs must be available to 64-bit
apps, so this will need to be reverted. However currently the dependent
libraries needed here are not available in 64-bit.

Change-Id: Ic3b30cf85800046e5eed4d71cca0a58f9964b1b3
ndroid.mk
7d20a9486d52d3e0747e34fb717830fcdad21933 07-Mar-2014 Narayan Kamath <narayan@google.com> am 5c057d44: Merge "Remove use of pthread_mutex_lock_timeout_np."

* commit '5c057d44e5869b8acb779d48a4b821859040d9c8':
Remove use of pthread_mutex_lock_timeout_np.
7e7826821d0e82c13a4f9f34525d0cdaf323f34a 06-Mar-2014 Narayan Kamath <narayan@google.com> Remove use of pthread_mutex_lock_timeout_np.

Replace it with the portable pthread_mutex_timedlock.

This fixes the 64 bit build, because pthread_mutex_timedlock
isn't defined for LP64.

Change-Id: Ia1dbb970b8d968aab8b325687a3ebadd0c7ece53
ocks.c
a6babec83b52b08e9d2807afe2be05607fd7a133 14-Feb-2014 Narayan Kamath <narayan@google.com> am 298eac15: Merge "AArch64: Minor changes related to 64-bit platform"

* commit '298eac1548462c05e9c417abb0e401d805700e82':
AArch64: Minor changes related to 64-bit platform
01f8573bc2a850536b02855d483dfe130c050a2f 12-Mar-2013 Ashok Bhat <ashok.bhat@arm.com> AArch64: Minor changes related to 64-bit platform

Changes include
[x] Use %zu for size_t
[x] Use PRId64 to print 64-bit integer value
[x] Use uintptr_t for integer variable used to store address.

Change-Id: I69926cce76b0d645f1abccd584444197a5e40318
Signed-off-by: Marcus Oakland <marcus.oakland@arm.com>
Signed-off-by: Ashok Bhat <ashok.bhat@arm.com>
ndroid/AacBqToPcmCbRenderer.cpp
ndroid/android_GenericPlayer.cpp
ndroid/util/AacAdtsExtractor.cpp
fb8035480852914d326eb4c2074060df32382926 30-Jan-2014 Andreas Huber <andih@google.com> FINAL ATTEMPT: HTTP services are now provided from JAVA and made available to media code

Change-Id: Ia7681255410340707b3c84665dbcab98d7507dbf
ndroid.mk
ndroid/android_AudioSfDecoder.cpp
ndroid/android_LocAVPlayer.cpp
f0c3b4edf597c40aae4ea311575f39c8bcf203df 06-Aug-2013 Glenn Kasten <gkasten@google.com> Merge "Always request fast track for recording"
3eaa329775fc522d8ea4acd4edc379eabf9ac332 12-Nov-2012 Glenn Kasten <gkasten@google.com> Fix build warnings

narrowing conversion of '-1' from 'int' to 'SLuint32 {aka unsigned int}' inside { } is ill-formed in C++11 [-Wnarrowing]
converting to non-pointer type 'pthread_t {aka long int}' from NULL [-Wconversion-null]
warning: 'currentRate' may be used uninitialized in this function [-Wmaybe-uninitialized]

Change-Id: I066260cc216ff9f15c787f65e3d3efbda8f8ef35
ndroid/CallbackProtector.cpp
evices.c
5e3bcbffacc309fb2d9e002b7bc1ed131fddc6fc 02-Aug-2013 Glenn Kasten <gkasten@google.com> Always request fast track for recording

Change-Id: I76fc395e3b1babe41522023a56a37e4310b248e3
ndroid/AudioRecorder_to_android.cpp
03a012a855b7edcda0b799031d70765769057be5 08-Jul-2013 Glenn Kasten <gkasten@google.com> Merge "Remove requirement for application side double-buffering"
c0e8dc0d40329960136cb8729cb6d19cb393a319 24-Jun-2013 hkuang <hkuang@google.com> Change VP8 mime type name and add VP9 mime type.

Change-Id: I3fafe2482cc51ca2d57976ba6112fea50d8e68ea
ndroid/VideoCodec_to_android.cpp
e5ede1a139fcedbf075675179d919fbe731898f0 13-Jun-2013 Glenn Kasten <gkasten@google.com> AudioRecord must be used as sp<> only

Bug: 9423855
Change-Id: Icc37559082f6c6c7052ac03a835a3d2c6732af59
ndroid/AudioRecorder_to_android.cpp
lasses.h
tf/IEngine.c
92e53bc98cd938e9917fb02d3e5a9be88423791d 16-Mar-2013 Glenn Kasten <gkasten@google.com> Remove requirement for application side double-buffering

At one time it was thought that application side double-buffering was
required for fast tracks to work reliably. It now appears that this
was overly conservative, and that fast tracks work just fine with
single buffers on application side. This is because the moment after
FastMixer pulls the data from the fast track, it synchronously signals
the application's callback thread to wake up, which will then run the
buffer completion callback handler to re-fill the buffer. So disabling
this check now.

Bug: 9276275
Change-Id: I2c74a8c6d752140ccc7d285c5c5c1f7fcd792650
ndroid/AudioPlayer_to_android.cpp
3f73d418d3738c05fbb872644edc90765d1de00a 10-Apr-2013 Ying Wang <wangying@google.com> Add liblog

Bug: 8580410
Change-Id: Ie9f89a3b26d0070c73d061c2c2566dd703d7a137
ndroid.mk
aab8de637bbd54d3ca4cbaa43b8f66b0e9dfcac3 14-Mar-2013 Ben Cheng <bccheng@google.com> Use default visibility for __assert and __assert2.

We will change the build file to link static libraries before shared
libraries soon. Without this change the linker will complain their
visibilities.

BUG: 8247455
Change-Id: Iec97be4b42114b5a28174a03f9d8017e85b28668
ssert.c
55cb1cdff4e65e9064df49bc8636fe522370b01b 15-Feb-2013 Mathias Agopian <mathias@google.com> Refactoring: Rename SurfaceTextureClient to Surface

Change-Id: Ibc86143858a3c4fe31fb43af0b22087348b8c204
ndroid/MediaPlayer_to_android.cpp
1cde2eac95a1d76731bdf162db7ec42b584f0bc5 21-Dec-2012 Glenn Kasten <gkasten@google.com> Merge "Remove unnecessary parameter"
3376429dfe306b9bfebf3a50941e2ccf44984495 18-Dec-2012 Glenn Kasten <gkasten@google.com> Remove unnecessary parameter

Just get the parameter on server side

Change-Id: Ief316b125a4c496f995520697c2b53a1c4ebc3bc
ndroid/android_LocAVPlayer.cpp
ndroid/android_StreamPlayer.cpp
e21f91df7afb1175ddb5b0045ebb0d5338df2535 18-Dec-2012 Andy McFadden <fadden@android.com> Rename ISurfaceTexture and SurfaceTexture

The C++ class names don't match what the classes do, so rename
ISurfaceTexture to IGraphicBufferProducer, and SurfaceTexture to
GLConsumer.

Bug 7736700

Change-Id: I54f19904e325518a3af8fe23c018d3c0bb6bd807
ndroid/MediaPlayer_to_android.cpp
ndroid/android_GenericMediaPlayer.cpp
ndroid/android_GenericMediaPlayer.h
ndroid/android_GenericPlayer.h
b42e943393b119b42b8fdca29be067800c35c78e 13-Nov-2012 Glenn Kasten <gkasten@google.com> Remove dead code android_getMinFrameCount

Change-Id: I1d4779a822e024bb8ae77eff153183bfb6a07b12
ndroid/AudioPlayer_to_android.cpp
b3adfe68492251ab6345b4fda500737822fb9c81 02-Nov-2012 Jean-Michel Trivi <jmtrivi@google.com> am 4a4c7289: Fix race condition when streaming MP2TS to media server

* commit '4a4c728965b10df683d37b4b7ac27211e02006ad':
Fix race condition when streaming MP2TS to media server
4a4c728965b10df683d37b4b7ac27211e02006ad 02-Nov-2012 Jean-Michel Trivi <jmtrivi@google.com> Fix race condition when streaming MP2TS to media server

Data transfer between user space and the media server of MP2TS
packets is done through a queue of buffers. This queue tells
the OpenMAX AL player whenever a buffer is available to be filled
so it can be transferred.
When the player is destroyed, this queue is cleared; this is
indicated by the boolean mBuffersHasBeenSet whose role is to
store whether the queue is properly configured.
There is a race condition where the queue could be cleared right
as the availability of a buffer is signaled.
The fix is to only try to use the available buffer when
mBuffersHasBeenSet is true.

Bug 6971102

Change-Id: Ibbe8f58fc954b84bf560f29944d1018dab261895
ndroid/android_StreamPlayer.cpp
85b1ba5dfb402b1acbfa516776d946769ccb8ffd 01-Nov-2012 Glenn Kasten <gkasten@google.com> Line length 100

Change-Id: I9a1a2e24e3b66e08ec33d0d8cf5ab2e14b559d4a
ndroid/android_sles_conversions.h
4fbe4c710dcf0f421cf01e4c63268ae4608b6f15 30-Oct-2012 Glenn Kasten <gkasten@google.com> Remove obsolete references to libmedia_native

Bug: 6654403
Change-Id: If76d6b67518a7c8079e349f7fd09fe692851eb5c
ndroid.mk
72721a95943c68ea0d75eb5c1ff2ab7380e4dc6f 14-Mar-2012 Glenn Kasten <gkasten@google.com> Use audio_channel_mask_t consistently

Change-Id: I77a624e2656046075eb38cf880c26cdf8ba36af8
ndroid/android_sles_conversions.h
3400c346f272492b52c7395c14d4a0f27603f87f 22-Jun-2012 Glenn Kasten <gkasten@google.com> Remove AudioRecord record_flags

Change-Id: I978579be3609c88d6fb6580a8cb3a594c76912a3
ndroid/AudioRecorder_to_android.cpp
b68c41d62a30eb2dbc8f26c87de75076e94632b8 09-May-2012 Jean-Michel Trivi <jmtrivi@google.com> am 91145ef1: Playback rate on OpenSL ES AudioPlayer playing from URI/FD

* commit '91145ef159d3e165a461cbd76341ff8ed3d72bae':
Playback rate on OpenSL ES AudioPlayer playing from URI/FD
91145ef159d3e165a461cbd76341ff8ed3d72bae 04-May-2012 Jean-Michel Trivi <jmtrivi@google.com> Playback rate on OpenSL ES AudioPlayer playing from URI/FD

Allow AudioPlayer to use the platform's 500-2000 range (in
permille) of playback rate for audio when the data source
is a URI or FD.
Since play events for those players are simulated through
monitoring the playback position, scale the time
between updates so play events are delivered in content
time, not presentation time (as defined in OpenSL ES
specification, "positions do not scale with changes in
playback rate").

Bug 5898620

Change-Id: Ib512caebd7f3983c9e845be62e48dfee8499e59c
ndroid/AudioPlayer_to_android.cpp
ndroid/android_GenericMediaPlayer.cpp
ndroid/android_GenericMediaPlayer.h
ndroid/android_GenericPlayer.cpp
ndroid/android_GenericPlayer.h
84ed0307dcc468a925c8e779e804367345177ff3 25-Apr-2012 Andrew Hsieh <andrewhsieh@google.com> Fixed runtime linkage problems for libOpenSLES and libOpenMAXAL

Libraries libOpenSLES and libOpenMAXAL depends on liblog but Android.mk
doesn't specify it. Native app links libOpenSLES or libOpenMAXAL
may fail with the following error message (taking
$NDK/samples/native-media as an example)

E/AndroidRuntime( 824): Caused by: java.lang.UnsatisfiedLinkError:
Cannot load library: link_image[2260]: 82 could not load needed
library 'libOpenMAXAL.so' for 'libnative-media-jni.so'
(mips_relocate_got[1804]: 82 In 'libOpenMAXAL.so',
can't locate symbol __android_log_assert)

It's unclear why compiler (MIPS/ARM/X86) doesn't complain w/o liblog.
It's also unclear why ARM and X86-based Android devices don't have
runtime problem. (ie. $NDK/samples/native-media runs on ARM/X86 but
fails in MIPS-based device)

Fixed Android.mk to make it explicit.

Change-Id: I12a254813f6b7cf98cc735d0a4d1f485e730f9fa
ndroid.mk
8daa09a2af477dbe495839ccf806919a02aa53cd 18-Apr-2012 Eric Laurent <elaurent@google.com> rename audio policy flags

Change-Id: I652fc4cfe6cc9a273234256e20f0b706182e2e27
ndroid/AudioPlayer_to_android.cpp
78e61e01307d62bd04283ada99ce5df1c647810d 04-Apr-2012 Glenn Kasten <gkasten@google.com> Updates to Wilhelm's use of fast tracks

Move volume and mute/solo interfaces from blacklist to whitelist.
Remove hard-coded frame count; this is now done at a lower level.

Change-Id: Ie9b48941df799dd8cba45dc7015d62e5adb76f5d
ndroid/AudioPlayer_to_android.cpp
1b118ffebd7769e092df47d617df9e20d38b023c 02-Apr-2012 Glenn Kasten <gkasten@google.com> Merge "Fast tracks"
e7b0c260194d155513f5e07105841597f7bb9ab8 28-Mar-2012 -b master-pdk-dev <jdong@google.com> Android.mk file changes in frameworks/wilhem

Change-Id: Ibc10f34a4686a3b5647f67436aab8f52a50de479
ndroid.mk
7880f29c5ae58e0dd5ac67753049acc8888cb5f5 27-Mar-2012 Glenn Kasten <gkasten@google.com> Fast tracks

Change-Id: I7ab4d843be5bfe759cea8330ab0ede46e236adaf
ndroid/AudioPlayer_to_android.cpp
077405a448705636da29403ff6f24fd63623daac 19-Mar-2012 Glenn Kasten <gkasten@google.com> Merge "audio_channel_in/out_mask_from_count"
b18944c03c48d91fada0ae7bb364d056840f6dba 19-Mar-2012 Glenn Kasten <gkasten@google.com> Merge "Prepare to move system/media"
6d58fe068814505d6b50248a4ef8a96f2594ef40 16-Mar-2012 Glenn Kasten <gkasten@google.com> Merge "Add libmedia_native"
ee3ad477a71ba690f0b5721056a6514bf2f76bd8 16-Mar-2012 Glenn Kasten <gkasten@google.com> Merge "Fix indentation and redundant whitespace"
5321b3665e1a538cdcf894dea99d15c10b18ccf8 14-Mar-2012 Glenn Kasten <gkasten@google.com> Prepare to move system/media

Change-Id: Iac6dcfb72753e53e9a42b5feeaa2d6523f2395a4
ndroid.mk
27ff9b2ebcb70cf1b615a1040fb2ddd854f13cbf 13-Mar-2012 Glenn Kasten <gkasten@google.com> Add libmedia_native

Change-Id: I8fa7edb2872697164edb9bdd464e282ac113075b
ndroid.mk
5cb9343d2739da755186f8dcdf1da307671e7353 14-Mar-2012 Glenn Kasten <gkasten@google.com> audio_channel_in/out_mask_from_count

Change-Id: Id62e9dee55367495c1cff04ea0b9ff7f07742e58
ndroid/android_sles_conversions.h
cde9b8b8bd0c84c62de49e73c08d224274280bfa 13-Mar-2012 James Dong <jdong@google.com> Switched to use header files in /frameworks/native

o related-to-bug: 6044887

Change-Id: Iedc72c551ce4792e695dce3cf222b76598667f43
ndroid.mk
4a8b57c4e20db8f757a6fa53c05c7b2942d7aa07 10-Mar-2012 Glenn Kasten <gkasten@google.com> Merge "Use audio_policy_output_flags_t consistently"
aadb8f72e49046c8aac8d60d5411f8ca30bd167a 07-Mar-2012 Glenn Kasten <gkasten@google.com> Use AudioRecord::record_flags consistently

Change-Id: Ibb185b1c461df2c17061a8a0d62cba0611a89e1e
ndroid/AudioRecorder_to_android.cpp
1f41f98a87ee3d0070a794d8e8905e7d9d03d755 07-Mar-2012 Glenn Kasten <gkasten@google.com> Use audio_policy_output_flags_t consistently

Change-Id: Ie487ac0776e9bc6f12907945ec9bea0730200ad1
ndroid/AudioPlayer_to_android.cpp
01e4a8ff63523bba5c8f919a72e0adb66daf4b98 26-Feb-2012 Mathias Agopian <mathias@google.com> cleanup includes

Change-Id: Ia98b76b2e0c49ee257e1f31c61c2d6f72a9fe894
ndroid/MediaPlayer_to_android.cpp
ndroid/MediaPlayer_to_android.h
ndroid/android_GenericMediaPlayer.cpp
ndroid/android_GenericMediaPlayer.h
bjects/CMediaPlayer.c
5f12770df2875b280acaf6a0de08ae0b57c930cf 08-Feb-2012 James Dong <jdong@google.com> Move away from MediaDebug and use ADebug instead

Change-Id: Ic448bdd6462708779f0e5c78a25e0a359b129654
ndroid/BufferQueueSource.cpp
ndroid/include/AacAdtsExtractor.h
adf8bd5d4360542b6b6c48c4471fdd8d855e05cc 24-Jan-2012 Glenn Kasten <gkasten@google.com> Use audio_source_t consistently

Use audio_source_t instead of int.

Change-Id: I88256ee508b8f5b50635985361efa7c458f11296
ndroid/AudioRecorder_to_android.cpp
lasses.h
24c770c9d328ac5516b488e00c77d6c76d13bcfc 17-Jan-2012 Glenn Kasten <gkasten@google.com> Merge "Use audio_stream_type_t consistently"
49f944656984a3047e66b2eb625e343841631789 12-Jan-2012 Glenn Kasten <gkasten@google.com> Merge "Use audio_format_t consistently"
eb0545cb9f6a5df8624fb3e3c3e75aea7a5dab8f 09-Jan-2012 Glenn Kasten <gkasten@google.com> Merge "Fix bug in use of getPositionUsec()"
46d1c53d608344d8f31e12b2f72f24b2908b650c 09-Jan-2012 Glenn Kasten <gkasten@google.com> Merge "Remove virtual from methods that don't need it"
b47c7beddecd38ae565d84b72da526843bfdd43e 08-Jan-2012 Steve Block <steveblock@google.com> Rename (IF_)LOGE(_IF) to (IF_)ALOGE(_IF) DO NOT MERGE

See https://android-git.corp.google.com/g/#/c/157220

Bug: 5449033
Change-Id: I584e6f6a3c52308b7a5a5c9980ca429c831f4320
ndroid/VideoCodec_to_android.cpp
ndroid/android_GenericMediaPlayer.h
a93915739311e228a59d93ecd93a5665299953ab 06-Jan-2012 Glenn Kasten <gkasten@google.com> Fix bug in use of getPositionUsec()

getPositionUsec() returns int64_t, not uint32_t, so it would truncate
after 71 minutes. Also the check ANDROID_UNKNOWN_TIME always failed.

Change-Id: I3152d7715dfe4b67a5fad6985c6717c7a802b464
ndroid/android_AudioSfDecoder.cpp
0bfed90f3b312f7c8f2b744efcf62f1992661d6c 06-Jan-2012 Glenn Kasten <gkasten@google.com> Use audio_stream_type_t consistently

Change-Id: I6c02c9b285a00cefefc5d90d655d92ca8690765a
ndroid/AudioPlayer_to_android.cpp
ndroid/android_defs.h
lasses.h
a6c69c7e1665b38da8d6784e65210acbe501b92c 06-Jan-2012 Steve Block <steveblock@google.com> Rename (IF_)LOGW(_IF) to (IF_)ALOGW(_IF) DO NOT MERGE

See https://android-git.corp.google.com/g/157065

Bug: 5449033
Change-Id: I270cbf7b920d5f2fbb5f345f3c88426697c4391d
ndroid/AudioPlayer_to_android.cpp
ndroid/MediaPlayer_to_android.cpp
ndroid/android_GenericMediaPlayer.cpp
les_allinclusive.h
18a0d51a7d8fc7387f40e0c0ca16a93062fb4c6f 04-Jan-2012 Glenn Kasten <gkasten@google.com> Use audio_format_t consistently

Change-Id: I81bfafb1fcb374a100b156d9c52771a4b2eb2943
ndroid/android_sles_conversions.h
4bcfac513e073db89f72e2345be365f95895ca28 20-Dec-2011 Glenn Kasten <gkasten@google.com> Merge "Cleanup CreateAudioPlayer and CreateMediaPlayer"
017d5e6abe9135e67d32c55801d94eb1d5ecba61 20-Dec-2011 Glenn Kasten <gkasten@google.com> Merge "Consistent formatting for if ("
ae0ba3a39cd3bdab11df5fc571ab49c2f3334cb6 20-Dec-2011 Glenn Kasten <gkasten@google.com> Merge "Add curlies to if / else"
c4374bd42cd7eadda841a6b089234becb4f6c508 16-Sep-2011 Glenn Kasten <gkasten@google.com> Remove virtual from methods that don't need it

The virtual suggested to the reader that the methods are overridden,
when actually they aren't.

Change-Id: I8283c9c7aaa73cd9bafd2d643bb40854d718489b
ndroid/android_GenericPlayer.h
22ced1dc023dc000118e3a26517b14e9babd7c5a 12-Aug-2011 Glenn Kasten <gkasten@google.com> Fix indentation and redundant whitespace

Change-Id: I8e0193ad5aa9405f64203bf7814d8a9e434c5dde
ndroid/AudioPlayer_to_android.cpp
ndroid/AudioRecorder_to_android.cpp
ndroid/VideoCodec_to_android.cpp
tf/IEqualizer.c
tf/IStreamInformation.c
tf/IVirtualizer.c
72042d4448cee63528c619537321ba73944c6382 16-Nov-2011 Glenn Kasten <gkasten@google.com> Cleanup CreateAudioPlayer and CreateMediaPlayer

Fix minor bug in MediaPlayer, it was missing an assignment if invalid locator:
mp->mAndroidObjType = INVALID_TYPE;

Cleanup:
- add placeholders for android::AudioSystem::acquireAudioSessionId and
releaseAudioSessionId
- remove duplicate initialization of some fields.
- android_audioPlayer_create can never fail, so make it return void
- add comments
- remove unused method audioPlayer_setInvalid
- simplify android_audioPlayer_create

Change-Id: I237b796f6b828cf53bf2c628e52a05a4bdf86c06
ndroid/AudioPlayer_to_android.cpp
ndroid/AudioPlayer_to_android.h
ndroid/MediaPlayer_to_android.cpp
tf/IEngine.c
70e776a54bc945a6a01717a784e66476bc5d450f 16-Sep-2011 Glenn Kasten <gkasten@google.com> Remove redundant this->

Change-Id: I86eabf51bf79c145d3ceff68f5aa527199d14ef7
ndroid/android_GenericPlayer.cpp
ca426f63e9c900ecbd28f8e3037aaf47ef739dd4 03-Oct-2011 Glenn Kasten <gkasten@google.com> Consistent formatting for if (

Change-Id: I4213dbe94c7dbc95565a20d12d66eb16707d0caa
ndroid/AudioPlayer_to_android.cpp
ndroid/AudioRecorder_to_android.cpp
ndroid/android_AudioSfDecoder.cpp
ab7724988c1ff39ad3fc95a7ae0e638357708f7c 29-Jul-2011 Glenn Kasten <gkasten@google.com> Add curlies to if / else

Change-Id: Id697a96cc9bafa56f8ebbb2ad542a70181ed561d
tf/IPlay.c
tf/IVolume.c
les.c
e62501a9aa791a22f8f35491e74a36a14c8ddd29 30-Nov-2011 Glenn Kasten <gkasten@google.com> am 30f49ce0: Merge "Bug 5622637 missing XA_PLAYEVENT_HEADATPOS" into ics-mr1

* commit '30f49ce0c8f9ee464e87552a6fb4fb3d6b09959c':
Bug 5622637 missing XA_PLAYEVENT_HEADATPOS
02a171afdb1a5198b22f38ed1b306bb8cc6e7043 30-Nov-2011 Jean-Michel Trivi <jmtrivi@google.com> resolved conflicts for merge of 2917f475 to master

Change-Id: I63f4689fabb2aee1682d785ad9c41f06de380396
0b8669e6f9d46842bdbe13536283ae468738d211 30-Nov-2011 Glenn Kasten <gkasten@google.com> Merge "Bug 5622637 missing XA_PLAYEVENT_HEADATPOS" into ics-mr1
4d919aa2a89c65869058a98efcaf9066eab8c125 30-Nov-2011 Andreas Huber <andih@google.com> am 7898a5c5: Reflect (internal) API changes made to the IStreamSource interface.

* commit '7898a5c5f283c9487da48ef92f623c149d8a7a72':
Reflect (internal) API changes made to the IStreamSource interface.
af9b87de97356722370d11d2c5797d75cb43969e 29-Nov-2011 Jean-Michel Trivi <jmtrivi@google.com> Fix bug 5553055 support video only format change in MP2TS

Allow command data when enqueueing a format change command.
Support format change where the application signals that the
change is for the video stream only. Consider any other change
or format change command with invalid data as a full format
change.

Change-Id: I6c684eab36a51dded7e3d7e72b8effe13dac6cc8
ndroid/android_StreamPlayer.cpp
ndroid/android_defs.h
tf/IAndroidBufferQueue.c
9dc142db9439e53a3831d7c9e607affe87138db5 29-Nov-2011 Glenn Kasten <gkasten@google.com> Merge "Bug fixes and cleanup for video codec profiles"
df200f6a98da83bf2c1b14aff0ed356263dfb8b7 11-Nov-2011 Glenn Kasten <gkasten@google.com> Bug fixes and cleanup for video codec profiles

Bug fixes:
- removed the line VideoDecoderNbProfLevel[c] = 0;"
it could overwrite the MPEG2 entry if only one codec implementation,
or worse if there were multiple codec implementations
- android_videoCodec_getProfileLevelCombinationNb was returning success
and zero count if a decoder has zero profile/level combinations,
but OpenMAX AL 1.0.1 spec says it must fail in that case.

Minor cleanup:
- omx does not need to be global
- We only use the first codec implementation for a given
decoder ID / MIME type, so simplify the code that iterates through
the array of codec implementations
- Add some const
- Add some comments

Also includes #if 0 code to restrict reported video codec profiles,
as a placeholder -- disabled for now.

Change-Id: I81991f164efaf3606beb5789e1a79cf76ad033a0
ndroid/VideoCodec_to_android.cpp
evices.c
evices.h
tf/IVideoDecoderCapabilities.cpp
665ca3f1b0fc90cd5980a435d164354b2529c0b5 29-Nov-2011 Andreas Huber <andih@google.com> Reflect (internal) API changes made to the IStreamSource interface.

Change-Id: I5cde6bc0d4bd9c62b4851d7e6375cd9216c7c062
related-to-bug: 5553055
ndroid/android_StreamPlayer.cpp
1f20e5c4db4c920bbe7b9e6cd6390ed8df64be9a 29-Nov-2011 Glenn Kasten <gkasten@google.com> Merge "Remove AudioTrackProxy since AudioTrack is RefBase"
eccbfb7d9e4065d5a5a5c1995c69e0eb6b526f5f 29-Nov-2011 Glenn Kasten <gkasten@google.com> Bug 5622637 missing XA_PLAYEVENT_HEADATPOS

Fix problem with a missing XA_PLAYEVENT_HEADATPOS after seek backwards,
due to a race condition between getPosition and onSeekComplete.

Change-Id: I408c8675df8a9b3cbd2874435fbeccdca355bc46
ndroid/android_GenericPlayer.cpp
ae1a5c8dc1fccf7c121eda830f8d23bd094c0f16 15-Nov-2011 Glenn Kasten <gkasten@google.com> Remove AudioTrackProxy since AudioTrack is RefBase

Change-Id: I4a1f755178699e0fdedf58e1f3cbd82e6067e071
ndroid/AudioPlayer_to_android.cpp
ndroid/AudioTrackProxy.h
lasses.h
tf/IEngine.c
ocks.c
682f9be91e641e80739c21d6ff124379a806182a 16-Sep-2011 Glenn Kasten <gkasten@google.com> Bug 5238515 AndroidBufferQueue miscellaneous

AndroidBufferQueue:
- errors found by setItems are now hard errors, and cause Enqueue to
return an error result (e.g. PARAMETER_INVALID or PRECONDITIONS_VIOLATED)
- disallow EOS with non-zero data
- disallow Enqueue after EOS
- Enqueue checks MPEG-2 sync byte of first packet to reduce chance of downstream failures
- use MPEG-2 terminology "packet" instead of "block"
- Clear and init don't need to erase buffer content, as it is inaccessible
- put placeholder in IAndroidBufferQueue_SetCallbackEventsMask
for additional events beyond SL_ANDROIDBUFFERQUEUEEVENT_PROCESSED
- comment unused field mBufferState in AdvancedBufferHeader
- fix a minor typo
- add dump method, #if 0 out by default

Change-Id: I11921e3784bfdb30e2cebaa1dabb705ea5ab0b92
ndroid/android_defs.h
tf/IAndroidBufferQueue.c
tf/IEngine.c
tfstruct.h
les_allinclusive.h
e8433e52441e8328281ff149c9fbacd41a5078ed 15-Nov-2011 Glenn Kasten <gkasten@google.com> Merge "Simplify code for the AAC decode use case"
70e6a0238597223221a8bf5e506c92acf28aa35f 29-Sep-2011 Glenn Kasten <gkasten@google.com> Simplify code for the AAC decode use case

Details:

AacBqToPcmCbRenderer constructor
now takes an additional parameter: the IAndroidBufferQueue * interface.

So now there is no need to register a callback after construction,
and AacBqToPcmCbRenderer::registerSourceQueueCallback
can be deleted.

This allows android_audioPlayer_androidBufferQueue_registerCallback_l
to be deleted.

AacBqToPcmCbRenderer::mBqSource is always non-NULL and const, so this
allows removal of mBqSourceLock and some error-checking code.

BufferQueueSource source constructor now takes the IAndroidBufferQueue *
interface instead of the list [user, context, caller].

This allows mAndroidBufferQueueSource to be const, which then allows
more code to be deleted in IAndroidBufferQueue_RegisterCallback.

new AacAdtsExtractor can't fail.

Change-Id: I1f39ccc1e69833fe6df616feb76edbe4ce82fca7
ndroid/AacBqToPcmCbRenderer.cpp
ndroid/AudioPlayer_to_android.cpp
ndroid/AudioPlayer_to_android.h
ndroid/BufferQueueSource.cpp
ndroid/BufferQueueSource.h
ndroid/include/AacBqToPcmCbRenderer.h
tf/IAndroidBufferQueue.c
1cbcb3d2c9cb208060ad18b16277c8d0e36832f5 15-Nov-2011 Glenn Kasten <gkasten@google.com> Merge "More logging of media events for debugging"
86d4c6adc589ad73ff38e480151e65e755a7071a 14-Nov-2011 Glenn Kasten <gkasten@google.com> am e75ba3ef: Merge "Bug 5201321 recover from mediaserver crash" into ics-mr1

* commit 'e75ba3eff247622fdf36974d2216dcaff269ea5c':
Bug 5201321 recover from mediaserver crash
aeaf3abab0929cb82222e139cba0a663eb6db8f5 11-Nov-2011 Glenn Kasten <gkasten@google.com> Merge "MediaPlayer kEventPrepared similar to AudioPlayer"
513222822545c3e954176476b263df52a47f43a4 10-Nov-2011 Glenn Kasten <gkasten@google.com> Bug 5201321 recover from mediaserver crash

Add a media player death notifier to recover from media server crashes.
Downgrade some logs.
Destructors should be protected.

Change-Id: I7774733bcb12fc7fbfe237bdbeffca1adde46e78
ndroid/AudioPlayer_to_android.cpp
ndroid/android_GenericMediaPlayer.cpp
ndroid/android_GenericMediaPlayer.h
ndroid/android_StreamPlayer.cpp
7f250a17c145382b866d5d4d7ef23d65fada6236 30-Sep-2011 Glenn Kasten <gkasten@google.com> MediaPlayer kEventPrepared similar to AudioPlayer

Now that AudioPlayer kEventPrepared logic for successful/unsuccessful
prepare completion has been combined, make MediaPlayer work the same
way. This will make it easier to merge similar code AudioPlayer and
MediaPlayer in an upcoming CL.

Change-Id: Iaa58dcc85b0ede82036c0a5f45d61d0e7853fe0b
ndroid/AudioPlayer_to_android.cpp
ndroid/MediaPlayer_to_android.cpp
01d2f560058ab5a5f4cad83aa697d4b05d405522 10-Nov-2011 Jean-Michel Trivi <jmtrivi@google.com> am 5696c8a7: Merge "Bug 5585323 Authorize audio decode for system" into ics-mr1

* commit '5696c8a7a0e2fde4b051230544a58db853d3551f':
Bug 5585323 Authorize audio decode for system
a5c0cf350f2559bb96e1ff0b180927b0a420d331 10-Nov-2011 Glenn Kasten <gkasten@google.com> am b9217405: Merge "Bug 5578928 Fix race in stop for destroy" into ics-mr1

* commit 'b921740510e15a4e403e2819f1a8f0a9a6c03da9':
Bug 5578928 Fix race in stop for destroy
22dc81e75a7d50a7fbe07d429a7e8b7ab2a04bd1 09-Nov-2011 Jean-Michel Trivi <jmtrivi@google.com> Merge "Bug 5585323 Authorize audio decode for system" into ics-mr1
f17145ab7ec3eda0c21aafd3b77e9bef97ee3d7c 09-Nov-2011 Glenn Kasten <gkasten@google.com> Merge "Bug 5578928 Fix race in stop for destroy" into ics-mr1
0c7d40a5f11f6930e6c4b2551a14f41dd721f936 08-Nov-2011 Jean-Michel Trivi <jmtrivi@google.com> Bug 5585323 Authorize audio decode for system

Authorize the use of specific audio codecs for audio decoding
by the system, which guarantees audio is decoded for playback,
when the appropriate system permission is used.

Change-Id: I0633b04b4d0aebe89804ef48752bf05d72abc56d
ndroid/android_AudioSfDecoder.cpp
3c59249869119ec0f1dd53b8b3045f785c514046 08-Nov-2011 Andreas Huber <andih@google.com> am e87e28c3: Merge "Remove MediaPlayer::setVideoSurface legacy." into ics-mr1

* commit 'e87e28c32f35ed40a12b18ef51cc6af0f44ec270':
Remove MediaPlayer::setVideoSurface legacy.
b3990dc973bd3efa83ef56f210560503739108eb 08-Nov-2011 Andreas Huber <andih@google.com> Merge "Remove MediaPlayer::setVideoSurface legacy." into ics-mr1
8ab6c02fa1384397d24eb8c15029577b17ab7c71 07-Nov-2011 Glenn Kasten <gkasten@google.com> Bug 5578928 Fix race in stop for destroy

Change-Id: Ic5c84406bffa372a2fd3e92ad1aca1f6f5185026
ndroid/android_StreamPlayer.cpp
047916c6e882878075e42a7a5986a6bc1b0cf489 07-Nov-2011 Glenn Kasten <gkasten@google.com> Merge "CT and spec errata for MuteSolo::GetNumChannels"
90ccf2e90fa295dd189abbf8e4f05efafbe74547 07-Nov-2011 Glenn Kasten <gkasten@google.com> Merge "Comments"
e2e8fa36bd7448b59fbcdf141e0b6d21e5401d91 29-Jul-2011 Glenn Kasten <gkasten@google.com> Comments

Change-Id: I1592d1979ce5f5811ff5a47b4b60db93e8670313
ndroid.mk
ndroid/AacBqToPcmCbRenderer.cpp
ndroid/AudioPlayer_to_android.cpp
ndroid/MediaPlayer_to_android.cpp
ndroid/android_AudioSfDecoder.cpp
ndroid/android_Effect.cpp
ndroid/android_Effect.h
ndroid/android_GenericMediaPlayer.cpp
ndroid/android_GenericPlayer.cpp
ndroid/android_GenericPlayer.h
ndroid/android_StreamPlayer.cpp
ndroid/android_StreamPlayer.h
c9a59d2a184ac461f46c3d878c6fc2574f1805f0 28-Sep-2011 Glenn Kasten <gkasten@google.com> CT and spec errata for MuteSolo::GetNumChannels

The question of what to return when channel count is unknown was dicussed
by Khronos working group. They decided to return zero channel count
and success if unknown. Both the spec errata and CT have been updated for this.

Change-Id: I820291271f83bad2142046372d9b22e4d05faf07
tf/IMuteSolo.c
7df272342694ddc96957ce0c33abb19ee1f5fd9d 07-Nov-2011 Glenn Kasten <gkasten@google.com> Merge "DataSource::getSize() returns ERROR_UNSUPPORTED"
22dfd403dbb51c8da9ade19b85e2077a724ce743 03-Nov-2011 Glenn Kasten <gkasten@google.com> Merge "Fix build errors and warnings on native"
1b775138b2b353710c66de7592a30f274c9026f6 02-Nov-2011 Jean-Michel Trivi <jmtrivi@google.com> am 762f1065: am c157a9c2: Bug 5544082 Filter out unsupported codecs in OpenSL ES

* commit '762f10659c2ac6fb66afd09be5bddd7ffebbf9df':
Bug 5544082 Filter out unsupported codecs in OpenSL ES
167a2af67dcc0d20e6e3e995a23a0567715e0ee1 07-Oct-2011 Glenn Kasten <gkasten@google.com> AudioPlayback_Parameters cleanup

Use AudioPlayback_Parameters more consistently in parameter list of
constructors. Also, StreamPlayer::StreamPlayer was over-assigning to
mPlaybackParams (already assigned by its superclass's constructor).

Move initialization of AudioPlayback_Parameters from each case
to before the switch, as it is shared by each use case.

Remove old asserts.

Change-Id: I8925d36da031c80308457c7e940418d3a4e47b62
ndroid/AacBqToPcmCbRenderer.cpp
ndroid/AudioPlayer_to_android.cpp
ndroid/android_AudioToCbRenderer.cpp
ndroid/android_AudioToCbRenderer.h
ndroid/android_GenericPlayer.h
ndroid/android_LocAVPlayer.cpp
ndroid/android_LocAVPlayer.h
ndroid/android_StreamPlayer.cpp
ndroid/android_StreamPlayer.h
ndroid/android_defs.h
ndroid/include/AacBqToPcmCbRenderer.h
39fa9db7f2b75847866c20b63efde3f6ca3a700a 02-Nov-2011 Glenn Kasten <gkasten@google.com> Merge "Finish out the StreamInformation interface"
631aa9c3c2a45b81552ad0a6b22cb3a661f97182 01-Nov-2011 Glenn Kasten <gkasten@google.com> Merge "Reverb comply with OpenSL ES 1.0.1 spec"
37a0d0ad678553af318d4d3b9ca93e2377b78a31 01-Nov-2011 Jean-Michel Trivi <jmtrivi@google.com> am c157a9c2: Bug 5544082 Filter out unsupported codecs in OpenSL ES

* commit 'c157a9c259474d4e1736c4f9ccccad10b5000734':
Bug 5544082 Filter out unsupported codecs in OpenSL ES
3597268c2bf4ff71521e3cbe522d7ee02c41f175 01-Nov-2011 Jean-Michel Trivi <jmtrivi@google.com> Bug 5544082 Filter out unsupported codecs in OpenSL ES

When decoding compressed audio data, disregard tracks
encoded with unsupported codecs.

Change-Id: If0535013990923c6859829106ccf9e92e5856f90
ndroid/android_AudioSfDecoder.cpp
ndroid/android_AudioSfDecoder.h
241b9c06493479dc632a8851097c193b724a2b41 26-Oct-2011 Andreas Huber <andih@google.com> Remove MediaPlayer::setVideoSurface legacy.

Change-Id: I95aa181f39b375087b30ac65fea37589108c9f16
ndroid/MediaPlayer_to_android.cpp
ndroid/android_GenericMediaPlayer.cpp
ndroid/android_GenericMediaPlayer.h
ndroid/android_GenericPlayer.h
ndroid/android_StreamPlayer.cpp
220b874d41bc8d105ea446d5d556fb3592de965c 28-Oct-2011 Glenn Kasten <gkasten@google.com> am 13ffc7f7: am d0b07222: Merge "Bug 5526807 inform client of errors after prepare" into ics-mr0

* commit '13ffc7f7c69e2fabf1ef70ebb2ea81489be9bd74':
Bug 5526807 inform client of errors after prepare
b6aed97f98afa0c20f5b1e854ac07ccacfcdacc6 28-Oct-2011 Glenn Kasten <gkasten@google.com> am d0b07222: Merge "Bug 5526807 inform client of errors after prepare" into ics-mr0

* commit 'd0b0722276aea9a06a118a64abfc8b3e9498e931':
Bug 5526807 inform client of errors after prepare
6e413fb8c5cde438092736e7fb58abb48e51637d 28-Oct-2011 Glenn Kasten <gkasten@google.com> Merge "Bug 5526807 inform client of errors after prepare" into ics-mr0
870299140ace824f90086664af176cb06ade4fd6 27-Oct-2011 Glenn Kasten <gkasten@google.com> am 21b2f0ce: am d7762ba2: Bug 5526272 ignore player events during destroy

* commit '21b2f0ce677aa42c34df65995eefb30e20f2c3aa':
Bug 5526272 ignore player events during destroy
d92b6a98b7ff947becfc8824cd4aa2ed12ed68b6 27-Oct-2011 Glenn Kasten <gkasten@google.com> am d7762ba2: Bug 5526272 ignore player events during destroy

* commit 'd7762ba20bc7d13e1af73539d7a2a75183e2960b':
Bug 5526272 ignore player events during destroy
5e4d65e369f28746767aba11b618dee314bb8197 27-Oct-2011 Glenn Kasten <gkasten@google.com> Bug 5526807 inform client of errors after prepare

Change-Id: Ic5c88f8e1c8e7d6226a7a71a2a89a70f0fa876f8
ndroid/AudioPlayer_to_android.cpp
ndroid/MediaPlayer_to_android.cpp
ndroid/android_GenericMediaPlayer.cpp
ndroid/android_GenericPlayer.cpp
ndroid/android_GenericPlayer.h
ndroid/android_defs.h
9d8a98601357c0669dca4de63e43196c0a70553d 27-Oct-2011 Glenn Kasten <gkasten@google.com> Bug 5526272 ignore player events during destroy

Change-Id: I45c67660c7cbfabcf66b0ffffbaedf56c17453d7
ndroid/MediaPlayer_to_android.cpp
de7c7da8460de9fb1e8739978f25e1463e2e1666 26-Oct-2011 Steve Block <steveblock@google.com> Rename LOGV(_IF) to ALOGV(_IF) DO NOT MERGE

See https://android-git.corp.google.com/g/#/c/143865

Bug: 5449033
Change-Id: I4c0e3dc9da0a0cdf9aef8be4fae7b24da876dc17
ndroid/android_AudioSfDecoder.cpp
ndroid/android_GenericPlayer.cpp
409b09b0436e0268b0025a935a42076f8274b7d7 25-Oct-2011 Ed Heyl <ed@google.com> Merge remote branch 'goog/ics-mr0' into ics-mr1
f0605e369850d13c4e5aa30b6548cdf20e3c7a56 24-Oct-2011 Glenn Kasten <gkasten@google.com> am ba6d04f5: Bug 5505856 remove incorrect setDataSource(NULL)

* commit 'ba6d04f523bf6c3c2d4ed6975109e72f328889b8':
Bug 5505856 remove incorrect setDataSource(NULL)
7c40d3b78c609b2a84acd0dd6e874ab24a73f8d7 24-Oct-2011 Glenn Kasten <gkasten@google.com> Bug 5505856 remove incorrect setDataSource(NULL)

Change-Id: Id23cbc43b56c014f5931cd1e941c12a773dba2b5
ndroid/android_GenericMediaPlayer.cpp
1fa5c3206d06bbebdea2dc92f378ce6b8a211e23 30-Sep-2011 Glenn Kasten <gkasten@google.com> Fix race in getting duration

mDuration is protected by mSettingsLock because it is accessed from both
the ALooper thread and from the application thread, but only one of the
two "set"s was using the lock, and the "get" was not using the lock.

Also added some comments about the lock, and moved lock closer inside { }.

Change-Id: I7c96186f31baaad1b941d934549cb50d4f82d0c8
ndroid/android_AudioSfDecoder.cpp
ndroid/android_GenericMediaPlayer.cpp
ndroid/android_GenericPlayer.cpp
ndroid/android_GenericPlayer.h
b5b68e8d3b4420eed7cb18cac212c28af138048e 14-Oct-2011 Glenn Kasten <gkasten@google.com> am fcdc9c4c: Merge "Improved deadlock detection logs." into ics-mr0

* commit 'fcdc9c4cc7da7044f92399b1b5c7a4ddd5fec3b4':
Improved deadlock detection logs.
0e5f0772fac49acfed60f0dcdf02e97fc5e3b5d7 14-Oct-2011 Glenn Kasten <gkasten@google.com> am 70db434d: Merge "Bug 5267571 disable callbacks earlier" into ics-mr0

* commit '70db434d0dc2a58656e792ac8cdcd9a09ee5f17a':
Bug 5267571 disable callbacks earlier
9c56ff31ba35f87294e6f44107a7815913f973bc 14-Oct-2011 Glenn Kasten <gkasten@google.com> Merge "Improved deadlock detection logs." into ics-mr0
b66dfcb9e7b944c45927314ef2282d6cc95cfa0a 14-Oct-2011 Glenn Kasten <gkasten@google.com> Bug 5267571 disable callbacks earlier

Change-Id: I0da3b85dcce93a8a250b8b225a998b80d92f436b
ndroid/MediaPlayer_to_android.cpp
7d77f0aed328363b188d2caa829bb836ba1abcc8 28-Sep-2011 Glenn Kasten <gkasten@google.com> Reverb comply with OpenSL ES 1.0.1 spec

According to OpenSL ES 1.0.1 spec, SL_RESULT_CONTROL_LOST is not
a valid result code for the "Get" APIs. They are supposed to return
SL_RESULT_SUCCESS and the last known setting. This affects ability to
run Khronos CT.

Change-Id: I8ee4c0f9ef95da2ac3d59ca1cde9b4ace32e88fe
tf/IEnvironmentalReverb.c
tf/IPresetReverb.c
887b8d1551370e592f527dcba3e76cf6916cf677 11-Sep-2011 Glenn Kasten <gkasten@google.com> Finish out the StreamInformation interface

Return SL_RESULT_FEATURE_UNSUPPORTED instead of
XA_RESULT_CONTENT_UNSUPPORTED for unsupported APIs.
First pass at implementing QueryStreamName.
Use shared not exclusive locks for read-only access
(serves as a comment only, since really the same).

Change-Id: I54c5f3456d541f4f9afa0271721e6c958eaae1d9
tf/IStreamInformation.c
0384250ce4221e4a6a16db2725e1232c71a60965 30-Sep-2011 Glenn Kasten <gkasten@google.com> More logging of media events for debugging

Do range-checking of MEDIA_BUFFERING_UPDATE parameters.

The other new logs are LOGV so disabled by default.

Don't forward empty MEDIA_SET_VIDEO_SIZE notifications, as
mediaserver seems to send these even for audio-only tracks.

Change-Id: I49063f83cec7bdfedb768b32f94735983755ebf2
ndroid/android_GenericMediaPlayer.cpp
7da229586b6c8893a1731bfe3eae7996e2ccffc6 23-Sep-2011 Glenn Kasten <gkasten@google.com> Fix build errors and warnings on native

android_audioPlayer_metadata_* APIs don't exist on non-Android.
handlers.c needs a definition for NULL.
handler_AudioPlayer_gain isn't present on non-Android.
Fix typo in declaration of ThreadPool_add.
Fix warning: unused variable len.

Change-Id: Ia7d516c2cf3a51f5a657a3aad76188041dcc6620
hreadPool.h
utogen/IID_to_MPH.c
andlers.c
tf/IMetadataExtraction.c
bjects/CMediaPlayer.c
1056f1a140470cdee12e2243d659664f479091cc 13-Oct-2011 Glenn Kasten <gkasten@google.com> Merge "Fix bugs in get decoder/encoder counts"
4ce38604afa7e4f629d568f400b0634504e60a2e 29-Jul-2011 Glenn Kasten <gkasten@google.com> Improved deadlock detection logs.

This should make it easier to debug the "object was locked by" logs.

Display tid and pthread_t of both the lock owner and the caller in the
"object was locked by" warning log about potential deadlocks.
This makes it easier to figure out what's going on with ps -t
which only shows the tid not the pthread_t.

Reduce false positives by using a generation counter to look for forward
progress, at the risk of increasing the chance of more false negatives.

Use lock with timeout to reduce chance of missing an "unlocked" window.

Change-Id: I15e158a20d7076624188110842a01c1bf2c5c8ae
ndroid.mk
tf/IObject.c
tfstruct.h
ocks.c
02581cf1ea8e4392760f370b9d64f097ea2c81f4 12-Oct-2011 Glenn Kasten <gkasten@google.com> Merge "Final revisions for NDK API level 14"
c0030ccb947c24939511020b23f37142fdc70e36 12-Oct-2011 Glenn Kasten <gkasten@google.com> Merge "Error logging in AAC"
2f8642e546ca9d53319573616aab840bf6cb2967 11-Oct-2011 Glenn Kasten <gkasten@google.com> Merge "Multithread safety and code reduction"
b4393ef4ef3edb785746c37fd7b68950e85283ae 30-Sep-2011 Glenn Kasten <gkasten@google.com> Multithread safety and code reduction

Remove unsafe GenericPlayer::getSampleRate(). getSampleRate() was not
thread-safe as it accessed a member variable updated in the looper thread
without a lock. If getSampleRate() is ever needed again, the sample rate
is available in the mPcmFormatValues array, which does have a lock.

Replace member variables mChannelMask, mChannelCount, and mSampleRateHz
by local variables for locality and performance.

Change-Id: Ibf92ed090430153d748ded4d0b835e429df47eea
ndroid/AacBqToPcmCbRenderer.cpp
ndroid/android_AudioSfDecoder.cpp
ndroid/android_AudioSfDecoder.h
ndroid/android_AudioToCbRenderer.cpp
ndroid/android_GenericMediaPlayer.cpp
ndroid/android_GenericPlayer.cpp
ndroid/android_GenericPlayer.h
12b2ad7d0dd93d5c0f66027def3d05b762103483 11-Oct-2011 Glenn Kasten <gkasten@google.com> Merge "Khronos bug 8080 GetMarkerPosition"
c3b82a293ed06001ba6d50f111608160c6065ef2 18-Sep-2011 Glenn Kasten <gkasten@google.com> Final revisions for NDK API level 14

Rename ANDROID_MIME_MP2TS to XA_ANDROID_MIME_MP2TS and
ANDROID_MIME_AACADTS to SL_ANDROID_MIME_AACADTS and make public.
ANDROID_MIME_AACADTS_ANDROID_FRAMEWORK remains private.

Change-Id: Ie2cda273b6adb2db453aad188b28e64147f9e6b0
ndroid/AudioPlayer_to_android.cpp
ndroid/android_defs.h
tf/IEngine.c
a3de08c6ee93a63643e9c6118dd66c0eb6398de1 11-Oct-2011 Glenn Kasten <gkasten@google.com> Merge "Bug 5293383 ~StreamSourceAppProxy wasn't reached"
f5d670d0bdff70564148f54132c034f454bdce61 10-Oct-2011 Glenn Kasten <gkasten@google.com> Merge "EnvironmentalReverb::SetDensity copy/paste"
f5d4ad08eb6318676651f5b026ed8ddd85d122e7 10-Oct-2011 Glenn Kasten <gkasten@google.com> Merge "AudioPlayer kEventPrepared"
58185512b8c804a072bdfe63b99dfd8bbb522205 10-Oct-2011 Glenn Kasten <gkasten@google.com> Merge "Khronos CT PresetReverb::GetPreset"
a0fa47f72f47fffb80ab2ae791739ce73de1e8f4 12-Sep-2011 Glenn Kasten <gkasten@google.com> Bug 5293383 ~StreamSourceAppProxy wasn't reached

Fix bug where StreamSourceAppProxy destructor wasn't reached,
which caused all sorts of other problems later on. To see this,
enable the logs StreamSourceAppProxy::~StreamSourceAppProxy and
StreamPlayer::~StreamPlayer. You'll see that StreamPlayer was destroyed,
but not StreamSourceAppProxy.

As StreamSourceAppProxy is child of StreamPlayer, make the reference
from StreamSourceAppProxy to StreamPlayer a weak reference in case
StreamSourceAppProxy's lifetime exceeds StreamPlayer. It is not supposed
to any more with this fix, but the wp<> provides extra safety.

StreamPlayer preDestroy no longer bypasses the preDestroy in
GenericMediaPlayer.

Do a full disconnect in GenericMediaPlayer::preDestroy.

Push decremented reference counts for strong pointer through binder
to workaround binder's "optimization".

Extra error-checking in setListener and setBuffers to verify
that mediaserver is calling them correctly.

Use mutex mLock consistently in StreamSourceAppProxy.

Add an explicit StreamSourceAppProxy::disconnect to break
a circular reference, and call it in StreamPlayer destructor.

Make methods private: receivedCmd_l and receivedBuffer_l.

Add explicit clear during preDestroy to give up references earlier.

Warning: setDataSource(NULL) is not supported by NuPlayer yet,
this depends on another change in frameworks/base, so it is
commented out for now.

Rename mPlayerPrepared to mPreparedPlayer to avoid confusion with the
enum mPlayerPrepared.

Change-Id: Ie5f554c206027d22204eb86edd15489c6281b512
ndroid/android_GenericMediaPlayer.cpp
ndroid/android_GenericMediaPlayer.h
ndroid/android_StreamPlayer.cpp
ndroid/android_StreamPlayer.h
7813fe24115f4b363a4bd952f15156d81b861cb4 10-Oct-2011 Glenn Kasten <gkasten@google.com> Merge "Bug 5406664 workaround GetPosition for decode"
209c05d9104db8b77ef0846ee8eb3b161bf44031 04-Oct-2011 Glenn Kasten <gkasten@google.com> Bug 5406664 workaround GetPosition for decode

Change-Id: I6158108a8ca192f704558caca2006bf704c80d6e
ndroid/android_AudioSfDecoder.cpp
45b349f3c585a0750417722f72224a35baaab734 30-Sep-2011 Glenn Kasten <gkasten@google.com> Khronos bug 8080 GetMarkerPosition

Play::GetMarkerPosition returns SL_RESULT_PRECONDITIONS_VIOLATED
if no marker is set. Play::SetMarkerPosition returns
SL_RESULT_PARAMETER_INVALID is parameter is SL_TIME_UNKNOWN. Similar
changes for Record, and also bring in all the recent changes from Play.
Add missing curly brackets.

Change-Id: Ibcfdcab5d4342815fe8d0fb1174053e1599aaf5d
tf/IPlay.c
tf/IRecord.c
dfc864b1f84f1d050763cf84109b9fdca4415bba 10-Oct-2011 Jean-Michel Trivi <jmtrivi@google.com> Merge "Fix bug 5374629 Can't create AudioPlayer playing from MP2TS ABQ"
e9f0847ff5df38f50b750c87898a19854e029b39 10-Oct-2011 Glenn Kasten <gkasten@google.com> Merge "Don't update prepare state more than once"
93a361e3f2d39870ce307126dc5377715feb3e16 10-Oct-2011 Glenn Kasten <gkasten@google.com> Merge "Reduce log spam from callback protectors"
6e0a69b1185405c11a88e3d7c8a8278ac93ccd54 03-Oct-2011 Glenn Kasten <gkasten@google.com> Error logging in AAC

Change-Id: Ie0b620871543b18e58964a42842d1bb9f193c235
ndroid/util/AacAdtsExtractor.cpp
4efb2aa0d563b86b3c95d418d6d61d97f51c0bbb 07-Oct-2011 Glenn Kasten <gkasten@google.com> DataSource::getSize() returns ERROR_UNSUPPORTED

Per <media/stagefright/DataSource.h>), if a DataSource doesn't know the
size, then getSize() should return error ERROR_UNSUPPORTED.

This exposed a problem in error handling for calculating duration.
The calculation for per-frame duration should still be possible, even
if we can't calculate the total duration when getSize() fails.

Change-Id: I9004e78f8453982025df601b34cc7be3a967f293
ndroid/BufferQueueSource.cpp
ndroid/util/AacAdtsExtractor.cpp
d483f834da2257a3c5084225f4456a84913943cd 28-Sep-2011 Glenn Kasten <gkasten@google.com> Fix bugs in get decoder/encoder counts

Khronos CT found this problem for
AudioDecoderCapabilities::GetAudioDecoders and
AudioEncoderCapabilities::GetAudioEncoders. These APIs are not currently
supported, but are faked out to allow the CT to proceed to other tests.

Change-Id: I5e73324c51ea37e76f621c161393df700b6155c4
tf/IAudioDecoderCapabilities.c
tf/IAudioEncoderCapabilities.c
8a9cb417dff7359e6665c76e85af01d8527ecbd2 06-Oct-2011 Glenn Kasten <gkasten@google.com> EnvironmentalReverb::SetDensity copy/paste

There was a missing assignment to the density field

Change-Id: I0dc3332da04b0d3f569625781258df560a89f3b9
tf/IEnvironmentalReverb.c
ab657fa824d329357b66ceee2b350b9049847f06 06-Oct-2011 Glenn Kasten <gkasten@google.com> Khronos CT PresetReverb::GetPreset

OpenSL ES 1.0.1 spec and conformance test do not permit result to
be SL_RESULT_CONTROL_LOST. They say that even if control is lost,
PresetReverb::GetPreset should return the last known preset value.

Change-Id: I11fa6434d35b8e32c660f13f6d96c1db5193bedf
tf/IPresetReverb.c
796eb075da9c84c5479bdd4dedd9c46c632e8e60 30-Sep-2011 Glenn Kasten <gkasten@google.com> AudioPlayer kEventPrepared

Combine execution paths for successful and unsucccessful paths of
android::GenericPlayer::kEventPrepared: for AudioPlayer to make it easier
to see the similarities and differences (and make some other changes soon).

Remove old asserts.

Change-Id: I59304d368a9b7611f2a16c1c687cf8d827526b58
ndroid/AudioPlayer_to_android.cpp
83c36078465817323d499670a409618cdc134f90 04-Oct-2011 Glenn Kasten <gkasten@google.com> Merge "Bug 5385386 missing HEADATNEWPOS"
30e81d75c9066a0ba51eadd4289131d9d4f966cf 04-Oct-2011 Glenn Kasten <gkasten@google.com> Merge "Bug 5161265 Error recovery getting video codecs"
0d1c7e2ccd98bf7e2285c3db98ea263c79b24978 04-Oct-2011 Glenn Kasten <gkasten@google.com> Don't update prepare state more than once

If a MEDIA_ERROR event is received during preparation, it indicates
that prepare has completed unsuccessfully. However, MEDIA_ERROR can
also legitimately be sent after successful prepare. In that case, don't
update the prepare state.

Similarly, in the unlikely case that MEDIA_PREPARED is received after
prepare has already completed successfully or unsuccessfully, ignore it.
This probably indicates a buggy mediaserver, but we wouldn't want that
to take down the client also.

Change-Id: I2a92e98d13b70d1aa5ff6f440ad528f6896a2ead
ndroid/android_GenericMediaPlayer.cpp
15c706b25a8b9993b5391de574ed52c1628060be 04-Oct-2011 Glenn Kasten <gkasten@google.com> Reduce log spam from callback protectors

Change-Id: I83f40370bf86878e6d8dcabfff3847cab2cbbd6c
ndroid/CallbackProtector.cpp
3e1a45eb4882ae42fb1d55cf89d94b7e30e97f2a 03-Oct-2011 Glenn Kasten <gkasten@google.com> Merge "Bug 5399251 notify on AAC decode prepare success"
4c178cd8b962c2bcd84cf8a9e9dcf066bcb2f292 01-Oct-2011 Glenn Kasten <gkasten@google.com> Merge "Remove dead code"
457b9394608d48020d156e9525354b421f8f3e08 01-Oct-2011 Glenn Kasten <gkasten@google.com> Bug 5399251 notify on AAC decode prepare success

Change-Id: I35715be7812c6fe671f74afb7a92ebe60b4a6710
ndroid/AacBqToPcmCbRenderer.cpp
779a533785a4b8d2521123bc3c0a035b93ba078d 30-Sep-2011 Jean-Michel Trivi <jmtrivi@google.com> Fix bug 5374629 Can't create AudioPlayer playing from MP2TS ABQ

An AudioPlayer playing audio coming from MP2TS data stored in an
AndroidBufferQueue couldn't be created and realized anymore due
to:
- a regression that prevented an OutputMix to be used as the
sink of an AudioPlayer that had an ABQ as a data source
- a missing update when the Realize() method became fully
locked on the object, android_audioPlayer_realize() was
still trying to lock the already locked AudioPlayer.
Both issues are covered by a CTS test.

Also verify the SLSeekItf is not required when using an ABQ
source.

Change-Id: Ibb1b753dcce59b7cf23ba118e287349e00e7fff4
ndroid/AudioPlayer_to_android.cpp
ata.c
9688e432421a656f21fa3c72f40621d5aa2ae19e 30-Sep-2011 Glenn Kasten <gkasten@google.com> Merge "Bug 5334969 MediaPlayerNotificationClient safety"
3888f4ba1b3c391104c104ce054f7ad4ec71556c 30-Sep-2011 Glenn Kasten <gkasten@google.com> Bug 5161265 Error recovery getting video codecs

Retry if mediaserver happens to be down when asking for OMX codecs.
Use IMediaDeathNotifier::getMediaPlayerService which tries a few times.

Change-Id: Ibeb69c82303f35fbc9e5948997f568e816721328
ndroid/VideoCodec_to_android.cpp
c0a40f3efef1706f861777ff68003fe344730055 28-Sep-2011 Glenn Kasten <gkasten@google.com> Remove dead code

Change-Id: Ic68d4d7b942ef99120ad30ee3ef7ce48ff1d697a
ndroid/AudioPlayer_to_android.cpp
ndroid/BufferQueueSource.cpp
ndroid/android_AudioToCbRenderer.cpp
ndroid/android_AudioToCbRenderer.h
ndroid/android_GenericMediaPlayer.cpp
a9f22e6f5f53e90daa779e38b22f88e4faa35c95 29-Sep-2011 Glenn Kasten <gkasten@google.com> Bug 5385386 missing HEADATNEWPOS

Workaround for mediaserver bug where it does not send MEDIA_SEEK_COMPLETE
to the MediaPlayerNotifier after a discontinuity is processed.

Instead, we simulate a seek complete event in this case.
A short delay is applied to compensate for shared memory latency.

A longer-term fix will be to have mediaserver send the event.

Change-Id: Id0d01b842a145fa5762d44f03144741152f7b03f
ndroid/android_GenericMediaPlayer.cpp
ndroid/android_GenericPlayer.cpp
ndroid/android_GenericPlayer.h
ndroid/android_StreamPlayer.cpp
3ac5dcc05fe321e4f01918aef2e3e54e22c9a5c1 17-Sep-2011 Glenn Kasten <gkasten@google.com> Remove dead code

AudioPlayback_Parameters fields trackcb and trackcbUser
audioTrack_callBack_uri
android_Player_androidBufferQueue_registerCallback_l
GenericPlayer field mLooperPriority
StreamPlayer::registerQueueCallback
CAudioPlayer::mpLock
AudioSfDecoder::startPrefetch_async
IAndroidBufferQueue does not support AudioRecorder object
android/BufferQueueSource.h #include

Change-Id: I9d7cef243167e10279df452e7c62e66d8f5fe3b6
ndroid/AudioPlayer_to_android.cpp
ndroid/BufferQueueSource.h
ndroid/MediaPlayer_to_android.cpp
ndroid/MediaPlayer_to_android.h
ndroid/android_AudioSfDecoder.cpp
ndroid/android_AudioSfDecoder.h
ndroid/android_GenericPlayer.cpp
ndroid/android_GenericPlayer.h
ndroid/android_StreamPlayer.cpp
ndroid/android_StreamPlayer.h
ndroid/android_defs.h
lasses.h
tf/IAndroidBufferQueue.c
tf/IEngine.c
aad45518461f3ffa9cf4839962b08877d524d06d 26-Sep-2011 Glenn Kasten <gkasten@google.com> Merge "Bug 5365486 GetVideoDecoderCapabilities"
05c7b2d09d54b9260ff7f3f5e491f38d0097c406 21-Sep-2011 Glenn Kasten <gkasten@google.com> Bug 5369977 check required interface compatibility

Use required not exposed in checkSourceSinkVsInterfacesCompatibility.

Change-Id: Ib71826b989ddef2e87dd60bec0306ca2a4021fe3
ata.c
ata.h
ntry.c
tf/IEngine.c
les.c
les_allinclusive.h
947ccd3690e84649878f2583c701ca8de1b19ed4 24-Sep-2011 Glenn Kasten <gkasten@google.com> Bug 5365486 GetVideoDecoderCapabilities

If OMX IL implementation reports a codec with 0 profile/level
combinations, it should not be an error for the application to query
the number of profile/level combinations.

Change-Id: I6838ba1168da70a5c5e7d5a2832ec3ee1ee9aef3
ndroid/VideoCodec_to_android.cpp
tf/IVideoDecoderCapabilities.cpp
d1e9fd4cff80becfef5077090fc90328ba63999a 22-Sep-2011 Glenn Kasten <gkasten@google.com> Bug 5267593 Workaround for crash at Destroy

Call IMediaPlayer->stop() from ALooper thread for now, as NuPlayerDriver
does not currently support multi-threaded clients. This fix should be
reverted after NuPlayerDriver is multi-thread safe.

Change-Id: I94dc91bdcc9f840f50c3ed831aa6e15e09a0f96e
ndroid/android_StreamPlayer.cpp
ndroid/android_StreamPlayer.h
694466442b595ad10aa90b09e6415488951f34d9 22-Sep-2011 Glenn Kasten <gkasten@google.com> Merge "Use async notify everywhere"
f4b45a37248899ae2d27bb172f8387fbf1edff8e 12-Sep-2011 Glenn Kasten <gkasten@google.com> Bug 5090073 Callback protectors

Add callback protector for decode to PCM usage cases.
Move callback protection up earlier for URI decode use case only.

Other:
Remove redundant mCallbackProtector field.
Optimization: on exit from callback protector, only broadcast if !mSafeToEnterCb,
that is if destroy has requested callback protectors to finish up.
More callback protector logging.
Add callback protector requestCbExit() [no wait], not yet used.

Unrelated:
3rd parameter of adecoder_writeToBufferQueue is always CAudioPlayer * instead of void *.

Change-Id: I57a46acf0e5ecb213540b13ca08098177ad7ad6e
ndroid/AudioPlayer_to_android.cpp
ndroid/CallbackProtector.cpp
ndroid/CallbackProtector.h
ndroid/android_AudioToCbRenderer.cpp
ndroid/android_AudioToCbRenderer.h
ndroid/android_GenericPlayer.h
ndroid/android_defs.h
22de06ce0df9144d47069c235e60c9d2b08c0fff 21-Sep-2011 Glenn Kasten <gkasten@google.com> Merge "Set mAndroidObjState to ANDROID_READY once"
bc192d2f064588e2620af1986cc85b90a3e5544e 18-Sep-2011 Glenn Kasten <gkasten@google.com> Merge "Fix typo"
074a62e815b5f08df7874afd1e9e922905c974f6 18-Sep-2011 Glenn Kasten <gkasten@google.com> Merge "Move macro definition to more appropriate place"
91ff087fb814063f9faa23ab37a61e8fe4e38f45 16-Sep-2011 Glenn Kasten <gkasten@google.com> Bug 5334969 MediaPlayerNotificationClient safety

Fixed race due to missing mutex around 2 updates to mPlayerPrepared.

MediaPlayerNotificationClient had a raw reference to GenericMediaPlayer;
if for some reason the binder thread out-lived the GenericMediaPlayer,
then it might reference a destroyed object. Made it a weak reference,
and issue warning if the GenericMediaPlayer has been destroyed.
This has similar effect as a callback protector.

Minor related:
- mHasVideo is read without mutex, safe since never changed but make it const
- GenericMediaPlayer's reference to MediaPlayerNotificationClient is now const also

Change-Id: I67b50e861a055c73fd490fb537a3d6d23d25c3d2
ndroid/android_GenericMediaPlayer.cpp
ndroid/android_GenericMediaPlayer.h
d6be802c5267a3c8599c11af2c38ead666f74a72 17-Sep-2011 Glenn Kasten <gkasten@google.com> Use async notify everywhere

We use asynchronous notify in all places except PLAYEREVENT_PREPARED.
Since there doesn't seem to be a clear reason why this should be
different, make it be the same.

Change-Id: I0a83d4ac7a7e8e16e3404a25f081176701de01ae
ndroid/android_GenericPlayer.cpp
f66b430471d691de4bf7b6bbc1a6527897f61cbd 17-Sep-2011 Glenn Kasten <gkasten@google.com> Set mAndroidObjState to ANDROID_READY once

The mAndroidObjState field should only be set to ANDROID_READY once,
after prepare completes either successfully or unsuccessfully.
Remove a couple of redundant assignments.

Change-Id: I4b73bc94aea4f8d4afc1111d7fcdccce4bf8a92d
ndroid/AudioPlayer_to_android.cpp
ndroid/MediaPlayer_to_android.cpp
7349b2e742b2cedc6d149fac62ed661ad7d47dec 15-Sep-2011 Glenn Kasten <gkasten@google.com> Bug 5263052 play events for decoder use case

This version should be more resilient to decode time vs. real time.

Miscellaneous:
- comment about GetPosition accuracy
- remove unused AudioSfDecoder::onRender implementation

Change-Id: I16a7726e0b1459ed1421fe50cb4d683d5c3bdd6b
ndroid/android_AudioSfDecoder.cpp
ndroid/android_AudioSfDecoder.h
ndroid/android_AudioToCbRenderer.cpp
ndroid/android_GenericPlayer.cpp
ndroid/android_GenericPlayer.h
377c6471dbefd6251c11d9c5633193cd57598991 12-Sep-2011 Glenn Kasten <gkasten@google.com> Fix typo

Change-Id: I673830007c2533110006e88b2c344bca3adaf448
ndroid/AacBqToPcmCbRenderer.cpp
01679db9a9318689f17b3ea4f69dbfc66a4a0583 26-Aug-2011 Glenn Kasten <gkasten@google.com> Move macro definition to more appropriate place

When sles_allinclusive.h was split up into separate files, this hunk
ended up in the wrong file. sles_allinclusive.h still needs some more
re-factoring, but that's a separate issue.

Change-Id: Iafa92c6b4d22f79b080db6ddf9078acc4296dd7b
les_allinclusive.h
race.h
7133228a478e16458b659946f2180ecddd13fda7 09-Sep-2011 Glenn Kasten <gkasten@google.com> Bug 5287555 create StreamSourceAppProxy once

Create StreamSourceAppProxy once in the StreamPlayer constructor,
rather than dynamically in StreamPlayer::registerQueueCallback.
As StreamPlayer::registerQueueCallback can be called multiple times
(or even not at all), this guarantees we always have only one
StreamSourceAppProxy that never changes.

Also fix bug where we weren't using a stream protector for AudioPlayer
with MPEG-2 TS AndroidBufferQueue data source (we weren't calling
setCallbackProtector on it).

This has some unexpected side benefits of simplifying the code:
- remove unused parameters and member variables
- mAppProxyLock not needed since the callback protector is created early
- remove GenericPlayer::setCallbackProtector
- inline android_StreamPlayer_realize_l for the use case
AUDIOPLAYER_FROM_TS_ANDROIDBUFFERQUEUE to be like MediaPlayer

Change-Id: I090c11cde9474285185481192dba2b5c01338a50
ndroid/AudioPlayer_to_android.cpp
ndroid/MediaPlayer_to_android.cpp
ndroid/android_GenericPlayer.cpp
ndroid/android_GenericPlayer.h
ndroid/android_StreamPlayer.cpp
ndroid/android_StreamPlayer.h
dac31e514613ac4d1559f6d41c3673f966a8d4ab 12-Sep-2011 Glenn Kasten <gkasten@google.com> Merge "Bug 5287473 realize locks"
4260ff7b8f65fdfe8d0176cdce66faf0a10c4b10 10-Sep-2011 Glenn Kasten <gkasten@google.com> Bug 5287473 realize locks

Realize had inconsistent and partial locking.
Now realize runs completely locked by default.

Change-Id: If453cfc0ac874f32cf5a1fcfe7795d24bd2a48d4
ndroid/AudioPlayer_to_android.cpp
tf/IObject.c
les_allinclusive.h
a07e6cd61b12a5c6ed78adaa88a08abd028f5a64 10-Sep-2011 Jean-Michel Trivi <jmtrivi@google.com> Bug 5236913 Update sample app for PLAYEVENT_HEADATEND with MP2TS

Update the sample application to receive the PLAYEVENT_HEADATEND
event after EOS has been processed.
Remove dead code in the corresponding implementation (in class
StreamPlayer).

Change-Id: Ibe484a8c0e9605c05cd47b154d6c0aff1e70d49e
ndroid/android_StreamPlayer.cpp
6bc8af4e67051af7c86c311cb9c50e294e547500 09-Sep-2011 Jean-Michel Trivi <jmtrivi@google.com> Bug 5236913 Callback for MP2TS when EOS was processed

When the buffer containing the EOS item in the Android Buffer Queue
gets processed, make sure the application callback gets called.

Change-Id: I7476a908419ec99c52c3d3f3938de3f86ab926c6
ndroid/android_StreamPlayer.cpp
f8b4af60627f6bda2934ab3cdb8460c833e90417 09-Sep-2011 Jean-Michel Trivi <jmtrivi@google.com> Merge "Fix bug 5236913 EOS causes HEADATEND event in play callback"
d93a9cb6509ad540125e2aa7f49638b95ec361ee 09-Sep-2011 Jean-Michel Trivi <jmtrivi@google.com> Merge "Bug 5236913 Callback for AAC decode when EOS was processed"
113a9f14ea680a441540436b342f5008605aba27 09-Sep-2011 Jean-Michel Trivi <jmtrivi@google.com> Fix bug 5236913 EOS causes HEADATEND event in play callback

In AAC decode through an Android Buffer Queue, after receiving
an EOS command, prevent reading from the queue by returning
a size of 0, which causes the decoder to signal an end of
stream. This will cause the SL_PLAYEVENT_HEADATEND to be
fired (from the same thread that sends the decoded data)
if the event was part of the play event mask, and a callback
had been registered.

Change-Id: I435e8a66dbe9bc37f24c9e1f1c13f0dbd670b395
ndroid/BufferQueueSource.cpp
ndroid/BufferQueueSource.h
ndroid/util/AacAdtsExtractor.cpp
145156a92c1d379e494cb69920d49b87f9c0e300 09-Sep-2011 Glenn Kasten <gkasten@google.com> Bug 5280072 decode AAC ADTS fails for CRC content

Also copy in the length check from Stagefright.

Change-Id: I6758dbe370dd3a7178061183bbb83d289e5c00c5
ndroid/AacBqToPcmCbRenderer.cpp
ndroid/util/AacAdtsExtractor.cpp
5760ef34bd7f50060fd8fbda10e359f8a830bfbc 09-Sep-2011 Jean-Michel Trivi <jmtrivi@google.com> Bug 5236913 Callback for AAC decode when EOS was processed

When the buffer containing the EOS item in the Android Buffer Queue
gets processed, make sure the application callback gets called.

Change-Id: I0c8dfb61404ea33322a5755afa7c44213e53ce02
ndroid/BufferQueueSource.cpp
251f90a1a07a721e873a5bfbee96a11cfc33b200 07-Sep-2011 Jean-Michel Trivi <jmtrivi@google.com> Merge "Fix 5249076 Don't let the shared memory buffer drain"
d9193f90228723898127d6a21b1404c222a479a3 07-Sep-2011 Glenn Kasten <gkasten@google.com> Merge "Bug 5262776 reliability of play event callbacks"
bc0e642e6c1a51b3ae3a02d490d94b03e718e6b5 02-Sep-2011 Jean-Michel Trivi <jmtrivi@google.com> Fix 5249076 Don't let the shared memory buffer drain

Whenever pushing data to the shared memory from the
AndroidBufferQueue, post a message to do the same operation
again if there is still room in the shared memory. This
ensures the consumption of data will keep the
shared memory buffer full, not the notification of space
available in shared memory, which may happen while the
Android Buffer Queue is empty (after a clear() for
instance).

Change-Id: I397d70ebb927fa6a1d0fb97321a70db0440b96fe
ndroid/AudioPlayer_to_android.cpp
ndroid/MediaPlayer_to_android.cpp
ndroid/android_StreamPlayer.cpp
ndroid/android_StreamPlayer.h
ddaf8fec2c6362785f8f27e59e30bf6bfe858f3b 03-Sep-2011 Glenn Kasten <gkasten@google.com> Bug 5262776 reliability of play event callbacks

This makes HEADMOVING and HEADATMARKER work more reliably, especially
at the beginning of track and under heavy load. Previously if an event
update was missed because update period is too small or mediaserver/client
is too busy to keep up with notifications, then subsequent events
were lost. This happened more than you might expect; the first event
was often lost and things just got worse from there.

Cleanup in AudioSfDecoder:
- Call up to superclass (GenericPlayer) onSeek and onLoop
to make future maintenance easier.
- Delete dead code in onMessageReceived.
- Logic depends on mLastDecodedPositionUs not being ANDROID_UNKNOWN_TIME
- Simplify getPositionUsec

Add more logging in GenericPlayer::updateOneShot.

Change-Id: Iacddafeb3a20b25bee6da602f6a783201d80be10
ndroid/android_AudioSfDecoder.cpp
ndroid/android_GenericPlayer.cpp
0f92f48017588949daf7d24a339423e149bb2555 01-Sep-2011 Glenn Kasten <gkasten@google.com> Bug 5244675 PCM sample rate metadata units

The current metadata key macro name ANDROID_KEY_INDEX_PCMFORMAT_SAMPLESPERSEC
is confusing. This change renames it to ANDROID_KEY_INDEX_PCMFORMAT_SAMPLERATE,
and documents that it is in Hz rather than milliHz. The key string is
renamed from AndroidPcmFormatSamplesPerSec to AndroidPcmFormatSampleRate.

Details:

OpenSL ES 1.0.1 PCM struct SLDataFormat_PCM field samplesPerSec
[sic] is in milliHz. OpenSL ES 1.1 preserves that struct, but adds
struct SLDataFormat_PCM with field sampleRate also in milliHz. If the
ANDROID_KEY_INDEX_PCMFORMAT_* metadata keys were intended to exactly
model the OpenSL ES PCM data format struct, the metadata sample rate
would also be in milliHz units. However, the rest of Android operates
in Hz so we use Hz here also.

Backwards compatibility for the name should not be an issue,
as the initial beta developer has not yet started using this metadata.

Related change: delete a duplicate header file.

Change-Id: Ib8f620dfe7a328f621ddbb19f55e5691eb22d7b5
ndroid/AacBqToPcmCbRenderer.cpp
ndroid/OpenSLES_AndroidMetadata.h
ndroid/android_AudioSfDecoder.cpp
ndroid/android_AudioSfDecoder.h
d6cd4e9b5c7a02ffa27096b530db5bb9f8a6ecc4 02-Sep-2011 Glenn Kasten <gkasten@google.com> Merge "Bug 5244675 default channel mask based on count"
c93cf30bdf4b91a9695ee78a4d78fe151e72ff4b 02-Sep-2011 Glenn Kasten <gkasten@google.com> Merge "MediaPlayer GetPosition returns 0 before prefetch"
e52e877354b1477d5cb34d24c70417820b013521 01-Sep-2011 Dave Burke <daveburke@google.com> Require INTERNET permission for network-based content.
Bug #1870981

Change-Id: Ia7b9b75feb5b43fe9358bbbca6b619112984246c
ndroid/android_LocAVPlayer.cpp
ndroid/android_StreamPlayer.cpp
20d9a1229c7647dd2c6f1bece715080ec6202eca 31-Aug-2011 Glenn Kasten <gkasten@google.com> Bug 5244675 default channel mask based on count

Change-Id: Ica0b1bd5a23d9bbc318003509e2463a588d9bd39
ndroid/AacBqToPcmCbRenderer.cpp
ndroid/android_AudioSfDecoder.cpp
ndroid/android_AudioSfDecoder.h
ndroid/android_sles_conversions.h
ata.c
136965c92c625d52a6cbad42f82a2091d7769c9c 02-Sep-2011 Glenn Kasten <gkasten@google.com> MediaPlayer GetPosition returns 0 before prefetch

This makes MediaPlayer work the same way as AudioPlayer,
to return current position as zero before prefetch started.

Change-Id: I538919d05074002d46c3dc1632caa4d5a85e8fad
ndroid/MediaPlayer_to_android.cpp
98effed0f11095eadc14cf3aec121d2d78c6e74b 02-Sep-2011 Jean-Michel Trivi <jmtrivi@google.com> Merge "Bug 5249076 When starting to stream, have at least one buffer in shared mem"
f40b3718588c201794e9201d07671f5e293533eb 02-Sep-2011 Glenn Kasten <gkasten@google.com> Merge "Rename Android buffer queue GUID for future sink"
53445ae321e15496dca8f26398766b39a4c18b56 02-Sep-2011 Glenn Kasten <gkasten@google.com> Merge "Bug 5244675 handle the switch cases of AAC decode"
b712aebe63a6c50cc01f4493282fc77578242976 02-Sep-2011 Jean-Michel Trivi <jmtrivi@google.com> Bug 5249076 When starting to stream, have at least one buffer in shared mem

StreamPlayer is receiving notifications from the MediaPlayer that
a buffer in shared memory is available during playback, which
causes StreamPlayer to consume data from the AndroidBufferQueue.
If the shared memory is drained while the player is paused, there
will be no new notification of a buffer in shared memory being
available to start the cycle of consumption from the Android
buffer queue.
This change causes StreamPlayer to consume from the buffer queue
to fill one buffer in shared memory.
A subsequent change will change the logic to make sure the
consumption from the buffer queue fills as much of the shared
memory as possible.

Change-Id: I886832629dd5ef449719b77899ebdcc7ffc64330
ndroid/android_StreamPlayer.cpp
ndroid/android_StreamPlayer.h
57ec2b5fbd0c7c08f068e1f7b9d7644b0932617b 29-Aug-2011 Glenn Kasten <gkasten@google.com> Check callback result code and warn if non-success

The result code is currently unused, but reserved for future use.
This change will help make sure that developers do the right thing now,
so that they will not be impacted when we begin to act on the result.

Change-Id: I8c712882d41d09506defa77340676079bb34de6c
ndroid/BufferQueueSource.cpp
ndroid/android_StreamPlayer.cpp
60ca9f9ef02f6e486c3338cb811f603dd7825c05 29-Aug-2011 Glenn Kasten <gkasten@google.com> Rename Android buffer queue GUID for future sink

This change will make it easier to have Android buffer queue as a sink in
the future. For backwards source code compatibility with beta developers,
retain the old name temporarily. As soon as they have switched to the
new name, we will remove the old name.

Details:
- rename XA_IID_ANDROIDBUFFERQUEUE to XA_IID_ANDROIDBUFFERQUEUESOURCE
- rename SL_IID_ANDROIDBUFFERQUEUE to SL_IID_ANDROIDBUFFERQUEUESOURCE
- rename MPH_ANDROIDBUFFERQUEUE to MPH_ANDROIDBUFFERQUEUESOURCE
- did not rename the data locators and interface struct,
as they can be shared across both source and sink
- did not rename the member field mAndroidBufferQueue in
CAudioPlayer / CMediaPlayer as that would be a huge change;
can do that later if necessary
- the SINK definition will be added later when needed

Change-Id: I36dc01050efb99d4d7802b2ca2b870f4d978ee21
PH.h
PH_to.c
penSLES_IID.c
utogen/IID_to_MPH.c
lasses.c
nterfaces.c
l_iid.c
les.c
a_iid.c
f5ff1a75f55677163bd9a8bd804e8f5c33ef592c 30-Aug-2011 Glenn Kasten <gkasten@google.com> Bug 5244675 handle the switch cases of AAC decode

Fix handling of AUDIOPLAYER_FROM_ADTS_ABQ_TO_PCM_BUFFERQUEUE decode use case:
- Play::GetPosition: explicitly list decode case and return media
player time; previously returned zero.
- Seek::SetLoop for AudioPlayer or MediaPlayer: return
SL_RESULT_FEATURE_UNSUPPORTED on non-URI data source. This is
correctly passed up to app.

The remaining have no immediate impact, but should make future maintenance easier:
- Play::GetDuration: explicitly list decode case and return unknown time;
no impact as already covered by default.
- Seek::SetPosition: explicitly list decode case and handle as no-op; no
impact as already covered by default.
- Seek::SetPosition for AudioPlayer or MediaPlayer: return
SL_RESULT_FEATURE_UNSUPPORTED with unsupported data source e.g. buffer
queue. No impact as the result is currently ignored, but added a
FIXME to pass this up to app.
- AndroidBufferQueue::Clear: explicitly list decode case as a no-op
other than the partial clear of upper layer queue.
- AndroidBufferQueue::onRefilled: explicitly list decode case as
a no-op, but with a FIXME that this may need more work later.

Change-Id: I53c8a0b736f32cd265ee9c94a70127d4f80869b5
ndroid/AudioPlayer_to_android.cpp
ndroid/AudioPlayer_to_android.h
ndroid/MediaPlayer_to_android.cpp
andler_bodies.c
tf/ISeek.c
027fc8e9695b7567149a6f151d4322de63f6c085 31-Aug-2011 Glenn Kasten <gkasten@google.com> Merge "Bug 5217144 AndroidBufferQueue::Enqueue error chks"
677c76347d9aaca4cf3746b3dbfc8a741281066b 24-Aug-2011 Glenn Kasten <gkasten@google.com> Bug 5217144 AndroidBufferQueue::Enqueue error chks

Add more error checks to Enqueue:
- check for a NULL data pointer with non-zero data size
- check for a NULL item array with non-zero item array size

For the Enqueue item processing:
- examine all items if there is more than one in the array
- check for invalid combinations of items
- check that total length of item array is large enough for each
item's header and any optional data
- check for an EOS with a non-empty item data
- log if an unknown item key is found
- added the EOS item handling code for AAC ADTS
(the underlying implementation is still not yet done).

Fix copy/paste typo in initializeAndroidBufferQueueMembers.

AacBqToPcmCbRenderer::validateBufferStartEndOnFrameBoundaries:
- now returns a more specific result code rather than bool
- readAt return type ssize_t not size_t
- readAt return 0 (EOS) is a LOGV not LOGE.

Fix race in Android buffer queue callback: replaced logic in
BufferQueueSource.cpp by safer code from android_StreamPlayer.cpp

Change-Id: I423ccbd6d76a736a486b49b5dfdb7898b52cdd02
ndroid/AacBqToPcmCbRenderer.cpp
ndroid/android_StreamPlayer.cpp
ndroid/include/AacBqToPcmCbRenderer.h
ndroid/util/AacAdtsExtractor.cpp
tf/IAndroidBufferQueue.c
tf/IEngine.c
91540f92d7f1bcda423859af6bd82df083c2afab 28-Aug-2011 Glenn Kasten <gkasten@google.com> Bug 5226085 miscellaneous metadata issues

The metadata keys are now exposed for AAC decode.

The metadata keys are now exposed at Realize. The keys were previously
only available after prefetching was complete. This made it more awkward
for an application to use them.

Fixed race condition in access to metadata values.

Change-Id: I3daed2da61f5ed0add6948f1558963cfe66795fc
ndroid/AudioPlayer_to_android.cpp
ndroid/android_AudioSfDecoder.cpp
ndroid/android_AudioSfDecoder.h
d1df50751f8b112de78970c71f56fcd2edcb81c4 26-Aug-2011 Jean-Michel Trivi <jmtrivi@google.com> Merge "Metadata keys for PCM decoding"
68c8a1b6deea46eeca57848768a92e96d583aadd 25-Aug-2011 Jean-Michel Trivi <jmtrivi@google.com> Metadata keys for PCM decoding

Declare in a public header the metadata keys an application which
decodes audio data would use to figure out the output PCM format.

Make the SL ES Android header also include the configuration and
metadata headers.
Update test apps to reflect this.

Change-Id: I298db4fdb800df2d48047691441aa7489aad4822
ndroid/android_defs.h
les_allinclusive.h
485a038f9f0f898227b8ab4218e94c5d56b6ed0b 24-Aug-2011 Glenn Kasten <gkasten@google.com> Bug 5193695 Fix crash after MediaPlayer destroyed

The StreamSource callback thread was continuing to run after the
MediaPlayer object was destroyed. Fixed by adding a callback protector
and a pre-destroy hook. GenericMediaPlayer::preDestroy now also
calls MediaPlayer::stop just in case.

Change-Id: I5bd771d4d1936f433d2a8c9959593782c96daed9
Miscellaneous:
- added an explicit destructor on CMediaPlayer::mAVPlayer for consistency
(probably not a bug since there was a clear on it earlier)
- updated comments for CallbackProtector
- made some CallbackProtector fields private since no sub-classes yet
ndroid/CallbackProtector.cpp
ndroid/CallbackProtector.h
ndroid/MediaPlayer_to_android.cpp
ndroid/MediaPlayer_to_android.h
ndroid/android_GenericMediaPlayer.cpp
ndroid/android_GenericPlayer.cpp
ndroid/android_GenericPlayer.h
ndroid/android_StreamPlayer.cpp
ndroid/android_StreamPlayer.h
lasses.h
tf/IEngine.c
bjects/CMediaPlayer.c
86cc74ab4534c4e4dc79a7cfda83815d7c95beb5 24-Aug-2011 Glenn Kasten <gkasten@google.com> Merge "Bug 5153313 keep compatibility of local files URI"
833251ab9e5e59a6ea5ac325122cf3abdf7cd944 11-Aug-2011 Glenn Kasten <gkasten@google.com> Bug 5153313 keep compatibility of local files URI

Also fix a bug in decode from fd to PCM buffer queue, where
we were closing the application's fd.

Change-Id: I220cd1c242f2f5e240b4dd1b9e8d79c88878bdcd
ndroid/AudioPlayer_to_android.cpp
ndroid/android_AudioSfDecoder.cpp
ndroid/android_GenericMediaPlayer.cpp
ndroid/android_GenericMediaPlayer.h
ndroid/android_GenericPlayer.cpp
ndroid/android_GenericPlayer.h
ndroid/android_LocAVPlayer.cpp
ndroid/android_defs.h
dd177e2d3923d4653eaa4226f07b89a999907970 02-Aug-2011 Glenn Kasten <gkasten@google.com> Bug 5105712 synchronous callbacks

After GetPosition is made synchronous, it is safer to make client
callbacks synchronous also.

Change-Id: I2688f709ed672aaa62d046d5f95db1b81504c9e3
hreadPool.h
ndroid/AudioPlayer_to_android.cpp
ndroid/MediaPlayer_to_android.cpp
8478d83d1e42e2b4e252cc7e7135fd872bb36982 24-Aug-2011 Glenn Kasten <gkasten@google.com> Merge "Bug 5198051 MediaPlayer prefetch status interface"
ba3b6e7f9f95bd79094e897173b44edce4181d39 24-Aug-2011 Glenn Kasten <gkasten@google.com> Merge "Assertion checks do LOGF not fprintf to stderr"
d35a79e84406f855c4541b129106e8a3ce33abc6 24-Aug-2011 Glenn Kasten <gkasten@google.com> Merge "Bug 5198051 MediaPlayer StreamInformation various"
5b70990dc007841602ee23b7dfeb7a8647e280dc 24-Aug-2011 Glenn Kasten <gkasten@google.com> Merge "Bug 5198051 Video sink on MediaPlayer is optional"
4b9966d5e0569707f23ab2b22e584f7117adc179 24-Aug-2011 Glenn Kasten <gkasten@google.com> Merge "Bug 5198051 MediaPlayer PLAYEVENT_HEAD* callbacks"
5cd605f62b687b22ff44a9de096b5f297eed74af 24-Aug-2011 Glenn Kasten <gkasten@google.com> Assertion checks do LOGF not fprintf to stderr

Also add comments to Android.mk, and add SL_LOGF not yet used.

Change-Id: I1e051c040b667e2e70b6df0c03648c309efef7d6
ndroid.mk
ssert.c
llog.h
c623c89c0a32c5fc77c998f1742d58e7be69e8c1 22-Aug-2011 Glenn Kasten <gkasten@google.com> Bug 5198051 MediaPlayer prefetch status interface

Change-Id: I426c870f803df0a7052f17be955ba797a814b4cc
PH_to.c
ndroid/AudioPlayer_to_android.cpp
ndroid/MediaPlayer_to_android.cpp
utogen/MPH_to_MediaPlayer.h
lasses.c
lasses.h
les.c
2bb3547351a40ad394b09babec4d2fcc233bfe2e 22-Aug-2011 Glenn Kasten <gkasten@google.com> Bug 5198051 Video sink on MediaPlayer is optional

Change-Id: I2c78508fa1efac765ff5812c22e3a4c2cfc33b73
tf/IEngine.c
bcfe680db1e392f3bb29382c2e15e89c3af783ed 22-Aug-2011 Glenn Kasten <gkasten@google.com> Bug 5198051 MediaPlayer PLAYEVENT_HEAD* callbacks

Change-Id: Ibb04fbf727997281bb77fd22c51cd90bd044e505
ndroid/AudioPlayer_to_android.cpp
ndroid/AudioPlayer_to_android.h
ndroid/AudioRecorder_to_android.cpp
ndroid/AudioRecorder_to_android.h
ndroid/MediaPlayer_to_android.cpp
ndroid/MediaPlayer_to_android.h
andler_bodies.c
andlers.h
cfc58893afb25621c08372e35d7ee9e69cf37656 23-Aug-2011 Glenn Kasten <gkasten@google.com> Merge "Bug 5198051 MediaPlayer play state PAUSED at end"
cb441acdda6f8e81d44fcdaadd4ff7ab3d3e367b 21-Aug-2011 Glenn Kasten <gkasten@google.com> Bug 5198051 MediaPlayer StreamInformation various

Fix uninitialized field frameRate.

QueryMediaContainerInformation returns XA_RESULT_PARAMETER_INVALID if
info is NULL, otherwise it copies the information via the info pointer,
and returns XA_RESULT_SUCCESS.

QueryStreamName returns XA_RESULT_FEATURE_UNSUPPORTED.

Simplify RegisterStreamChangeCallback.

Change-Id: I261ac0c053be0de7bac5fc80661b979f7f9c84b6
ndroid/MediaPlayer_to_android.cpp
tf/IStreamInformation.c
3d332ff421e7179c36fb652771cc8ded53383729 22-Aug-2011 Glenn Kasten <gkasten@google.com> Bug 5198051 MediaPlayer support GetDuration

Change-Id: I09d9292685d82b88cddd243e6e7f5410ffaa2248
ndroid/MediaPlayer_to_android.cpp
tf/IPlay.c
e37c62f0691f9a137afae60f9d6dbd1a65d36aed 22-Aug-2011 Glenn Kasten <gkasten@google.com> Bug 5198051 MediaPlayer play state PAUSED at end

Change-Id: I9160336a9e74b2f2f501cb94d1f24047b2979b76
ndroid/MediaPlayer_to_android.cpp
1dd88ecd2b70dcface5ba4190dec4226a7a53b84 21-Aug-2011 Glenn Kasten <gkasten@google.com> Merge "8-bit now works"
b238f3ed65f3fa2a3adad602a438fbc98b13cba3 19-Aug-2011 Glenn Kasten <gkasten@google.com> Merge "Bug 5126938 dependency for video sinks"
1452b38f9f4a8a0d76c936c393c794f3995526b6 12-Aug-2011 Glenn Kasten <gkasten@google.com> 8-bit now works

Change-Id: I70ce7e10f0b465250b9f4d7644d21f5c4b4c99fa
ndroid/AudioPlayer_to_android.cpp
6a98dda78256c053fcd8bddc76ac5218f4313c03 18-Aug-2011 Glenn Kasten <gkasten@google.com> Merge "Bug 5159291 lock safety"
749e8abe47a0ded499e580e256ef6ab3cb4bdf67 18-Aug-2011 Glenn Kasten <gkasten@google.com> Merge "Bug 5161265 Recover from mediaserver process crash"
ccabcf9073f0ccd12016ff1f05d1c4456c41b254 16-Aug-2011 Eric Laurent <elaurent@google.com> Merge "Bug 5147281 prefetch status deadlocks"
e3f648ad6e3634680452b639ee802c657fbfa73d 14-Aug-2011 Jean-Michel Trivi <jmtrivi@google.com> Merge "AAC buffer decode to PCM buffer queue"
85edd878a30caa535b0267d8d6e61b4ccc0d5fd0 13-Aug-2011 Glenn Kasten <gkasten@google.com> Bug 5161265 Recover from mediaserver process crash

Use the utility method IMediaDeathNotifier::getMediaPlayerService()
to get a reference to media player service. It retries after errors,
and keeps a single global per-process reference to the service rather
than one per object. If we still can't contact the media player service
after retries, handle it like an unsuccessful prepare.

Miscellaneous:
- Remove unused field Parcel metadatafilter

Change-Id: I451a64bd76b4a7f157774abe967448ec081f1014
ndroid/android_GenericMediaPlayer.cpp
ndroid/android_GenericMediaPlayer.h
ndroid/android_GenericPlayer.cpp
ndroid/android_GenericPlayer.h
ndroid/android_LocAVPlayer.cpp
ndroid/android_StreamPlayer.cpp
b566926611b2105a46c4ff98238ad06aca54104d 12-Aug-2011 Glenn Kasten <gkasten@google.com> Bug 5159291 lock safety

Change-Id: I56f5fd038d63d033954d794168df4cbcdade26f3
tf/IAndroidBufferQueue.c
tf/IAndroidEffectCapabilities.c
tf/IAndroidEffectSend.c
tf/IEnvironmentalReverb.c
tf/IObject.c
tf/IPresetReverb.c
tf/IRecord.c
tf/IVolume.c
a60dbf554549d10780f473b6e1373aa07aec3a28 11-Aug-2011 Glenn Kasten <gkasten@google.com> Bug 5147281 prefetch status deadlocks

Fixed two deadlocks related to AudioTrack prefetch event callbacks:
- if PrefetchStatus interface was initialized on an AudioPlayer,
there was a deadlock at the point where it checked whether to do a callback
- prefetch status callbacks are now called with the object unlocked,
so they are permitted to do APIs on the object

Miscellaneous fixes:
- SMP-safe locks for GetPrefetchStatus, GetFillLevel,
GetCallbackEventsMask, SetFillUpdatePeriod, GetFillUpdatePeriod
- SetCallbackEventsMask error handling for invalid bitmask
- Enqueue sets prefetch fill level to 1000

Change-Id: Ic8b2c440aeb4efa3446a4a73d3422d934ceb0578
ndroid/AudioPlayer_to_android.cpp
lasses.h
tf/IPrefetchStatus.c
tfstruct.h
ocks.c
les_allinclusive.h
bb832e853d4afb11b0a3287b2eb0cad87696d631 27-Jul-2011 Jean-Michel Trivi <jmtrivi@google.com> AAC buffer decode to PCM buffer queue

Implement AAC ADTS decode with buffers of compressed data being
passed to the framework through an AndroidBufferQueue, and
decoded PCM buffers being passed to the application through
a BufferQueue (just like existing decode from URI/FD).

Change-Id: Id992a44a5ca7e404088b929f2b0afe9ca1f85223
ndroid.mk
ndroid/AacBqToPcmCbRenderer.cpp
ndroid/AudioPlayer_to_android.cpp
ndroid/AudioPlayer_to_android.h
ndroid/BufferQueueSource.cpp
ndroid/BufferQueueSource.h
ndroid/android_AudioSfDecoder.cpp
ndroid/android_AudioSfDecoder.h
ndroid/android_AudioToCbRenderer.h
ndroid/android_defs.h
ndroid/include/AacAdtsExtractor.h
ndroid/include/AacBqToPcmCbRenderer.h
ndroid/util/AacAdtsExtractor.cpp
ata.c
tf/IAndroidBufferQueue.c
tf/IEngine.c
les_allinclusive.h
35ac702ee1ad91e5c8748c12450222d50b366a52 08-Aug-2011 Glenn Kasten <gkasten@google.com> Bug 5126938 dependency for video sinks

Fixing bug 5126938 will involve configuring the video sink in two places:
at the initial data locator when creating the MediaPlayer object, and
then later in the IAndroidConfiguration interface. This CL is preparation
for that.

Details:
- Abstract out common code into android_Player_setNativeWindow.
- Move the code for checking and initializing the video sink from an
#ifdef ANDROID in the CMediaPlayer_Realize portable code to into
platform-specific android_Player_realize.
- Only set one of mSurface or mSurfaceTexture to non-NULL.
- For methods which can't fail, replace the SLresult return value by void.

Change-Id: Iec8fd91e1a6de45eb64241b35e3f7d7faf63d727
ndroid/MediaPlayer_to_android.cpp
ndroid/MediaPlayer_to_android.h
ndroid/android_GenericMediaPlayer.cpp
ndroid/android_GenericMediaPlayer.h
ndroid/android_GenericPlayer.h
bjects/CMediaPlayer.c
106a99988093bd3b3b3aafb2da0fbc0d35634787 09-Aug-2011 Jean-Michel Trivi <jmtrivi@google.com> Initialize video decoder capabilities fields even when unknown

We only support the discovery of codecId, profile and level when
using the VideoDecoderCapabilities interface. The other fields
in the XAVideoCodecDescriptor structure need to be initialized
even if they're not filled.

Change-Id: I8833437b3b23748a50076b65baf5b9a250290b86
ndroid/VideoCodec_to_android.cpp
f093dcf23cb5f54ced676c03a64cc68a165266f4 09-Aug-2011 Glenn Kasten <gkasten@google.com> Merge "Bug 5126938 dependency and miscellaneous bug fixes"
70045723775b56440b4e10d948831a2190d2d264 09-Aug-2011 Glenn Kasten <gkasten@google.com> Merge "Bug 4603165 playback rate change"
c2a325746469c4c7625ec78a169b65a11dbe1e30 08-Aug-2011 Glenn Kasten <gkasten@google.com> Bug 5126938 dependency and miscellaneous bug fixes

Fixing bug 5126938 will involve adding the IAndroidConfiguration interface
to CMediaPlayer object. In the process of doing this, I found a few
miscellaneous bugs in the error handling for IAndroidConfiguration. This
CL fixes those bugs, and prepares for adding the interface CMediaPlayer
by making it easier to support new objects with the interface.

Details:

- Generic error handling:
Move some error checks from the object-specific code into the generic
IAndroidConfiguration.c.
Fix bug in SetConfiguration and GetConfiguration where we were not
checking configKey for NULL
Return SL_RESULT_FEATURE_UNSUPPORTED instead of
SL_RESULT_PARAMETER_INVALID if IAConfig interface is exposed on
an object which doesn't really support it (this could if the classes.c
interfaces table was updated before the cases were updated).
Compare with IMuteSolo for non-AudioPlayer.

- Object-specific error handling:
Fix bug where we weren't returning the actual value size in
audioPlayer_getConfig when pValueSize was non-NULL and pConfigValue
was NULL.
Return result SL_RESULT_BUFFER_INSUFFICIENT instead of
SL_RESULT_PARAMETER_INVALID when output buffer is specified
as non-NULL but available space is too small. Compare with
IAudioIODeviceCapabilities.
Return result SL_RESULT_SUCCESS instead of SL_RESULT_PARAMETER_INVALID
when output buffer is specified as NULL; this is intended to allow
the application to discover the required space. Compare with
IAudioIODeviceCapabilities.

- Use 'switch' instead of 'if' for checking object types, to improve
readability when adding more object types

Change-Id: I8b2cdd506a36bfa9b1326a8a9966a6633bbbba6d
ndroid/AudioPlayer_to_android.cpp
ndroid/AudioRecorder_to_android.cpp
tf/IAndroidConfiguration.c
1b65b2054448050ded9e1475df7b755421a1e2da 05-Aug-2011 Glenn Kasten <gkasten@google.com> Merge "Bug 5903270 play interface, events, markers, etc."
659e0e44952e06ac36501c9d3df860005410d7ab 04-Aug-2011 Glenn Kasten <gkasten@google.com> Merge "Bug 5110581 SL_PLAYEVENT_HEADATEND while looping"
6d78c9bfb68f8a0db1855bc28c087c39a7eb6f2c 04-Aug-2011 Glenn Kasten <gkasten@google.com> Bug 4603165 playback rate change

Non-trivial implementation is only for AudioTrack with rate range 500
to 2000 per mille and property SL_RATEPROP_NOPITCHCORAUDIO; for Android
MediaPlayer the rate range is 1000 to 1000 per mille.

Details:
- no multi-range
- fix SMP races in GetRate, SetPropertyConstraints, GetProperties
- SetRate only updates mRate if successful
- Rate_SetPropertyConstraints only updates mProperties if successful
- return SL_RESULT_FEATURE_UNSUPPORTED for non-AudioPlayers
which have this interface (currently only MidiPlayer)
- for Android, atomically set playback rate and constraints
and simplify to use hard-coded constraints rather than querying
- per the spec, SetPropertyConstraints now returns
SL_RESULT_PARAMETER_INVALID if the constraints are out of range,
or SL_RESULT_FEATURE_UNSUPPORTED if the constraints are in range but
not supported by this implementation

Change-Id: I051ff92b20f3845ffa12bccec778937d42823e5d
ndroid/AudioPlayer_to_android.cpp
ndroid/AudioPlayer_to_android.h
tf/IPlaybackRate.c
tfstruct.h
5933f3d5e532aaac31ce0e6551c59f0197c0ae3c 29-Jul-2011 Glenn Kasten <gkasten@google.com> Bug 5903270 play interface, events, markers, etc.

As the media framework does not directly support marker and periodic
callbacks, we use a retriggerable one-shot timer at application level
to emulate this. This has the advantage of being faster, but is also
less accurate than if it were in the framework.

Details:
- Get position is now synchronous and (mostly) lock-free
- Fix regression in SL_PLAYEVENT_HEADATMARKER and SL_PLAYEVENTHEADATNEWPOS
- Fix SMP races in GetPlayState, GetCallbackEventsMask, GetMarkerPosition,
GetPositionUpdatePeriod
- AudioSfDecoder was not updating mPositionMsec when getPositionUsec failed
- Updating attributes is relatively expensive, so only do it when a significant change
in SetMarkerPosition, ClearMarkerPosition, SetPositionUpdatePeriod
- Error on unknown message type in onMessageReceived
- Delete an obsolete FIXME
- "Clearing" a marker is now equivalent to disabling the marker event,
and the default marker position is cleared.
- use Android time units and types (int32_t, ANDROID_UNKNOWN_TIME, etc.) where appropriate
instead of SLmillisecond and SL_TIME_UNKNOWN

Change-Id: Ib78bafa20d883b8d927364769663837389b6ea1d
ndroid/AudioPlayer_to_android.cpp
ndroid/android_AudioSfDecoder.cpp
ndroid/android_GenericMediaPlayer.cpp
ndroid/android_GenericMediaPlayer.h
ndroid/android_GenericPlayer.cpp
ndroid/android_GenericPlayer.h
ndroid/android_defs.h
ttr.h
andler_bodies.c
tf/IPlay.c
f6445d330c05ccc57d1adcc6ee05735a33f78881 03-Aug-2011 Glenn Kasten <gkasten@google.com> Bug 5110581 SL_PLAYEVENT_HEADATEND while looping

Change-Id: Ia4d0433b4a6589bfda2f88addbe5b7eb3d0d9789
ndroid/android_GenericMediaPlayer.cpp
ndroid/android_GenericMediaPlayer.h
ndroid/android_GenericPlayer.h
f731cc1f3cd5911b0aff730bd504ee47a3ba3c6c 03-Aug-2011 Glenn Kasten <gkasten@google.com> Merge "Bug 5109153 Remove log spam"
e51d469aa14fa9ae94bddc31ae6aab59e41a48ca 03-Aug-2011 Glenn Kasten <gkasten@google.com> Merge "Bug 5108531 Report the correct API level"
f152bc273bc3f8471bca626fe9cc966dad304173 02-Aug-2011 Glenn Kasten <gkasten@google.com> Merge "Bug 5080320 MediaPlayer volume"
ecc4fe22e076c4e5c891d823b01db1a683ba6690 02-Aug-2011 Glenn Kasten <gkasten@google.com> Bug 5109153 Remove log spam

Change-Id: I6c0c742bfa3f0078968dc5e2ea3578ad786067c5
ndroid/MediaPlayer_to_android.cpp
ndroid/android_StreamPlayer.cpp
tf/IAndroidBufferQueue.c
tf/IStreamInformation.c
4076e5009bfe70bc06a78f5aafec77af6c03201d 02-Aug-2011 Glenn Kasten <gkasten@google.com> Bug 5108531 Report the correct API level

Use build macro PLATFORM_SDK_VERSION to automatically update the reported
value, however the test program will still need manual updates.

Change-Id: Iae044605db65021c7d1e9825aab80ab5d6b552a8
ndroid.mk
tf/IEngine.c
99b927751677abfb60a388d65dfeed1fed1db12c 28-Jul-2011 Glenn Kasten <gkasten@google.com> Bug 5080320 MediaPlayer volume

Details:
- re-factor volume-related code yet again
- remove dead variables mAmplFromVolLevel, mAmplFromStereoPos, mDirectLevel
- add placeholders for kEventPrefetchFillLevelUpdate and kEventPrefetchStatusChange

Known issues:
- MPEG-2 TS doesn't yet implement the ability to query channel count, so default to stereo

Change-Id: Ic0f2297b267dc3d380755e8d314e1d5f0f659d7c
ndroid/AudioPlayer_to_android.cpp
ndroid/MediaPlayer_to_android.cpp
ndroid/MediaPlayer_to_android.h
ndroid/android_GenericMediaPlayer.cpp
ndroid/android_GenericPlayer.h
lasses.h
andler_bodies.c
tf/IEngine.c
8b54effee89c829310e16d69bf2d9496789551b6 30-Jul-2011 Glenn Kasten <gkasten@google.com> Merge "Bug 5082191 fix slesTest_decodeToBuffQueue assert"
2e0ad5a525247b48d6300ab48774503f55da75ea 29-Jul-2011 Glenn Kasten <gkasten@google.com> Merge "Bug 5092976 no spurious callbacks on prefetch fail"
9f07ea788f57654acf29d1321b40162e41eb122b 26-Jul-2011 Glenn Kasten <gkasten@google.com> Bug 5081346 fix whole file looping

Change-Id: If4e233f9007d7e48225a342a43f06df7f66cdea7
ndroid/android_GenericMediaPlayer.cpp
ndroid/android_GenericPlayer.h
06059e5ee1eaf907589c7f8d1320253f92211348 29-Jul-2011 Glenn Kasten <gkasten@google.com> Bug 5092976 no spurious callbacks on prefetch fail

Change-Id: I754085b4d1e43c4d10bea36e0fb683d8113844e9
ndroid/android_GenericMediaPlayer.cpp
ndroid/android_GenericMediaPlayer.h
e878c470cf58c8654d613ab2449468b44a90d6e5 27-Jul-2011 Glenn Kasten <gkasten@google.com> Bug 5082191 fix slesTest_decodeToBuffQueue assert

Change-Id: I2ec181cc7eba000847bd28e6d04733d3496d74d9
ndroid/android_AudioSfDecoder.cpp
ndroid/android_defs.h
tf/IEngine.c
fa2bd93c3a9852a1f879663eeff598d13cf8fa81 25-Jul-2011 Glenn Kasten <gkasten@google.com> Bug 4599730 fix mute solo, channel count, volume

Change-Id: I1624c744168233c4ef79f2cd3090447b8aa7d53b
ndroid/AudioPlayer_to_android.cpp
ndroid/AudioPlayer_to_android.h
ndroid/MediaPlayer_to_android.cpp
ndroid/android_GenericMediaPlayer.cpp
ndroid/android_GenericPlayer.cpp
ndroid/android_GenericPlayer.h
ndroid/android_defs.h
lasses.h
5050a75e342ce45794d56666cddde3d46472acc7 27-Jul-2011 Jean-Michel Trivi <jmtrivi@google.com> Report last decoded position as AudioPlayer position for PCM decode

Change-Id: I1ec413137d549235af4dc66cb033e1cd0bbbad62
ndroid/android_AudioSfDecoder.cpp
ndroid/android_AudioSfDecoder.h
7bc462c41b66cf28c95f9c47f60307e1d77fd3a4 26-Jul-2011 Glenn Kasten <gkasten@google.com> Merge "Bug 5045590 preset reverb on audio players"
6f0f5640d190b0187c356eb53bd96d9f9e49da60 25-Jul-2011 Jean-Michel Trivi <jmtrivi@google.com> Fix bug 5022500 MP2TS format change support in OpenMAX AL

Define new command that can be queued in AndroidBufferQueue
to signal an MP2TS format change.
This command maps directly to IStreamListener::kKeyFormatChange.

Change-Id: I67908fd9e1a7d994862ea3e41c4c0fb6e36bc804
ndroid/android_StreamPlayer.cpp
ndroid/android_defs.h
tf/IAndroidBufferQueue.c
3610785fa93586ce84a27a27530feb77b8035229 22-Jul-2011 Glenn Kasten <gkasten@google.com> Bug 5045590 preset reverb on audio players

Aux effects on MediaPlayer audio players (non-AudioTrack) were broken

Change-Id: I5b97bee08d809b12cb9815d6d277934123780581
ndroid/android_Effect.cpp
ndroid/android_GenericMediaPlayer.cpp
ndroid/android_GenericMediaPlayer.h
ndroid/android_GenericPlayer.cpp
ndroid/android_GenericPlayer.h
64621eac543d714d4d3f7cb9c24205f2ddc59201 21-Jul-2011 Glenn Kasten <gkasten@google.com> Bug 5068269 Fix assertion failure after prepare

Change-Id: I890a29eeef9021c7432da8a0ccb409846e107097
ndroid/AudioPlayer_to_android.cpp
ndroid/MediaPlayer_to_android.cpp
ndroid/android_defs.h
dc93696c78e3a089828188a760ece635cb8d8a09 22-Jul-2011 Glenn Kasten <gkasten@google.com> Merge "Bug 5047695 Handle unsuccessful prepare up to app"
49935c51fddcd0caa0030e2aac0c3a7ba3339e3d 21-Jul-2011 Glenn Kasten <gkasten@google.com> Bug 5047695 Handle unsuccessful prepare up to app

Change-Id: I9f1541b37ad5cda21dc49388e42c7fb08b22fc5b
ndroid/android_GenericMediaPlayer.cpp
ndroid/android_GenericMediaPlayer.h
ndroid/android_GenericPlayer.cpp
ndroid/android_GenericPlayer.h
ndroid/android_defs.h
b2549c73290f1955f3a7731bf98446a45f295dfa 21-Jul-2011 Glenn Kasten <gkasten@google.com> Add more verbose logging

Change-Id: I0cccee0d59fe3eefc6ef94b22bb6100d96bccdff
ndroid/AudioPlayer_to_android.cpp
ndroid/android_GenericMediaPlayer.cpp
ndroid/android_GenericPlayer.cpp
fa52213f4eccd0fd32bc1a3175e2ac675f6150e5 20-Jul-2011 Glenn Kasten <gkasten@google.com> Merge "Bug 5047695 missing cases"
2d8f61cf8f81c4cef19828d53e522383f3176fe2 20-Jul-2011 Glenn Kasten <gkasten@google.com> Merge "Bug 5044578 part 2"
81e917a2605e14901b8f5e6cac7eafb5667aad0d 20-Jul-2011 Glenn Kasten <gkasten@google.com> Bug 5047695 missing cases

Change-Id: I9ae27ed4e977568a9687b9dd18eb998651569b24
ndroid/android_GenericMediaPlayer.cpp
581dacbabb3db9dd65ae6cd6dee791e1a7fecd7a 20-Jul-2011 Jean-Michel Trivi <jmtrivi@google.com> Merge "Fix bug 5049371 Metadata for decode to PCM buffer queue"
ba539d5b0d28856f949a78d7a0b29064fdd805c9 20-Jul-2011 Glenn Kasten <gkasten@google.com> Merge "Use the documented header filenames"
8ff5e6b121c06d806cbe6bc2399ef16383dc041b 20-Jul-2011 Glenn Kasten <gkasten@google.com> Merge "Re-generate tables and fix includes"
54cad4f35a090a06e655fcc9e072e1d38f9e7689 20-Jul-2011 Jean-Michel Trivi <jmtrivi@google.com> Fix bug 5049371 Metadata for decode to PCM buffer queue

When decoding a URI or FD with OpenSL ES to a PCM buffer queue,
you cannot rely on the information given by the extractor, or
the OMXCodec before the latter has decoded one buffer.

The fix consists in two parts:
1/ where to retrieve the PCM format from:
the information first retrieved from the extractor if available,
but then overwritten by the OMXCodec values as soon as it
issues INFO_FORMAT_CHANGED
2/ when can the application retrieve the information:
the information is available when the first buffer of decoded
data is returned to the application via the buffer queue
callback. The test app is updated to reflect this, and verify
that the query can safely happen during the callback.

Change-Id: Ic034c7ff9412c94e9df2aaa3c1d61e9d3bf507d9
ndroid/android_AudioSfDecoder.cpp
ndroid/android_AudioSfDecoder.h
ndroid/android_AudioToCbRenderer.cpp
157ad9aa0b0a8709e14439c1b6555ef68d0731b8 19-Jul-2011 Glenn Kasten <gkasten@google.com> Bug 5044578 part 2

That last fix introduced a regression; one assert no longer true
found during more testing.

Change-Id: I4c3f8d6f7158fc364473606d1c8f78fe81fbb7e5
hreadPool.c
fcd29cb117d8fb08d4e4c15fd3e60caa0a3eddfc 19-Jul-2011 Glenn Kasten <gkasten@google.com> Re-generate tables and fix includes

Change-Id: I266810fc1c0c477e997b39478b9e77694f9fc49b
utogen/IID_to_MPH.c
utogen/MPH_to_Engine.h
c6853892c94800e72c0bd676d5d2136d48cea76e 19-Jul-2011 Glenn Kasten <gkasten@google.com> Use the documented header filenames

Both Khronos and we say to use < > in our docs

Change-Id: Ibf1d2b83036582a605aa6b9043210c89a4eb0e1e
penSLES_IID.c
andlers.c
les_allinclusive.h
t/OpenSLESUT.c
t/slesutResult.c
d7ecf117cfac5f2b90a0dc6c62b56dcce0715971 19-Jul-2011 Glenn Kasten <gkasten@google.com> Reduce logs

Change-Id: I82c8a66886bd3b853fac88594370545ed23a0400
ndroid/VideoCodec_to_android.cpp
tf/IVideoDecoderCapabilities.cpp
d527933b750b107449263fff2c9d870edbfcc520 19-Jul-2011 Glenn Kasten <gkasten@google.com> Bug 5044578 Fix race in engine destroy on uni

On uniprocessor, the main thread reached Engine::Destroy before the
worker threads had even started, so they did not see the shutdown.

On SMP, the worker threads were started (and blocked), so it was OK.

This new code also has the advantage of shutting down quicker
if there are pending callback requests in the queue.

Change-Id: Iff8cca042ebffe48ce7cc5d798e7b3b9911fb64b
hreadPool.c
76ac21ed01efa794a61d271501ad08ddc0870dae 19-Jul-2011 Glenn Kasten <gkasten@google.com> Merge "Reduce logging"
de015407a89018f9422254624e1b75703f38defd 19-Jul-2011 Glenn Kasten <gkasten@google.com> Reduce logging

Change-Id: I71c5e016147002fa84a56fc703da52e7b5c8417a
ndroid/android_GenericMediaPlayer.cpp
6e7e174807fc639c49125ced8962aa369370fbf0 13-Jul-2011 Jean-Michel Trivi <jmtrivi@google.com> Implement XAVideoDecoderCapabilitiesItf

Add support for the OpenMAX AL XAVideoDecoderCapabilitiesItf
engine interface.

Implement the Android support of this interface in
VideoCodec_to_android.*. This functionality relies
on OMXCodec::QueryCodecs() feature, and does only
expose hardware codec capabilities (see full note in
VideoCodec_to_android.h).

Add sample code to list the platform's video decoders
and their profile / level combinations.

Change-Id: Iff6a42542c1db67ca1dcf539449ca96aa5944f6d
ndroid.mk
PH_to.c
ndroid/VideoCodec_to_android.cpp
ndroid/VideoCodec_to_android.h
lasses.c
lasses.h
evices.c
evices.h
tf/IVideoDecoderCapabilities.cpp
tfstruct.h
les.c
662c25b0ee98928a01ee4ba551e0503fac168857 14-Jul-2011 Andreas Huber <andih@google.com> NuHTTPDataSource.h is no more, get rid of this (redundant) include

Change-Id: I893738d1aa1e91300c966a5ac3a7cc3ce1202152
ndroid/android_AudioSfDecoder.h
faa31e08addba8eed621e005ff40d446c6020f94 13-Jul-2011 Jean-Michel Trivi <jmtrivi@google.com> Merge "Async callback queue updates, applied to XAStreamInformationItf"
85133c817f6f387cd7d072988a8818f18bb53702 12-Jul-2011 Jean-Michel Trivi <jmtrivi@google.com> Async callback queue updates, applied to XAStreamInformationItf

Updated the asynchronous callback queue system to support 'piipp'
callback signatures.

Applied this update to make the StreamInformation property change
event notification asynchronous.

Made the XA_PLAYEVENT_HEADATEND also use the callback queue.

Change-Id: I6fd8dee5eefa1d09006661f69de302a8b7fff0f5
hreadPool.c
hreadPool.h
ndroid/MediaPlayer_to_android.cpp
les_allinclusive.h
fd921c5e16782bcf10f997487b44deb38156ab2b 12-Jul-2011 Jeff Brown <jeffbrown@google.com> Merge "Remove the simulator target from all makefiles. Bug: 5010576"
ddf30363c081b598a4df50c30a7e469a2551bdbd 12-Jul-2011 Jean-Michel Trivi <jmtrivi@google.com> Merge "Implement XAPlayItf::GetPosition on MediaPlayer"
35a5a30fdad179ccf38d8d756590411326159a89 12-Jul-2011 Jean-Michel Trivi <jmtrivi@google.com> Implement XAPlayItf::GetPosition on MediaPlayer

The play interface was only in place for routing calls to an
AudioPlayer in OpenSL ES, not in OpenMAX AL for a MediaPlayer.

Change-Id: Icf514be428396264252874faf1060c76ddee9545
ndroid/MediaPlayer_to_android.cpp
ndroid/MediaPlayer_to_android.h
ndroid/android_GenericMediaPlayer.cpp
ndroid/android_GenericMediaPlayer.h
tf/IPlay.c
ffea36e11b068d171549b64ee767eefd2637555a 12-Jul-2011 Jeff Brown <jeffbrown@google.com> Remove the simulator target from all makefiles.
Bug: 5010576

Change-Id: I59e3c37c05c1114648172d9aba7abf035986bede
ndroid.mk
tf/IAndroidEffect.cpp
3ece92db4f00b14dfa46118c7ef2dd305e8a19c4 12-Jul-2011 Glenn Kasten <gkasten@google.com> Merge "Defer SL_PLAYEVENT_HEADATEND to avoid deadlock"
377aa54ce344adcbc8bac731c6db9e7e39b432c5 10-Jul-2011 Glenn Kasten <gkasten@google.com> Defer SL_PLAYEVENT_HEADATEND to avoid deadlock

This is a first example, and if it works well then will
be implemented for other appropriate callbacks also.

Change-Id: Ieeab6b3498c74305e19a9d9c8ff497eff22243aa
ndroid/AudioPlayer_to_android.cpp
les_allinclusive.h
cf3a6383a9bc9a94ca5b424ea97313293ee0dcb0 10-Jul-2011 Glenn Kasten <gkasten@google.com> ThreadPool callbacks provide more parameters

Now allows up to two void * and two int parameters.

This will be needed by deferred application-level callbacks

Change-Id: Ie388169439b2e3ab95d053007bcdc674b875fa67
hreadPool.c
hreadPool.h
tf/IDynamicInterfaceManagement.c
tf/IObject.c
ebd7dd606ed50bfa85e52743d784c3a6c5941e35 10-Jul-2011 Glenn Kasten <gkasten@google.com> Merge "Enable ThreadPool for Android"
cc0c05e46cb941ff9a750b4c8eab4f8eba771b74 10-Jul-2011 Jean-Michel Trivi <jmtrivi@google.com> Merge "Implement GetPosition for players playing from a URI/FD"
4c7bd0776ee7fd256b12bc1b0c4d6704153f5677 10-Jul-2011 Glenn Kasten <gkasten@google.com> Enable ThreadPool for Android

Change-Id: I7a836dbbd671ecd8ce363c48940b84a0a6c18dca
hreadPool.h
4b0e0b2860ffd5e246b42c8a434833cca2f068b3 08-Jul-2011 Jean-Michel Trivi <jmtrivi@google.com> Implement GetPosition for players playing from a URI/FD

AudioPlayer (OpenSL ES) and MediaPlayer (OpenMAX AL) that play
media from a URI or FD are implemented on top of an Android
MediaPlayer. This CL implements requesting the current position
from the underlying MediaPlayer object inside the event loop.
At this stage, GetPosition cannot be called from inside a
callback as the callback is made on the same thread that will
process the asynchronous part of the GetPosition implementation.
Add test app for GetPosition.

Change-Id: Ife768bc40e37fc60cc19f6ba84bbe6cb06cc6590
ndroid/android_GenericMediaPlayer.cpp
ndroid/android_GenericMediaPlayer.h
ndroid/android_GenericPlayer.h
90fade711b33e9b79b034ec288bd2ecf48b2fd41 08-Jul-2011 Glenn Kasten <gkasten@google.com> Merge "Make it build again on non-Android"
4f3f0f5d1b97008790158f4dde71057f7d8ed41a 08-Jul-2011 Eric Laurent <elaurent@google.com> Merge "Moved and renamed effect API header files"
ea429ee1007c36ade812199ad365c0e659e8053f 17-Jun-2011 Eric Laurent <elaurent@google.com> Moved and renamed effect API header files

Moved specific effect header files to
system/media/audio_effects/include/audio_effects and renamed
to lower case (effect_xxx.h).

Change-Id: I8e8f6e3851f12ae8bb380fa714abe26da06d3b58
ndroid.mk
ndroid/android_Effect.cpp
tf/IBassBoost.c
tf/IEnvironmentalReverb.c
tf/IEqualizer.c
tf/IVirtualizer.c
71139e6bc1f077d285fb04629925d99383d1114f 07-Jul-2011 Glenn Kasten <gkasten@google.com> Make it build again on non-Android

Fix warning about unused variable.
Remove spurious include.
Fix warning about printf format type mismatch.

Change-Id: Ibeeb33a55175e0ec1e5210211d8844df0bbe3bca
esktop/SndFile.c
tf/IEngine.c
bjects/CMediaPlayer.c
def09fde9f46da7e54f73229e6df48c415910eb8 08-Jul-2011 Glenn Kasten <gkasten@google.com> Merge "Rename ANDROID_UNKNOWN_* to UNKNOWN_*"
f42aa86f0108a11e52c61f4b082f224005f73e4d 07-Jul-2011 Glenn Kasten <gkasten@google.com> Merge "Fix NPE when pDataLocator->mURI.URI is NULL"
1a9c2615d0933d183fcb1b9e34ec8f0da2a85153 07-Jul-2011 Glenn Kasten <gkasten@google.com> Rename ANDROID_UNKNOWN_* to UNKNOWN_*

Change-Id: I0d92b7d943690d9af7e08c400471f8b474728bff
ndroid/AudioPlayer_to_android.cpp
ndroid/AudioRecorder_to_android.cpp
ndroid/android_AudioSfDecoder.cpp
ndroid/android_GenericPlayer.cpp
ndroid/android_GenericPlayer.h
ndroid/android_defs.h
lasses.h
esktop/SndFile.c
tf/IEngine.c
les_allinclusive.h
5793033ccaeb30cc4936497f64dfa2cfe2cc405f 07-Jul-2011 Glenn Kasten <gkasten@google.com> Fix NPE when pDataLocator->mURI.URI is NULL

Don't call strlen on a NULL pointer

Change-Id: I632e71287695dc2762e56c1379be4108014107e2
ata.c
13d02b645fc6e8ffe70a8bf8cc5f69f03558ae40 07-Jul-2011 Jean-Michel Trivi <jmtrivi@google.com> Fix metadata value size check

A bug was introduced during the review of the SLMetadataExtractionItf
interface implementation where the value size was improperly
compared against the size given by the application.

Change-Id: Iae1359e84a410e3fec53bd65e0fba9cc97fce08a
ndroid/android_AudioSfDecoder.cpp
47550bf6cf5cf08a402a54b1589f4b64582a5120 30-Jun-2011 Glenn Kasten <gkasten@google.com> Bug 4980997 Fix the AudioTrack start deadlock

Details:
- Added AudioTrackProxy, a RefBase proxy for AudioTrack
- Call AudioTrack::start() after unlock

Change-Id: Ib1a05ee57f78432eb4c9d3a5bd68dd31a78d6e3e
ndroid/AudioPlayer_to_android.cpp
ndroid/AudioRecorder_to_android.cpp
ndroid/AudioTrackProxy.h
ndroid/android_Effect.cpp
lasses.h
esktop/SndFile.c
tf/IAndroidEffect.cpp
tf/IEngine.c
ocks.c
e6ded5c61944a87fa9e472dec3a6929855d42aeb 28-Jun-2011 Jean-Michel Trivi <jmtrivi@google.com> Fix issues in GenericPlayer destruction

Added a preDestroy() mechanism for the subclasses of
GenericPlayer.
Added a lock around the update and use of the callback
GenericPlayer is using for notifications to the
OpenSL ES framework. This prevents notifications after
the GenericPlayer is flagged for destruction.
Added a lock to protect the update of the audio source
running state, so it doesn't get used after the
AudioSfDecoder is flagged for destruction.
Before stopping the audio source of an AudioSfDecoder
object, release the code buffer if necessary, to
ensure proper teardown of the audio source (OMXCodec)

Change-Id: I6cf08d169a6da622552dda5101dbc61e663ce6aa
ndroid/AudioPlayer_to_android.cpp
ndroid/android_AudioSfDecoder.cpp
ndroid/android_AudioSfDecoder.h
ndroid/android_AudioToCbRenderer.cpp
ndroid/android_GenericPlayer.cpp
ndroid/android_GenericPlayer.h
f4647bf85968ab30eb07f9a80b99177d91068f94 29-Jun-2011 Glenn Kasten <gkasten@google.com> Call AudioTrack start, stop, and pause when needed

These AudioTrack operations are relatively expensive Binder calls (and
will soon be even more expensive to fix a deadlock at AudioTrack::start),
and they were being called excessively. Now AudioTrack start, stop,
and pause are only called when there is an actual play state change.

Details:
- distinguish ATTR_TRANSPORT vs. ATTR_PLAY_STATE for audio players
- android_audioPlayer_setPlayState is only called when the play state changes
- handler_AudioPlayer_transport is only called for transport changes other than play state
- android_audioPlayer_setPlayState is always called with mutex locked
- since media player currently only handles play state, handler_MediaPlayer_transport
is still called for both ATTR_TRANSPORT and ATTR_PLAY_STATE
- since the handlers for ATTR_BQ_ENQUEUE and ATTR_ABQ_ENQUEUE are only called if in
state PLAYING, changed an "if" to an "assert"

Change-Id: Iee2968fd98d215885b7105053bb1604f962ea337
ndroid/AudioPlayer_to_android.cpp
ndroid/AudioPlayer_to_android.h
ttr.h
andler_bodies.c
andlers.c
andlers.h
tf/IPlay.c
6cce136651f6fd2c7aecd45bc553270152d75462 28-Jun-2011 Jean-Michel Trivi <jmtrivi@google.com> Fix race condition when deleting an AudioPlayer

When deleting an AudioPlayer that is used as a PCM decoder,
there can be callback underway, for instance when trying to
delete a player just as the notification of its preparation
arrives.

The fix consists in:
- flagging all callback with the CallbackProtector
mechanism,
- only entering callback when it is valid to do so
- renaming AudioTrackProtector to CallbackProtector
as this mechanism is not exclusively used for the
AudioTrack callbacks.

Change-Id: I9336a75981de43f71a983c1300f3a0ff314ac1e0
ndroid.mk
ndroid/AudioPlayer_to_android.cpp
ndroid/AudioTrackProtector.cpp
ndroid/AudioTrackProtector.h
ndroid/CallbackProtector.cpp
ndroid/CallbackProtector.h
lasses.h
tf/IEngine.c
ac18c1cd32408884d3960bd7aa56ba419c2ca68b 25-Jun-2011 Jean-Michel Trivi <jmtrivi@google.com> Fix NPE in audio decoding

If the data source wasn't properly initialized, the corresponding
member field should be accessed.

Change-Id: I811827991078db4b8dc4278014f046361f06e1a2
ndroid/android_AudioSfDecoder.cpp
8bae97ce4243cb9fe37fa35b82cca48fca735e72 23-Jun-2011 Glenn Kasten <gkasten@google.com> Merge "Bug 4606138"
7f5cc1afe49395fefaad9b2bbd728a45d1bfda6a 16-Jun-2011 Jean-Michel Trivi <jmtrivi@google.com> OpenSL ES: additional features when decoding to PCM

Support the following features useful when decoding a compressed
asset to PCM:
- GetDuration in SLPlayItf
- implemented SLMetadataExtractionItf on an AudioPlayer whose
data sink is a buffer queue (i.e. it's a decoder)
- added support for 6 new metadata keys that can be queried
through SLMetadataExtractionItf, which match the fields
of the SLDataFormat_PCM structure.
Updated the decode sample code to use these features: the
slesTestDecodeToBuffQueue app now displays:
- the number of channels
- the channel mask
- the sample size
- the container size
- the sample rate
- the format endianness

Change-Id: I3ca1e29828fd8c16c89da43a28df429c9cdef7af
ndroid.mk
ndroid/AudioPlayer_to_android.cpp
ndroid/AudioPlayer_to_android.h
ndroid/OpenSLES_AndroidMetadata.h
ndroid/android_AudioSfDecoder.cpp
ndroid/android_AudioSfDecoder.h
ndroid/android_AudioToCbRenderer.cpp
ndroid/android_GenericPlayer.cpp
ndroid/android_GenericPlayer.h
ndroid/android_defs.h
lasses.c
tf/IMetadataExtraction.c
les.c
8b565a4139cb37b0682b44cf9a16525ebf6c2058 16-Jun-2011 Eric Laurent <elaurent@google.com> Revert "voice processing"

This reverts commit 7585d227843769079ee2afb385607b3e23ac1e07
ndroid/android_Effect.cpp
tf/IBassBoost.c
tf/IEnvironmentalReverb.c
tf/IEqualizer.c
tf/IVirtualizer.c
7965455f86c21d6e1f788b284f5fc829e82ff2b5 14-Jun-2011 Glenn Kasten <gkasten@google.com> Bug 4606138

Change-Id: If4745ee39eeedf11388800cc30c26e4c4f8ddaa0
ndroid/AudioPlayer_to_android.cpp
ata.c
ata.h
tf/IEngine.c
87c9a6bbe9dabec3d795675ab0ef74a773cc1670 12-Jun-2011 Eric Laurent <elaurent@google.com> voice processing

Change-Id: I0b6129f566349fd333f34773589d5d15c36a7c15
ndroid/android_Effect.cpp
tf/IBassBoost.c
tf/IEnvironmentalReverb.c
tf/IEqualizer.c
tf/IVirtualizer.c
b4fb100d7122d118d3da9d1d08ffacef68dd38b0 03-Jun-2011 Jean-Michel Trivi <jmtrivi@google.com> Stop the OMX codec when destroying the OpenSL ES decoder

The AudioSfDecoder class uses a MediaSource interface from
an OMXCodec object. In the class destructor, the codec must
be stopped before the codec is anihilated.

Change-Id: Ibf0d729e055dcd8f4e05f3fb8332d650f9be0d30
ndroid/android_AudioSfDecoder.cpp
a84c5e20d9884d7ec7e4b1377a328c1d1a552b70 02-Jun-2011 Glenn Kasten <gkasten@google.com> Revert "Use AudioTrack::event_type not int in callback"

This reverts commit 1d7ee1569f98f7f1b629a04bb0895165255c7f7b
ndroid/AudioPlayer_to_android.cpp
afb606059a28ee6e497e0a8a09a6b66e74a838b6 05-May-2011 Glenn Kasten <gkasten@google.com> Use AudioTrack::event_type not int in callback

Change-Id: Icd60d7eff86e3bdf9907c573b6900c8eca96acf1
ndroid/AudioPlayer_to_android.cpp
4c6387051c4bdca16c940ad92d73bfb2f7ae79ae 18-May-2011 Eric Laurent <elaurent@google.com> New audio effect API.

media/EffectApi.h header file has been moved and renamed to
hardware/audio_effect.h

Change-Id: Ie24295fb16f3925f1cc43577605d371fd9a18528
tfstruct.h
10a3840407ac3ed61e7873ee7b86d664ccc6149f 11-May-2011 Dima Zavin <dima@android.com> update for new audio.h header location

Change-Id: I2140f1def08bedd8b2bd5170c6ac5edccb80035c
Signed-off-by: Dima Zavin <dima@android.com>
ndroid/AudioPlayer_to_android.cpp
ndroid/AudioRecorder_to_android.cpp
ndroid/OutputMix_to_android.cpp
ndroid/android_Effect.cpp
ndroid/android_sles_conversions.h
tf/IAndroidEffect.cpp
tf/IEngine.c
ca39f4b4dbeb920a5b97bd65be73f2f7cac77431 06-Apr-2011 Dima Zavin <dima@android.com> system/media: convert to use new defines from hardware/audio.h

Change-Id: I8f0f0d26e10dbbb4dfbc3b52f1c02737a375c5e0
Signed-off-by: Dima Zavin <dima@android.com>
ndroid/AudioPlayer_to_android.cpp
ndroid/AudioRecorder_to_android.cpp
ndroid/OutputMix_to_android.cpp
ndroid/android_Effect.cpp
ndroid/android_defs.h
ndroid/android_sles_conversions.h
tf/IAndroidEffect.cpp
tf/IEngine.c
2f6d462d89356cdaa77299ca27b60c5cca198d98 14-Apr-2011 Gloria Wang <gwang@google.com> - Add another parameter in notify() to be able to send timed text sample
through listener during video playback.
For feature request 800939.

Change-Id: I14aa18d2f803163a62c05f9e6bd990518c58cd3f
ndroid/android_GenericMediaPlayer.cpp
ndroid/android_GenericMediaPlayer.h
c2538ea97795072fa5edab1ddba47a5d34530c32 13-Apr-2011 Glenn Kasten <gkasten@google.com> Merge "Fix build warnings caused by the 'long' change"
a8179ea15c4ff78db589d742b135649f0eda7ef2 13-Apr-2011 Glenn Kasten <gkasten@google.com> Fix build warnings caused by the 'long' change

Change-Id: I34e74d723ae7fd829dd140614928d7880e669f03
ndroid/AudioPlayer_to_android.cpp
ndroid/AudioRecorder_to_android.cpp
ndroid/MediaPlayer_to_android.cpp
ndroid/android_AudioToCbRenderer.cpp
ndroid/android_StreamPlayer.cpp
ndroid/android_prompts.h
ata.c
ntry.c
tf/IAndroidBufferQueue.c
tf/IAndroidConfiguration.c
tf/IAndroidEffectCapabilities.c
tf/IBufferQueue.c
tf/IEffectSend.c
tf/IPlay.c
tf/IStreamInformation.c
les.c
race.c
7ef5526a7bd12eccfa777cc8bc167794634f405a 13-Apr-2011 Jean-Michel Trivi <jmtrivi@google.com> Fix stuttering at beginning of playback

When an AudioPlayer is created, its playstate is set to STOPPED
three times. A stop command is translated into a pause + seek(0).
When a seek is underway, any new seek command was postponed. So
when playback would start after a first seek(0), the other seeks
would be executed, causing the stutterring.
This CL verifies that, when seeking to a certain time, any new
seek command to the same point in time received while seeking
is ignored.
It also correct the update of mStateFlags, which should be done
BEFORE the command is issued to the player, in case the seek
complete notification happens syncronously with the seek command.

This CL does NOT fix why a newly created player sees its playstate
updated to STOPPED three times in a test app like slesTest_playUri
before playback starts.

Change-Id: Ic7627678735f559b911ea3c5a0e1e00d7d7534d2
ndroid/android_GenericMediaPlayer.cpp
ndroid/android_GenericMediaPlayer.h
ndroid/android_GenericPlayer.cpp
e31a69fcbe27894a597176d05a08e04c06092021 13-Apr-2011 Glenn Kasten <gkasten@google.com> Fix various bugs found with unit tests

ISeek::SetLoop was returning undefined status.
Khronos Bug 7614 - sizeof(long) != 32 bits on x86_64.
Fix bug in IID hashing due to the above.
Fix bug in GenericMediaPlayer::onLoop; was using mPlayer without checking for NULL.
Fix wrong API level in tests/sandbox/object.c.
Decrease log level from I to V in MediaPlayerNotificationClient::notify
and GenericPlayer::~GenericPlayer.
Fix memory leak in tests/sandbox/engine.c.
Comment out overly verbose log in tests/sandbox/streamSource/slesTestPlayStream.cpp.

Change-Id: I322fa9e19ee95ea1e18870a20f6a3c03b8f21208
ndroid/android_GenericMediaPlayer.cpp
ndroid/android_GenericPlayer.cpp
utogen/IID_to_MPH.c
tf/ISeek.c
a8d28e924e270804b55c0242a88ffc0065cd74c9 12-Apr-2011 Glenn Kasten <gkasten@google.com> Merge "Refactor the handling of updates to attributes"
7b726bdcd996f1cab3a584c04ce1afc07bc8fbe7 07-Apr-2011 Glenn Kasten <gkasten@google.com> Refactor the handling of updates to attributes

Attribute handler functions are more modular and
get rid of those endless if statements.

Change-Id: I3221aeb3d26d2dcc5dc9a3f6d37d088f5ce511a1
ndroid.mk
ttr.h
andler_bodies.c
andlers.c
andlers.h
ocks.c
les_allinclusive.h
ad79bbfd16ba81a45842179178332fbd06ad365e 11-Apr-2011 Jean-Michel Trivi <jmtrivi@google.com> Remove compilation warnings for SLmillibel level comparisons

In OpenSL ES, the volumes are expressed in millibels, which are
stored as SLint16.

The mix and max values are defined as:
define SL_MILLIBEL_MAX ((SLmillibel) 0x7FFF)
define SL_MILLIBEL_MIN ((SLmillibel) (-SL_MILLIBEL_MAX-1))

Therefore the comparison
(SL_MILLIBEL_MIN <= level)
is always true.

This CL removes those comparisons rather than use the compilation
flag to suppress the warning (it is a useful warning!).

Change-Id: I5672f257661ac045ba5282ecb0ecd14d985d8102
tf/IAndroidEffectSend.c
tf/IEffectSend.c
tf/IEnvironmentalReverb.c
36b700a829b7a02b873b4cd0cdb0a95342b20a31 11-Apr-2011 Jean-Michel Trivi <jmtrivi@google.com> Use reference to sp on GenericPlayer

When an object like GenericPlayer is stored in CAudioPlayer or
CMediaPlayer by a sp, don't use a pointer to GenericPlayer when
the object is passed as a function parameter, but rather use
a reference to the sp that maintains it.

Change-Id: I49ff219618ac4b657deb43cfffb65f0e0dd6d58d
ndroid/AudioPlayer_to_android.cpp
ndroid/MediaPlayer_to_android.cpp
ndroid/MediaPlayer_to_android.h
ndroid/android_GenericMediaPlayer.cpp
16be54258b18bf44137b6b92c8e9f2c2da6108b5 07-Apr-2011 Glenn Kasten <gkasten@google.com> Re-generate autogen files

Change-Id: I3ff71790a981ea0f1e604bae344e4a949509405a
utogen/MPH_to_MediaPlayer.h
cc7918cbca027f26fa739f15181157bb9d9e0eaf 07-Apr-2011 Jean-Michel Trivi <jmtrivi@google.com> Merge "OpenMAX AL: support the SeekItf and XA_PLAYEVENT_HEADATEND"
92b245bf8828db9e469febebbe8774c00570b5b9 07-Apr-2011 Jean-Michel Trivi <jmtrivi@google.com> OpenMAX AL: support the SeekItf and XA_PLAYEVENT_HEADATEND

Implemented support for:
- seeking to a position
- looping (only over full duration is supported, no loop points)
- notification of end of content reached
This is all for the playback of URIs or FDs.

Change-Id: I015c40e66feb7ac280459895f5f7915ac964df31
PH_to.c
ndroid/MediaPlayer_to_android.cpp
ndroid/MediaPlayer_to_android.h
lasses.c
lasses.h
tf/ISeek.c
ocks.c
les.c
les_allinclusive.h
0170dc5795126c660213ffdd3a39f4b9e5bc7e9c 07-Apr-2011 Glenn Kasten <gkasten@google.com> Merge "Fix build on non-Android platform"
229ff6d1ec043e9ca5bce2c19b22e097d1358317 07-Apr-2011 Glenn Kasten <gkasten@google.com> Merge "Line length 100"
0e3b9fb27c3597dd4b32f2894f5d182ea4b86234 06-Apr-2011 Glenn Kasten <gkasten@google.com> Line length 100

Change-Id: Ie4459eed7f94870413bc87252910c1189ecf2e06
ndroid.mk
tf/IStreamInformation.c
a_iid.c
f6c0c2346b2ca1ac01c2d68a2cd2a7f1d9ff3427 06-Apr-2011 Glenn Kasten <gkasten@google.com> Fix build on non-Android platform

Change-Id: I85b25467ac5bae45b12ec5b0abfb4696449c2da8
tf/IAudioIODeviceCapabilities.c
tf/IEngine.c
tf/IOutputMix.c
les.c
b05ea38e5131001884aa226f90fd50cf594a23f3 06-Apr-2011 Jean-Michel Trivi <jmtrivi@google.com> OpenSL ES / OpenMAX AL code clean up

Do not use cryptic acronyms for Android object type definitions.

Harmonize object state and type naming conventions.

Change-Id: I62bed7aba2e0b9ea0c47264af8e3cf29f74746a8
ndroid/AudioPlayer_to_android.cpp
ndroid/AudioRecorder_to_android.cpp
ndroid/MediaPlayer_to_android.cpp
ndroid/MediaPlayer_to_android.h
ndroid/android_defs.h
lasses.h
4ee246c55533bdab8ab5fa0f0581744fe58e7c91 29-Mar-2011 Jean-Michel Trivi <jmtrivi@google.com> Move support for SL URI and FD playback under GenericPlayer class

The SfPlayer class was implementing URI and FD decode and playback
in the application process. This CL removes this class entirely
and moves its functionality under the GenericPlayer class. This
means that the playback of URIs and FDs is now implemented through
an android::MediaPlayer object running in the media service.

The SfPlayer header had many StageFright and system includes, which
are now moved to the relevant files where they are required,
instead of automagically coming from sles_allinclusive.h.

Note that this CL breaks support for the following OpenSL ES features
due to missing Android MediaPlayer features:
SLPlayItf.GetPosition
HEADATMARKER
HEADATNEWPOSITION
SLVolumeItf.EnableStereoPosition
SetStereoPosition
SLMuteSoloItf
SLPlaybackRateItf

Support for those features will be reintegrated in subsequent CLs.

Change-Id: I8d7f6ea006eb7b876ef1ca1909d74b4517335850
ndroid.mk
ndroid/AudioPlayer_to_android.cpp
ndroid/AudioPlayer_to_android.h
ndroid/MediaPlayer_to_android.cpp
ndroid/android_AudioSfDecoder.cpp
ndroid/android_AudioSfDecoder.h
ndroid/android_AudioToCbRenderer.cpp
ndroid/android_GenericMediaPlayer.cpp
ndroid/android_GenericMediaPlayer.h
ndroid/android_GenericPlayer.cpp
ndroid/android_GenericPlayer.h
ndroid/android_SfPlayer.cpp
ndroid/android_SfPlayer.h
ndroid/android_StreamPlayer.cpp
ndroid/android_defs.h
lasses.h
ntry.c
tf/IEngine.c
tf/IPrefetchStatus.c
les_allinclusive.h
faea005a67ba7e75faea571c521ad2e44fe3dc27 05-Apr-2011 Glenn Kasten <gkasten@google.com> Fix bug in last commit

Always read the documentation:
- Add hooks for new OpenMAX AL interfaces
- Since OpenSL ES engine interface has a deinit hook, add one for OpenMAX AL also

Change-Id: I266bf2112e6f8e525e5b3c06bbb6a68a4764e978
tf/IEngine.c
les.c
a361b51914aeb5f8f65c7ecad719d1e01f90913b 04-Apr-2011 Glenn Kasten <gkasten@google.com> Add basis for future OpenMAX AL 1.0.1 interfaces

Bug fix:
OpenMAX AL media player was using SL instead of XA symbols for the Object
and DynamicInterfaceManagement interfaces. A Object::GetInterface using
the XA symbols would have failed. Fortunately, these are not used in
typical applications.

Minor cleanup:
- Add README.txt for mphtogen tool
- Fix clang warning
- Update comments
- Remove spurious commas
- Fix warning at declaration of SL_IID_array
- SL_IID_ANDROIDBUFFERQUEUE was added in API level 12, not 10

Change-Id: I75abced5bc3c3fdabe40face25463810de741bf2
PH.h
PH_to.c
penSLES_IID.c
utogen/IID_to_MPH.c
utogen/MPH_to_3DGroup.h
utogen/MPH_to_AudioPlayer.h
utogen/MPH_to_AudioRecorder.h
utogen/MPH_to_Engine.h
utogen/MPH_to_LEDDevice.h
utogen/MPH_to_Listener.h
utogen/MPH_to_MediaPlayer.h
utogen/MPH_to_MetadataExtractor.h
utogen/MPH_to_MidiPlayer.h
utogen/MPH_to_OutputMix.h
utogen/MPH_to_Vibra.h
lasses.c
ata.h
ntry.c
nterfaces.c
tf/ILEDArray.c
tf/IObject.c
l_iid.c
a_iid.c
2b06e20ae32388f6e1dfd088d9773c34e6b1cb45 29-Mar-2011 Jean-Michel Trivi <jmtrivi@google.com> Reduce include noise in SL and XA class definitions

In classes.h: we should only have to include the headers
for the objects that are actually stored as member variables of
the OpenSL ES and OpenMAX AL objects (so here AudioTrackProtector,
Effect, and GenericPlayer).
In CMediaPlayer.c: remove useless includes and change the video
surface function prototypes to use const refs to strong pointers
instead of pointers to access the GenericMediaPlayer objects.

Note that android_SfPlayer.h is still in sles_allinclusive.h because
it will be dealt with when the SfPlayer functionality is absorbed
under LocAVPlayer.

Change-Id: Ic2c9459862588399d9545a247cc15341effc0f66
ndroid/AudioPlayer_to_android.cpp
ndroid/MediaPlayer_to_android.cpp
ndroid/MediaPlayer_to_android.h
ndroid/android_AudioSfDecoder.cpp
ndroid/android_AudioToCbRenderer.cpp
ndroid/android_AudioToCbRenderer.h
ndroid/android_GenericMediaPlayer.cpp
ndroid/android_GenericMediaPlayer.h
ndroid/android_LocAVPlayer.cpp
ndroid/android_LocAVPlayer.h
ndroid/android_SfPlayer.cpp
ndroid/android_StreamPlayer.cpp
ndroid/android_StreamPlayer.h
lasses.h
bjects/CMediaPlayer.c
63c002ab68761be0eace98f28320d8eb2f3f7695 28-Mar-2011 Jean-Michel Trivi <jmtrivi@google.com> Clean up main header

There are many includes in sles_allinclusive.h that should be moved
to the files that rely on those headers. This is a first cleanup
to move Android audio effect related headers to where they belong.
+ one relocation for a media server related file. More to come
with AudioPlayer refactoring.

Change-Id: I181dde96db522d9cfb537dffea18ba57f855b99e
ndroid/android_Effect.cpp
ndroid/android_StreamPlayer.cpp
ndroid/android_StreamPlayer.h
lasses.h
tf/IBassBoost.c
tf/IEnvironmentalReverb.c
tf/IEqualizer.c
tf/IVirtualizer.c
tfstruct.h
les_allinclusive.h
f62044fafa9644468b35ae7291497b0482762f95 24-Mar-2011 Jean-Michel Trivi <jmtrivi@google.com> am 9e0e6e5c: Fix bug 4109988 fix deadlock on destroy

* commit '9e0e6e5c60320dac9aa2abbce2f9a843b8fc4449':
Fix bug 4109988 fix deadlock on destroy
33b27581efde3ee91652bfec35194b2d54603c7c 22-Mar-2011 Carl Shapiro <cshapiro@google.com> Include strings.h for the strcasecmp prototype.

Change-Id: Ibd1689f36b3d74eb1dc1a506f97ca8d11f2b0730
les_allinclusive.h
83ac345e264c1e22b7a2f1a110b2fe92473394ec 19-Mar-2011 Jean-Michel Trivi <jmtrivi@google.com> Fix bug 4109988 fix deadlock on destroy

Fix deadlock with an AudioPlayer playing from a PCM buffer queue.
This type of player uses an AudioTrack that pulls data through
its callback from a buffer queue.
This issue is that when you destroy the player (whick locks the
object), it tries to destroy the AudioTrack object. The
AudioTrack destructor can only finish when the AudioTrack
callback thread can exit. If a callback was underway when
trying to destroy the object, a race condition existed for
the AudioPlayer lock.
The fix consists in using the "pre-destroy" hook for the AudioPlayer
object. In it, we unlock the AudioPlayer, and block until the
AudioTrack callback has signaled it's done. The pre-destroy
hook also marks the track as "about to be destroyed" so any
callback that gets called once the pre-destroy hook has been
called can return immediately.

Change-Id: I4ca69157ff381232c1edc8fb576c6d9e90c2777f
ndroid.mk
ndroid/AudioPlayer_to_android.cpp
ndroid/AudioPlayer_to_android.h
ndroid/AudioTrackProtector.cpp
ndroid/AudioTrackProtector.h
lasses.h
tf/IEngine.c
bjects/CAudioPlayer.c
les_allinclusive.h
4c94f69ce3aafc6bafa265fe2ef448c621e66f15 17-Mar-2011 Jean-Michel Trivi <jmtrivi@google.com> resolved conflicts for merge of c5dcfeb2 to master

Change-Id: Iff3428cd554c5b5940da8a243c661ae70a92af8d
22cc3b025511d50923a1ff3d6462ff9f2fad0587 17-Mar-2011 Jean-Michel Trivi <jmtrivi@google.com> am 30ebe675: Bug 3329759 clean logs, PTS should be unsigned

* commit '30ebe675beff91283cc72d4ee5e94e56ab7e107f':
Bug 3329759 clean logs, PTS should be unsigned
2de28cc2b424a49a440e1d5893beb07086ab0ad7 17-Mar-2011 Jean-Michel Trivi <jmtrivi@google.com> Merge "Bug 4106199 Split libOpenSLES.so & libOpenMAXAL.so" into honeycomb-mr1
527f8ca99f2938d6569fc25dcf3256985a54dec6 16-Mar-2011 Glenn Kasten <gkasten@google.com> Bug 4106199 Split libOpenSLES.so & libOpenMAXAL.so

Change-Id: I718cf6bcfff51a6fb153928eb160a36b4ca9fc96
ndroid.mk
penSLES_IID.c
lasses.c
ntry.c
l_entry.c
l_iid.c
les_allinclusive.h
a_entry.c
a_iid.c
e9236d046fdb5cac0696c42e03443a2439188146 16-Mar-2011 Jean-Michel Trivi <jmtrivi@google.com> Bug 3329759 clean logs, PTS should be unsigned

- Don't pollute logs.
- Save MPEG-2 PTS as an unsigned 64bit value, negative values are
invalid.

Change-Id: I51d427789dd1e42219a63c68159f2e28628f0448
ndroid/AudioPlayer_to_android.cpp
ndroid/MediaPlayer_to_android.cpp
ndroid/android_AudioSfDecoder.cpp
ndroid/android_AudioToCbRenderer.cpp
ndroid/android_GenericMediaPlayer.cpp
ndroid/android_GenericPlayer.cpp
ndroid/android_LocAVPlayer.cpp
ndroid/android_SfPlayer.cpp
ndroid/android_StreamPlayer.cpp
tf/IAndroidBufferQueue.c
les_allinclusive.h
9a40703b539028b2dce5a62d94deb81375d75f6a 16-Mar-2011 Glenn Kasten <gkasten@google.com> am 7a713baa: Merge "Bug 4099084 native window data locator" into honeycomb-mr1

* commit '7a713baae6cac3740cc27380f1dc8099dd272470':
Bug 4099084 native window data locator
0f1c886e9bea56ce7b4ccfa58d733b0952942751 16-Mar-2011 Glenn Kasten <gkasten@google.com> Merge "Bug 4099084 native window data locator" into honeycomb-mr1
02b00f099a69e1ed58ae901febb7e5c831ec14dd 16-Mar-2011 Jean-Michel Trivi <jmtrivi@google.com> am 632d1061: Merge "Bug 3329759 callback mask for TS streaming" into honeycomb-mr1

* commit '632d10616d5d20296d9ea32d4c94d2fc76926534':
Bug 3329759 callback mask for TS streaming
8dcbad0e3d219a28ad0755c77992fcdc74dc3168 16-Mar-2011 Glenn Kasten <gkasten@google.com> am 2e28af68: Bug 4099355 workaround gcc x86 problem

* commit '2e28af68bc8807958ba611c082a0a61691e76a2c':
Bug 4099355 workaround gcc x86 problem
a9a0940d9fc974b5f481bd7385874b3f170431b0 16-Mar-2011 Jean-Michel Trivi <jmtrivi@google.com> Merge "Bug 3329759 callback mask for TS streaming" into honeycomb-mr1
39310fca2e30101fa6e5168da443581cc60c20bf 16-Mar-2011 Glenn Kasten <gkasten@google.com> Bug 4099084 native window data locator

Change-Id: I03cac7501c3f185a2f95395b140b52b695081c4b
ndroid.mk
ata.c
bjects/CMediaPlayer.c
1c853a41d9d9886e60618a7c878ce3912f46bf3c 15-Mar-2011 Jean-Michel Trivi <jmtrivi@google.com> Bug 3329759 callback mask for TS streaming

- declare a "buffer event" item key and the event mask matching
the OpenSL ES 1.1 buffer queue event mask
- added a buffer state field in AdvancedBufferHeader to keep
track of the lifecycle of a buffer in the queue
- in StreamPlayer, store a constant to be sent as the item
each time a buffer is dequeued because it's been processed
- fix bug in playStream test app where after clearing the
queue, the data was read to the last dequeued buffer address,
rather than at the beginning of the cache.

Change-Id: I07141c8a913dfedeb9fde41d80afbce794ab7379
ndroid/android_StreamPlayer.cpp
ndroid/android_StreamPlayer.h
tf/IAndroidBufferQueue.c
tf/IEngine.c
tfstruct.h
les_allinclusive.h
2eac6c23b7bd8985e5bc842b9dec9fa3980dd100 15-Mar-2011 Glenn Kasten <gkasten@google.com> Bug 4099355 workaround gcc x86 problem

Change-Id: Ib9e2fc9eb58bef73772d8c617023f689b514e3a1
ndroid.mk
tf/IStreamInformation.c
tf/IStreamInformation.cpp
6ba7b990afa11726851c058565c465d3f53fd304 15-Mar-2011 Jean-Michel Trivi <jmtrivi@google.com> am 2b7f4d9d: Unbreak the x86 build

* commit '2b7f4d9d3e8f67b93b919f27082d1fd73d969c04':
Unbreak the x86 build
f925f794a1c2c460c9c8409612fa943e983bfb7d 15-Mar-2011 Jean-Michel Trivi <jmtrivi@google.com> Unbreak the x86 build

Looks like the x86 compiler does't like placement new. Commenting
out offending line until a proper fix (wrap Vector initialization
in another object) is implemented.

Change-Id: Id35cf7845e4fcb10536c2055263805dbf3cce65b
tf/IStreamInformation.c
6e0c1cc74aac0f9289df066f3fc7cc6aab954943 15-Mar-2011 Jean-Michel Trivi <jmtrivi@google.com> am fcc99629: Bug 3329759 Implement streamInformation and volume in OpenMAX AL

* commit 'fcc996296bdbf6c3949ad4312991fdde4ae2e157':
Bug 3329759 Implement streamInformation and volume in OpenMAX AL
37dc2fccf3f122b79ebd554de209d0a3c94ae161 09-Mar-2011 Jean-Michel Trivi <jmtrivi@google.com> Bug 3329759 Implement streamInformation and volume in OpenMAX AL

- Implement StreamInformation for video size notification.
- Implement the XAVolumeItf for volume control
- Fix bug in GUID -> MPH hash.
- Fixed typo in GenericPlayer::pause() log
- Do not signal a discontinuity automatically when the ABQ is
cleared because clearing the queue doesn't imply there will
be a discontinuity in the data (e.g. the same data that was
cleared could be reenqueued)
- In "native-media" test app: add test code to exercise the
XAVolumeItf functionality.

Change-Id: I9f69f8cacbdce51b6d96d60141ec1d0f645df991
PH.h
PH_to.c
penSLES_IID.c
ndroid/AudioPlayer_to_android.cpp
ndroid/MediaPlayer_to_android.cpp
ndroid/MediaPlayer_to_android.h
ndroid/android_AudioSfDecoder.cpp
ndroid/android_GenericMediaPlayer.cpp
ndroid/android_GenericMediaPlayer.h
ndroid/android_GenericPlayer.cpp
ndroid/android_GenericPlayer.h
ndroid/android_SfPlayer.cpp
ndroid/android_StreamPlayer.cpp
ndroid/android_defs.h
utogen/IID_to_MPH.c
utogen/MPH_to_3DGroup.h
utogen/MPH_to_AudioPlayer.h
utogen/MPH_to_AudioRecorder.h
utogen/MPH_to_Engine.h
utogen/MPH_to_LEDDevice.h
utogen/MPH_to_Listener.h
utogen/MPH_to_MediaPlayer.h
utogen/MPH_to_MetadataExtractor.h
utogen/MPH_to_MidiPlayer.h
utogen/MPH_to_OutputMix.h
utogen/MPH_to_Vibra.h
lasses.c
lasses.h
ata.h
nterfaces.c
tf/IAndroidBufferQueue.c
tf/IEngine.c
tf/IStreamInformation.c
tfstruct.h
ocks.c
les.c
les_allinclusive.h
f62485fd570f004d0e336e4c2624a935a4a284cc 14-Mar-2011 Iliyan Malchev <malchev@google.com> system/media: remove LOCAL_PRELINK_MODULE

Change-Id: I55942287d5789a6297ab16f4049f529cb9f9e56c
Signed-off-by: Iliyan Malchev <malchev@google.com>
ndroid.mk
e7bfcdc183454ec959ff51342f0973cabba219b2 08-Mar-2011 Jean-Michel Trivi <jmtrivi@google.com> Bug 3329759 Implement Clear() and GetState() for MPEG-2 TS

- implemented Clear() in AndroidBufferQueue
- declared and implemented GetState() in AndroidBufferQueue
- fixed typo in AudioPlayer_to_android.cpp that cause a "case"
to be compiled as a label (no unused label warning from
compiler)
- more test in sandbox/streamSource

Change-Id: If4eede16430cda943224bf950669cc105ac2f894
ndroid/AudioPlayer_to_android.cpp
ndroid/MediaPlayer_to_android.cpp
ndroid/MediaPlayer_to_android.h
ndroid/android_StreamPlayer.cpp
ndroid/android_StreamPlayer.h
tf/IAndroidBufferQueue.c
70c49ae2867094072a4365423417ea452bf82231 07-Mar-2011 Jean-Michel Trivi <jmtrivi@google.com> Bug 3329759 support commands in SLAndroidBufferQueueItf

Support for EOS, DISCONTINUITY, and DISCONTINUITY with
a PTS.

- in IAndroidBufferQueue structure, added buffer type
- modified AdvancedBufferHeader structure to have a buffer
type-specific structure that contains all the items for each
buffer
- added parsing of items when enqueueing a buffer
- enforce buffer size enqueue to be a multiple of MPEG-2 TS
block size for buffer of the corresponding types
- when enqueueing a buffer on an empty queue, implemented
an asynchronous notification on StreamPlayer to consume
the newly queued buffer. Verified this kicks off playback
after having starved the framework for buffers.
- report unknown duration when using AndroidBufferQueue

Change-Id: I9bde97a6c6ffca7d376b4963313b820b35f50a26
ndroid.mk
ndroid/AndroidBufferQueueSource.cpp
ndroid/AndroidBufferQueueSource.h
ndroid/AudioPlayer_to_android.cpp
ndroid/AudioPlayer_to_android.h
ndroid/MediaPlayer_to_android.cpp
ndroid/MediaPlayer_to_android.h
ndroid/android_GenericMediaPlayer.cpp
ndroid/android_GenericPlayer.cpp
ndroid/android_GenericPlayer.h
ndroid/android_StreamPlayer.cpp
ndroid/android_StreamPlayer.h
ndroid/android_defs.h
tf/IAndroidBufferQueue.c
tf/IEngine.c
tfstruct.h
ocks.c
les_allinclusive.h
ad1ab1d13a9b043202b9d5cdc1d8c4ef66cbbca8 05-Mar-2011 Glenn Kasten <gkasten@google.com> Bug 3329759 Surface texture as video sink

XA_DATALOCATOR_NATIVEDISPLAY now allows either a Surface or SurfaceTexture
together with a JNIEnv *.

Miscellaneous fixes:
- Clarify test button labels.
- Line length 100.
- Fix typos in XA_DATALOCATOR_ANDROIDFD and XA_DATALOCATOR_ANDROIDFD_USE_FILE_SIZE.

Change-Id: I3f3c604dfda3cf66ef7d7adc8689564a83623b2f
ndroid/MediaPlayer_to_android.cpp
ndroid/MediaPlayer_to_android.h
ndroid/android_GenericMediaPlayer.cpp
ndroid/android_GenericMediaPlayer.h
ata.c
bjects/CMediaPlayer.c
les.c
d158d31a6bbb06426b71c3d097b7768bc3fb79a3 04-Mar-2011 Jean-Michel Trivi <jmtrivi@google.com> Bug 3329759 TS streaming over SLAndroidBufferQueueItf

Modify the SLAndroidBufferQueueItf interface to offer a model
where buffers of data can be queued along with commands
(messages) when used for playback, or buffers of data can be
received along with metadata (messages)

changes:
- new callback and enqueue functions in SLAndroidBufferQueueItf
and XAAndroidBufferQueueItf.
- definition of a new struct, AdvancedBufferHeader, for
the buffers in the queue.
- decoupling of the "buffer available to be filled" from SF
and the call to the ABQ callback. Implemented in new
file AndroidBufferQueueSource.cpp
- source/sink checks and memory allocation when creating an
AudioPlayer or MediaPlayer that uses SLAndroidBufferQueueItf,
and verifying the data fed to the ABQ is declared as
SL_CONTAINERTYPE_MPEG_TS
- updated tests/native-media XA demo code, and
tests/sandbox/streamSource to use the new interface.

Change-Id: I48e44f346e718041d835fde51e349923fcc1f4b1
ndroid.mk
ndroid/AndroidBufferQueueSource.cpp
ndroid/AndroidBufferQueueSource.h
ndroid/AudioPlayer_to_android.cpp
ndroid/AudioPlayer_to_android.h
ndroid/MediaPlayer_to_android.cpp
ndroid/MediaPlayer_to_android.h
ndroid/android_StreamPlayer.cpp
ndroid/android_StreamPlayer.h
lasses.h
ata.c
ata.h
tf/IAndroidBufferQueue.c
tf/IBufferQueue.c
tf/IEngine.c
tf/IPlay.c
tfstruct.h
ocks.c
les.c
les_allinclusive.h
e1bdb40cf6e255a6a4a0e996d4236048c059ae4c 24-Feb-2011 Jean-Michel Trivi <jmtrivi@google.com> Merge "OpenMAX AL: consolidate MediaPlayer implementations under superclass"
68d56b8ebaf60184a3aef988e3d2b09ed8b88c05 24-Feb-2011 Jean-Michel Trivi <jmtrivi@google.com> OpenMAX AL: consolidate MediaPlayer implementations under superclass

The OpenMAX AL MediaPlayer object has two implementations: one
for playing from URI/FD (LocAVPlayer) and one for playing from
AndroidBufferQueue (StreamPlayer). They both inherit from AVPlayer.
This CL makes LocAVPlayer and StreamPlayer inherit from
GenericMediaPlayer (new name of AVPlayer) which encapsulates the
interaction with an android::MediaPlayer instance running in
the media server process.
Also it makes GenericMediaPlayer inherit from GenericPlayer, the
player superclass also used in OpenSL ES.

After this CL, the OpenMAX AL and OpenSL ES have a common class
hierarchy for their players.

Change-Id: I5f6e279fc29b7f6f26c9ed5c83a9455cfda88ff4
ndroid.mk
ndroid/AudioPlayer_to_android.cpp
ndroid/MediaPlayer_to_android.cpp
ndroid/MediaPlayer_to_android.h
ndroid/android_AVPlayer.cpp
ndroid/android_AVPlayer.h
ndroid/android_GenericMediaPlayer.cpp
ndroid/android_GenericMediaPlayer.h
ndroid/android_LocAVPlayer.cpp
ndroid/android_LocAVPlayer.h
ndroid/android_SfPlayer.cpp
ndroid/android_StreamPlayer.cpp
ndroid/android_StreamPlayer.h
lasses.h
tf/IEngine.c
ocks.c
bjects/CMediaPlayer.c
les_allinclusive.h
974beb3f585025e4666f0ea1cc5b13eb49975082 23-Feb-2011 Glenn Kasten <gkasten@google.com> Bug 3266825 partial fix

This was a copy/paste bug that caused AddInterface to corrupt the v-table.

Change-Id: I93cd8d58c2a95d1dd9e9f139bc9f4a73d96351ed
tf/IDynamicInterfaceManagement.c
93ac9bd4f7722c50dc9882ff74bade233860a940 14-Feb-2011 Jean-Michel Trivi <jmtrivi@google.com> Report an error when the data source can't be created.

Check the value returned by DataSource::CreateFromURI(uri)

Change-Id: Ia94b18b09c68d1e8bf90d2f1a099319d5f5e565e
ndroid/android_AudioSfDecoder.cpp
13837cf3f7be0eb8b1a9552bd99a89f98c987720 01-Feb-2011 Jean-Michel Trivi <jmtrivi@google.com> OpenSL ES: support decode to PCM buffer queue

Created a new audio player class, APlayer, from which we derive
subclasses to encapsulate OpenSL ES AudioPlayer implementations:
- ASfPlayer derives from APlayer and encapsulates StageFright
functionality for audio decoding to a buffer
- ADecoder derives from ASfPlayer and encapsulates rendering
the decoded audio data to a callback function. It interfaces
with the OpenSL ES Buffer Queue interface to pass the decoded
data back to an OpenSL ES application.

For OpenSL ES, to support decoding to a Buffer Queue, we now
allow an AudioPlayer to have its sink be a PCM buffer queue.

Change-Id: I9aefeb0375a71f7ca770c5c62b4fb8faf59c9c23
ndroid.mk
ndroid/AudioPlayer_to_android.cpp
ndroid/android_AVPlayer.cpp
ndroid/android_AVPlayer.h
ndroid/android_AudioSfDecoder.cpp
ndroid/android_AudioSfDecoder.h
ndroid/android_AudioToCbRenderer.cpp
ndroid/android_AudioToCbRenderer.h
ndroid/android_GenericPlayer.cpp
ndroid/android_GenericPlayer.h
ndroid/android_SfPlayer.cpp
ndroid/android_SfPlayer.h
ndroid/android_StreamPlayer.cpp
ndroid/android_StreamPlayer.h
ndroid/android_defs.h
ndroid/android_prompts.h
lasses.h
ata.c
tf/IEngine.c
bjects/CAudioPlayer.c
les_allinclusive.h
4e1412ba1d9e74e51a01d34b1c588166d68e4332 25-Jan-2011 Glenn Kasten <gkasten@google.com> Bug 3388299 Fix stack buffer overrun

Change-Id: I22bf369b42faf04ef5bdc7ca8ebca3d31add2ad6
ndroid/android_Effect.cpp
2d427f091ef1cf6c1694e3ee5f3521166502a7b1 19-Jan-2011 Glenn Kasten <gkasten@google.com> am 50bccde0: Rename class__ to clazz, this to thiz

* commit '50bccde01980ae803b8656e8b08ecacb65540f50':
Rename class__ to clazz, this to thiz
bcc5c7225e3b7a1dbf2e9e830987f69167acf06f 18-Jan-2011 Glenn Kasten <gkasten@google.com> Rename class__ to clazz, this to thiz

The JNI naming conventions avoid conflict with C++ reserved words.

Change-Id: I93ad6920bf78c0a02ac4b2650a29c9e11252f731
ndroid/android_AVPlayer.cpp
ndroid/android_LocAVPlayer.cpp
ndroid/android_SfPlayer.cpp
ndroid/android_StreamPlayer.cpp
ata.c
ata.h
esktop/OutputMixExt.h
esktop/SLSndFile.h
esktop/SndFile.c
ntry.c
tf/I3DCommit.c
tf/I3DDoppler.c
tf/I3DGrouping.c
tf/I3DLocation.c
tf/I3DMacroscopic.c
tf/I3DSource.c
tf/IAndroidBufferQueue.c
tf/IAndroidConfiguration.c
tf/IAndroidEffect.cpp
tf/IAndroidEffectCapabilities.c
tf/IAndroidEffectSend.c
tf/IAudioDecoderCapabilities.c
tf/IAudioEncoder.c
tf/IAudioEncoderCapabilities.c
tf/IAudioIODeviceCapabilities.c
tf/IBassBoost.c
tf/IBufferQueue.c
tf/IDeviceVolume.c
tf/IDynamicInterfaceManagement.c
tf/IDynamicSource.c
tf/IEffectSend.c
tf/IEngine.c
tf/IEngineCapabilities.c
tf/IEnvironmentalReverb.c
tf/IEqualizer.c
tf/ILEDArray.c
tf/IMIDIMessage.c
tf/IMIDIMuteSolo.c
tf/IMIDITempo.c
tf/IMIDITime.c
tf/IMetadataExtraction.c
tf/IMetadataTraversal.c
tf/IMuteSolo.c
tf/IObject.c
tf/IOutputMix.c
tf/IOutputMixExt.c
tf/IPitch.c
tf/IPlay.c
tf/IPlaybackRate.c
tf/IPrefetchStatus.c
tf/IPresetReverb.c
tf/IRatePitch.c
tf/IRecord.c
tf/ISeek.c
tf/IStreamInformation.c
tf/IThreadSync.c
tf/IVibra.c
tf/IVirtualizer.c
tf/IVisualization.c
tf/IVolume.c
ocks.c
ocks.h
bjects/C3DGroup.c
bjects/CAudioPlayer.c
bjects/CAudioRecorder.c
bjects/CEngine.c
bjects/CMediaPlayer.c
bjects/COutputMix.c
les.c
les_allinclusive.h
ync.c
43c05e200048d0ecbf5c9b0b450002471b6982d7 19-Jan-2011 Glenn Kasten <gkasten@google.com> am 7110872a: Merge "Replace obsolete comment" into honeycomb

* commit '7110872a4d1fa5b7be18b3529523a7fd91f3cc58':
Replace obsolete comment
8f3e6067ad19fd61925f26dd8185b853986226df 19-Jan-2011 Glenn Kasten <gkasten@google.com> am ce2466b3: Merge "JNI is obsolete" into honeycomb

* commit 'ce2466b32a38c3a4cd54e5f05b69c650cb719525':
JNI is obsolete
c4af4961ac7c29df9afdbe111c782e530cab3ce4 19-Jan-2011 Bryan Mawhinney <bryanmawhinney@google.com> am 7672988d: Minor API change in NuCachedSource2

* commit '7672988d52b27a5c6579543efd48a564e0c459d8':
Minor API change in NuCachedSource2
4614db004f8992f7d710cb8d47550f66bce0a9d2 18-Jan-2011 Glenn Kasten <gkasten@google.com> Merge "Replace obsolete comment" into honeycomb
ff670d117cff8462a05f15b4bcc2031f00c88148 18-Jan-2011 Glenn Kasten <gkasten@google.com> Merge "JNI is obsolete" into honeycomb
cfc9374b5957ffa056e9cc0ae9beb164c64bdce0 18-Jan-2011 Glenn Kasten <gkasten@google.com> JNI is obsolete

Change-Id: Ic89b9b8875af6ce13cd96d8c0c944e8878805093
ndroid.mk
bjects/CMediaPlayer.c
00076e55f1cd719866004237f1603e5403e215ab 18-Jan-2011 Glenn Kasten <gkasten@google.com> Replace obsolete comment

Change-Id: I9eb825ece4562d1af742f0851da77c5c9811fe17
PH_to.c
33381582280416166c8d0242deb8cdad7a5882dd 18-Jan-2011 Bryan Mawhinney <bryanmawhinney@google.com> Minor API change in NuCachedSource2

approxDataRemaining now returns more info about the stream status.

Change-Id: I5549edb3765eb07fcfa5340b8755263e0e0ee196
ndroid/android_SfPlayer.cpp
70a060e1bbeeeb742a5f58cd9436f9a059be6dff 17-Jan-2011 Glenn Kasten <gkasten@google.com> am cd087fad: This bug caught in code review (not used yet)

* commit 'cd087fadb8876b06f160f77938c30dbf58c8b21b':
This bug caught in code review (not used yet)
eec920e375c5c4b7ea6e8f2e32547c37d45c0758 17-Jan-2011 Glenn Kasten <gkasten@google.com> am 2eccd4f7: Merge "SMP safety: can\'t peek/poke without a barrier" into honeycomb

* commit '2eccd4f74f1cdaa1eb9bdaef849bfbbf9f1fe810':
SMP safety: can't peek/poke without a barrier
f8538070773917e7f84c2ea54803b3e18e093459 17-Jan-2011 Glenn Kasten <gkasten@google.com> am 7252d851: Merge "Re-build the autogen files" into honeycomb

* commit '7252d851cf25973dea25e7c4695ffdb2b76ba508':
Re-build the autogen files
d754f64b2974640fba1dcef9440615b7901e741e 17-Jan-2011 Glenn Kasten <gkasten@google.com> am 01a4e4fc: Bug 3360707

* commit '01a4e4fc58aa22b1381e370c745ea26bca56dad1':
Bug 3360707
86f60279e18a4b8db0c8055ef9c7568456acac60 16-Jan-2011 Glenn Kasten <gkasten@google.com> This bug caught in code review (not used yet)

Change-Id: I544447d7a91909258a7d43da1e42e1c98b638c19
tf/IVibra.c
a4ddda6136a851036df28ae9b160e63d26adedf5 16-Jan-2011 Glenn Kasten <gkasten@google.com> Merge "SMP safety: can't peek/poke without a barrier" into honeycomb
2b80a23b869a28396711a32d60afa992bdbd8984 16-Jan-2011 Glenn Kasten <gkasten@google.com> Merge "Re-build the autogen files" into honeycomb
8ca039e1f9d95f8b14a59e135426882e3470e9d9 16-Jan-2011 Glenn Kasten <gkasten@google.com> Re-build the autogen files

Change-Id: Ifd6f97a61168833ae34e8df8f6a6a79df9a9bcd5
utogen/IID_to_MPH.c
utogen/MPH_to_3DGroup.h
utogen/MPH_to_AudioPlayer.h
utogen/MPH_to_AudioRecorder.h
utogen/MPH_to_Engine.h
utogen/MPH_to_LEDDevice.h
utogen/MPH_to_Listener.h
utogen/MPH_to_MediaPlayer.h
utogen/MPH_to_MetadataExtractor.h
utogen/MPH_to_MidiPlayer.h
utogen/MPH_to_OutputMix.h
utogen/MPH_to_Vibra.h
nterfaces.c
5c8bd83295b2752bb7ac34f83dfb19dcdb1be5e5 16-Jan-2011 Glenn Kasten <gkasten@google.com> SMP safety: can't peek/poke without a barrier

Change-Id: I97a78322b7b93440ad989b7a6aef4ba3c48a2b7f
tf/IAndroidEffectCapabilities.c
ocks.h
bjects/CEngine.c
b4b857ba9ede4cd0f7185c50d34217b06182ee7b 16-Jan-2011 Glenn Kasten <gkasten@google.com> Bug 3360707

Change-Id: I4a021ba7fa1f3807a658ee1336bf32b9d6728f3e
tf/IAndroidEffectSend.c
105e1b828063c07e000e642d225881bdcd93f4de 13-Jan-2011 Glenn Kasten <gkasten@google.com> Update SDK level on master branch only

Change-Id: I15f5976ba656673112f2d1ab006fe417a4fccd22
tf/IEngine.c
e648adb1eb6022663b3a695710b036bc92dae111 13-Jan-2011 Glenn Kasten <gkasten@google.com> Merge "Make symlink for libOpenMAXAL.so" into honeycomb
64e0e9fcadaa738d7145c07c20c67d123e4e7cda 13-Jan-2011 Glenn Kasten <gkasten@google.com> Make symlink for libOpenMAXAL.so

Change-Id: I06cb66a30a1a543d2c6f7b93428d29d1b90edb2a
ndroid.mk
b2aeb0f1009555181dabb944fe05901cb6e6f632 12-Jan-2011 Jean-Michel Trivi <jmtrivi@google.com> More file renames and header inclusion reorder

More file renames and include reordering to separate Android
classes, and the mapping of the C OpenSL ES and OpenMAX AL
function calls to the Android implementation.

Change-Id: Id6f63af80bd581ed9cab495e2c11a86589ecf6c9
ndroid.mk
ndroid/AudioPlayer_to_android.cpp
ndroid/AudioPlayer_to_android.h
ndroid/AudioRecorder_to_android.cpp
ndroid/AudioRecorder_to_android.h
ndroid/MediaPlayer_to_android.cpp
ndroid/MediaPlayer_to_android.h
ndroid/OutputMix_to_android.cpp
ndroid/OutputMix_to_android.h
ndroid/android_AudioPlayer.cpp
ndroid/android_AudioPlayer.h
ndroid/android_AudioRecorder.cpp
ndroid/android_AudioRecorder.h
ndroid/android_OutputMix.cpp
ndroid/android_OutputMix.h
ndroid/android_Player.cpp
ndroid/android_Player.h
ndroid/android_defs.h
lasses.h
les_allinclusive.h
262059f71a68edc5e510427c63f5f1623d3672a8 12-Jan-2011 Glenn Kasten <gkasten@google.com> Directory re-organization

Change-Id: I8e3f12a22e765d36ddefd87edf204735b25474f6
ndroid.mk
PH.h
PH_to.c
PH_to.h
penSLES_IID.c
EADME.txt
hreadPool.c
hreadPool.h
ndroid/android_AVPlayer.cpp
ndroid/android_AVPlayer.h
ndroid/android_AudioPlayer.cpp
ndroid/android_AudioPlayer.h
ndroid/android_AudioRecorder.cpp
ndroid/android_AudioRecorder.h
ndroid/android_Effect.cpp
ndroid/android_Effect.h
ndroid/android_LocAVPlayer.cpp
ndroid/android_LocAVPlayer.h
ndroid/android_OutputMix.cpp
ndroid/android_OutputMix.h
ndroid/android_Player.cpp
ndroid/android_Player.h
ndroid/android_SfPlayer.cpp
ndroid/android_SfPlayer.h
ndroid/android_StreamPlayer.cpp
ndroid/android_StreamPlayer.h
ndroid/android_defs.h
ndroid/android_prompts.h
ndroid/android_sles_conversions.h
utogen/IID_to_MPH.c
utogen/MPH_to_3DGroup.h
utogen/MPH_to_AudioPlayer.h
utogen/MPH_to_AudioRecorder.h
utogen/MPH_to_Engine.h
utogen/MPH_to_LEDDevice.h
utogen/MPH_to_Listener.h
utogen/MPH_to_MediaPlayer.h
utogen/MPH_to_MetadataExtractor.h
utogen/MPH_to_MidiPlayer.h
utogen/MPH_to_OutputMix.h
utogen/MPH_to_Vibra.h
lasses.c
lasses.h
ata.c
ata.h
esktop/OutputMixExt.h
esktop/SDL.c
esktop/SLSndFile.h
esktop/SndFile.c
evices.c
evices.h
ntry.c
nterfaces.c
tf/I3DCommit.c
tf/I3DDoppler.c
tf/I3DGrouping.c
tf/I3DLocation.c
tf/I3DMacroscopic.c
tf/I3DSource.c
tf/IAndroidBufferQueue.c
tf/IAndroidConfiguration.c
tf/IAndroidEffect.cpp
tf/IAndroidEffectCapabilities.c
tf/IAndroidEffectSend.c
tf/IAudioDecoderCapabilities.c
tf/IAudioEncoder.c
tf/IAudioEncoderCapabilities.c
tf/IAudioIODeviceCapabilities.c
tf/IBassBoost.c
tf/IBufferQueue.c
tf/IDeviceVolume.c
tf/IDynamicInterfaceManagement.c
tf/IDynamicSource.c
tf/IEffectSend.c
tf/IEngine.c
tf/IEngineCapabilities.c
tf/IEnvironmentalReverb.c
tf/IEqualizer.c
tf/ILEDArray.c
tf/IMIDIMessage.c
tf/IMIDIMuteSolo.c
tf/IMIDITempo.c
tf/IMIDITime.c
tf/IMetadataExtraction.c
tf/IMetadataTraversal.c
tf/IMuteSolo.c
tf/IObject.c
tf/IOutputMix.c
tf/IOutputMixExt.c
tf/IPitch.c
tf/IPlay.c
tf/IPlaybackRate.c
tf/IPrefetchStatus.c
tf/IPresetReverb.c
tf/IRatePitch.c
tf/IRecord.c
tf/ISeek.c
tf/IStreamInformation.c
tf/IThreadSync.c
tf/IVibra.c
tf/IVirtualizer.c
tf/IVisualization.c
tf/IVolume.c
tfstruct.h
ocks.c
ocks.h
bjects/C3DGroup.c
bjects/CAudioPlayer.c
bjects/CAudioRecorder.c
bjects/CEngine.c
bjects/CMediaPlayer.c
bjects/COutputMix.c
latform.h
les.c
les_allinclusive.h
llog.c
llog.h
ync.c
race.c
race.h
t/OpenSLESUT.c
t/OpenSLESUT.h
t/slesutResult.c