Lines Matching refs:thiz
31 IPlay *thiz = (IPlay *) self; in IPlay_SetPlayState() local
35 CAudioPlayer *audioPlayer = (SL_OBJECTID_AUDIOPLAYER == InterfaceToObjectID(thiz)) ? in IPlay_SetPlayState()
36 (CAudioPlayer *) thiz->mThis : NULL; in IPlay_SetPlayState()
38 interface_lock_exclusive(thiz); in IPlay_SetPlayState()
39 SLuint32 oldState = thiz->mState; in IPlay_SetPlayState()
42 for (;; interface_cond_wait(thiz)) { in IPlay_SetPlayState()
69 thiz->mState = state; in IPlay_SetPlayState()
84 thiz->mState = SL_PLAYSTATE_STOPPING; in IPlay_SetPlayState()
99 thiz->mState = state; in IPlay_SetPlayState()
105 interface_unlock_exclusive_attributes(thiz, attr); in IPlay_SetPlayState()
124 IPlay *thiz = (IPlay *) self; in IPlay_GetPlayState() local
125 interface_lock_shared(thiz); in IPlay_GetPlayState()
126 SLuint32 state = thiz->mState; in IPlay_GetPlayState()
127 interface_unlock_shared(thiz); in IPlay_GetPlayState()
160 IPlay *thiz = (IPlay *) self; in IPlay_GetDuration() local
162 interface_lock_exclusive(thiz); in IPlay_GetDuration()
163 SLmillisecond duration = thiz->mDuration; in IPlay_GetDuration()
167 switch (InterfaceToObjectID(thiz)) { in IPlay_GetDuration()
169 result = android_audioPlayer_getDuration(thiz, &temp); in IPlay_GetDuration()
172 result = android_Player_getDuration(thiz, &temp); in IPlay_GetDuration()
180 thiz->mDuration = duration; in IPlay_GetDuration()
187 interface_unlock_exclusive(thiz); in IPlay_GetDuration()
202 IPlay *thiz = (IPlay *) self; in IPlay_GetPosition() local
204 interface_lock_shared(thiz); in IPlay_GetPosition()
208 switch (IObjectToObjectID((thiz)->mThis)) { in IPlay_GetPosition()
210 android_audioPlayer_getPosition(thiz, &position); in IPlay_GetPosition()
213 android_Player_getPosition(thiz, &position); in IPlay_GetPosition()
221 position = thiz->mPosition; in IPlay_GetPosition()
223 if (SL_OBJECTID_AUDIOPLAYER == InterfaceToObjectID(thiz)) { in IPlay_GetPosition()
224 CAudioPlayer *audioPlayer = (CAudioPlayer *) thiz->mThis; in IPlay_GetPosition()
231 interface_unlock_shared(thiz); in IPlay_GetPosition()
244 IPlay *thiz = (IPlay *) self; in IPlay_RegisterCallback() local
245 interface_lock_exclusive(thiz); in IPlay_RegisterCallback()
246 thiz->mCallback = callback; in IPlay_RegisterCallback()
247 thiz->mContext = pContext; in IPlay_RegisterCallback()
249 interface_unlock_exclusive(thiz); in IPlay_RegisterCallback()
264 IPlay *thiz = (IPlay *) self; in IPlay_SetCallbackEventsMask() local
265 interface_lock_exclusive(thiz); in IPlay_SetCallbackEventsMask()
266 if (thiz->mEventFlags != eventFlags) { in IPlay_SetCallbackEventsMask()
269 if (!(thiz->mEventFlags & SL_PLAYEVENT_HEADATNEWPOS) && in IPlay_SetCallbackEventsMask()
271 thiz->mFramesSincePositionUpdate = 0; in IPlay_SetCallbackEventsMask()
274 thiz->mEventFlags = eventFlags; in IPlay_SetCallbackEventsMask()
275 interface_unlock_exclusive_attributes(thiz, ATTR_TRANSPORT); in IPlay_SetCallbackEventsMask()
277 interface_unlock_exclusive(thiz); in IPlay_SetCallbackEventsMask()
293 IPlay *thiz = (IPlay *) self; in IPlay_GetCallbackEventsMask() local
294 interface_lock_shared(thiz); in IPlay_GetCallbackEventsMask()
295 SLuint32 eventFlags = thiz->mEventFlags; in IPlay_GetCallbackEventsMask()
296 interface_unlock_shared(thiz); in IPlay_GetCallbackEventsMask()
312 IPlay *thiz = (IPlay *) self; in IPlay_SetMarkerPosition() local
314 interface_lock_exclusive(thiz); in IPlay_SetMarkerPosition()
315 if (thiz->mMarkerPosition != mSec) { in IPlay_SetMarkerPosition()
316 thiz->mMarkerPosition = mSec; in IPlay_SetMarkerPosition()
317 if (thiz->mEventFlags & SL_PLAYEVENT_HEADATMARKER) { in IPlay_SetMarkerPosition()
322 interface_unlock_exclusive_attributes(thiz, ATTR_TRANSPORT); in IPlay_SetMarkerPosition()
324 interface_unlock_exclusive(thiz); in IPlay_SetMarkerPosition()
337 IPlay *thiz = (IPlay *) self; in IPlay_ClearMarkerPosition() local
339 interface_lock_exclusive(thiz); in IPlay_ClearMarkerPosition()
341 if (thiz->mMarkerPosition != SL_TIME_UNKNOWN) { in IPlay_ClearMarkerPosition()
342 thiz->mMarkerPosition = SL_TIME_UNKNOWN; in IPlay_ClearMarkerPosition()
343 if (thiz->mEventFlags & SL_PLAYEVENT_HEADATMARKER) { in IPlay_ClearMarkerPosition()
348 interface_unlock_exclusive_attributes(thiz, ATTR_TRANSPORT); in IPlay_ClearMarkerPosition()
350 interface_unlock_exclusive(thiz); in IPlay_ClearMarkerPosition()
365 IPlay *thiz = (IPlay *) self; in IPlay_GetMarkerPosition() local
366 interface_lock_shared(thiz); in IPlay_GetMarkerPosition()
367 SLmillisecond markerPosition = thiz->mMarkerPosition; in IPlay_GetMarkerPosition()
368 interface_unlock_shared(thiz); in IPlay_GetMarkerPosition()
388 IPlay *thiz = (IPlay *) self; in IPlay_SetPositionUpdatePeriod() local
390 interface_lock_exclusive(thiz); in IPlay_SetPositionUpdatePeriod()
391 if (thiz->mPositionUpdatePeriod != mSec) { in IPlay_SetPositionUpdatePeriod()
392 thiz->mPositionUpdatePeriod = mSec; in IPlay_SetPositionUpdatePeriod()
394 if (SL_OBJECTID_AUDIOPLAYER == InterfaceToObjectID(thiz)) { in IPlay_SetPositionUpdatePeriod()
395 CAudioPlayer *audioPlayer = (CAudioPlayer *) thiz->mThis; in IPlay_SetPositionUpdatePeriod()
401 thiz->mFrameUpdatePeriod = frameUpdatePeriod; in IPlay_SetPositionUpdatePeriod()
403 thiz->mFramesSincePositionUpdate = 0; in IPlay_SetPositionUpdatePeriod()
406 if (thiz->mEventFlags & SL_PLAYEVENT_HEADATNEWPOS) { in IPlay_SetPositionUpdatePeriod()
411 interface_unlock_exclusive_attributes(thiz, ATTR_TRANSPORT); in IPlay_SetPositionUpdatePeriod()
413 interface_unlock_exclusive(thiz); in IPlay_SetPositionUpdatePeriod()
429 IPlay *thiz = (IPlay *) self; in IPlay_GetPositionUpdatePeriod() local
430 interface_lock_shared(thiz); in IPlay_GetPositionUpdatePeriod()
431 SLmillisecond positionUpdatePeriod = thiz->mPositionUpdatePeriod; in IPlay_GetPositionUpdatePeriod()
432 interface_unlock_shared(thiz); in IPlay_GetPositionUpdatePeriod()
458 IPlay *thiz = (IPlay *) self; in IPlay_init() local
459 thiz->mItf = &IPlay_Itf; in IPlay_init()
460 thiz->mState = SL_PLAYSTATE_STOPPED; in IPlay_init()
461 thiz->mDuration = SL_TIME_UNKNOWN; // will be set by containing player object in IPlay_init()
462 thiz->mPosition = (SLmillisecond) 0; in IPlay_init()
463 thiz->mCallback = NULL; in IPlay_init()
464 thiz->mContext = NULL; in IPlay_init()
465 thiz->mEventFlags = 0; in IPlay_init()
466 thiz->mMarkerPosition = SL_TIME_UNKNOWN; in IPlay_init()
467 thiz->mPositionUpdatePeriod = 1000; // per spec in IPlay_init()
469 thiz->mFrameUpdatePeriod = 0; // because we don't know the sample rate yet in IPlay_init()
470 thiz->mLastSeekPosition = 0; in IPlay_init()
471 thiz->mFramesSinceLastSeek = 0; in IPlay_init()
472 thiz->mFramesSincePositionUpdate = 0; in IPlay_init()