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
/frameworks/wilhelm/src/android/AudioPlayer_to_android.h
|
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
/frameworks/wilhelm/src/android/AudioPlayer_to_android.h
|
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
/frameworks/wilhelm/src/android/AudioPlayer_to_android.h
|
bcfe680db1e392f3bb29382c2e15e89c3af783ed |
|
22-Aug-2011 |
Glenn Kasten <gkasten@google.com> |
Bug 5198051 MediaPlayer PLAYEVENT_HEAD* callbacks Change-Id: Ibb04fbf727997281bb77fd22c51cd90bd044e505
/frameworks/wilhelm/src/android/AudioPlayer_to_android.h
|
e3f648ad6e3634680452b639ee802c657fbfa73d |
|
14-Aug-2011 |
Jean-Michel Trivi <jmtrivi@google.com> |
Merge "AAC buffer decode to PCM buffer queue"
|
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
/frameworks/wilhelm/src/android/AudioPlayer_to_android.h
|
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
/frameworks/wilhelm/src/android/AudioPlayer_to_android.h
|
fa2bd93c3a9852a1f879663eeff598d13cf8fa81 |
|
25-Jul-2011 |
Glenn Kasten <gkasten@google.com> |
Bug 4599730 fix mute solo, channel count, volume Change-Id: I1624c744168233c4ef79f2cd3090447b8aa7d53b
/frameworks/wilhelm/src/android/AudioPlayer_to_android.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
/frameworks/wilhelm/src/android/AudioPlayer_to_android.h
|
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
/frameworks/wilhelm/src/android/AudioPlayer_to_android.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
/frameworks/wilhelm/src/android/AudioPlayer_to_android.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
/frameworks/wilhelm/src/android/AudioPlayer_to_android.h
|
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
/frameworks/wilhelm/src/android/AudioPlayer_to_android.h
|
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
/frameworks/wilhelm/src/android/AudioPlayer_to_android.h
|
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
/frameworks/wilhelm/src/android/AudioPlayer_to_android.h
|