History log of /frameworks/wilhelm/src/classes.h
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
213c31153b9bda7b5a091f2996da7b655c8ed451 08-Mar-2016 Glenn Kasten <gkasten@google.com> Use audio_session_t consistently

Bug: 27562099
Change-Id: Ie04efb44923fdd2f034b771157fa30dababdfb58
10d8b6a5f9a7c24203e3ee228ec596d03c1aa78d 01-Mar-2016 Glenn Kasten <gkasten@google.com> Single definition of USE_DEBUG in Configuration.h

Bug: 27423077
Change-Id: I75cf9e7d6dd6134fe5b818951fd23353e16c7656
680943a4c349712f641b7577e5b0a3fdf49e39d9 16-Dec-2015 Glenn Kasten <gkasten@google.com> Use FCC_2 and FCC_8 to highlight channel count assumptions

Bug: 21656069
Change-Id: I82db40a77e6af507af4b02e732b99f61d02e51b8
ba0b2c989ecbbae4678903954a4629ef342e1089 09-Jun-2015 Glenn Kasten <gkasten@google.com> Add FCC_8 comments to indicate 8-channel assumptions

Bug: 21656069
Change-Id: I411a5c83eec126bc6cda796bd4c9f842ed6ee762
460bdad43aaec3c6ffe7f259719e00807742ad6d 24-Apr-2014 Glenn Kasten <gkasten@google.com> Audio recorder missing a callback protector

Bug: 14291968
Change-Id: I620d5e82f58e57e87097984a649b5c3a25c42963
1580f7ab4e02ed2881ac7cdeab2044e990f2e9e6 28-May-2014 Glenn Kasten <gkasten@google.com> Fix regression in AudioRecorder

Interfaces were out of order

Change-Id: I027dc9d8ed93514d93a5b05063a8711b9841aaf4
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
e5ede1a139fcedbf075675179d919fbe731898f0 13-Jun-2013 Glenn Kasten <gkasten@google.com> AudioRecord must be used as sp<> only

Bug: 9423855
Change-Id: Icc37559082f6c6c7052ac03a835a3d2c6732af59
adf8bd5d4360542b6b6c48c4471fdd8d855e05cc 24-Jan-2012 Glenn Kasten <gkasten@google.com> Use audio_source_t consistently

Use audio_source_t instead of int.

Change-Id: I88256ee508b8f5b50635985361efa7c458f11296
0bfed90f3b312f7c8f2b744efcf62f1992661d6c 06-Jan-2012 Glenn Kasten <gkasten@google.com> Use audio_stream_type_t consistently

Change-Id: I6c02c9b285a00cefefc5d90d655d92ca8690765a
ae1a5c8dc1fccf7c121eda830f8d23bd094c0f16 15-Nov-2011 Glenn Kasten <gkasten@google.com> Remove AudioTrackProxy since AudioTrack is RefBase

Change-Id: I4a1f755178699e0fdedf58e1f3cbd82e6067e071
3ac5dcc05fe321e4f01918aef2e3e54e22c9a5c1 17-Sep-2011 Glenn Kasten <gkasten@google.com> Remove dead code

AudioPlayback_Parameters fields trackcb and trackcbUser
GenericPlayer field mLooperPriority
IAndroidBufferQueue does not support AudioRecorder object
android/BufferQueueSource.h #include

Change-Id: I9d7cef243167e10279df452e7c62e66d8f5fe3b6
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
- 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
c623c89c0a32c5fc77c998f1742d58e7be69e8c1 22-Aug-2011 Glenn Kasten <gkasten@google.com> Bug 5198051 MediaPlayer prefetch status interface

Change-Id: I426c870f803df0a7052f17be955ba797a814b4cc
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
99b927751677abfb60a388d65dfeed1fed1db12c 28-Jul-2011 Glenn Kasten <gkasten@google.com> Bug 5080320 MediaPlayer volume

- 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
fa2bd93c3a9852a1f879663eeff598d13cf8fa81 25-Jul-2011 Glenn Kasten <gkasten@google.com> Bug 4599730 fix mute solo, channel count, volume

Change-Id: I1624c744168233c4ef79f2cd3090447b8aa7d53b
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

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

Change-Id: Iff6a42542c1db67ca1dcf539449ca96aa5944f6d
1a9c2615d0933d183fcb1b9e34ec8f0da2a85153 07-Jul-2011 Glenn Kasten <gkasten@google.com> Rename ANDROID_UNKNOWN_* to UNKNOWN_*

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

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

Change-Id: Ib1a05ee57f78432eb4c9d3a5bd68dd31a78d6e3e
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

The fix consists in:
- flagging all callback with the CallbackProtector
- 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
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
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
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:

Support for those features will be reintegrated in subsequent CLs.

Change-Id: I8d7f6ea006eb7b876ef1ca1909d74b4517335850
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
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
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
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
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)

- 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
- updated tests/native-media XA demo code, and
tests/sandbox/streamSource to use the new interface.

Change-Id: I48e44f346e718041d835fde51e349923fcc1f4b1
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
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
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
262059f71a68edc5e510427c63f5f1623d3672a8 12-Jan-2011 Glenn Kasten <gkasten@google.com> Directory re-organization

Change-Id: I8e3f12a22e765d36ddefd87edf204735b25474f6