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
/frameworks/wilhelm/src/attr.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/attr.h
|
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
/frameworks/wilhelm/src/attr.h
|