Lines Matching refs:thiz

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