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
/frameworks/wilhelm/src/android/android_AudioToCbRenderer.cpp
|
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
/frameworks/wilhelm/src/android/android_AudioToCbRenderer.cpp
|
c0a40f3efef1706f861777ff68003fe344730055 |
|
28-Sep-2011 |
Glenn Kasten <gkasten@google.com> |
Remove dead code Change-Id: Ic68d4d7b942ef99120ad30ee3ef7ce48ff1d697a
/frameworks/wilhelm/src/android/android_AudioToCbRenderer.cpp
|
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
/frameworks/wilhelm/src/android/android_AudioToCbRenderer.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
/frameworks/wilhelm/src/android/android_AudioToCbRenderer.cpp
|
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
/frameworks/wilhelm/src/android/android_AudioToCbRenderer.cpp
|
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
/frameworks/wilhelm/src/android/android_AudioToCbRenderer.cpp
|
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/android_AudioToCbRenderer.cpp
|
a8179ea15c4ff78db589d742b135649f0eda7ef2 |
|
13-Apr-2011 |
Glenn Kasten <gkasten@google.com> |
Fix build warnings caused by the 'long' change Change-Id: I34e74d723ae7fd829dd140614928d7880e669f03
/frameworks/wilhelm/src/android/android_AudioToCbRenderer.cpp
|
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/android_AudioToCbRenderer.cpp
|
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
/frameworks/wilhelm/src/android/android_AudioToCbRenderer.cpp
|
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
/frameworks/wilhelm/src/android/android_AudioToCbRenderer.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
/frameworks/wilhelm/src/android/android_AudioToCbRenderer.cpp
|