Lines Matching refs:thiz

26 static SLuint32 getAssociatedState(IBufferQueue *thiz)  in getAssociatedState()  argument
29 switch (InterfaceToObjectID(thiz)) { in getAssociatedState()
31 state = ((CAudioPlayer *) thiz->mThis)->mPlay.mState; in getAssociatedState()
34 state = ((CAudioRecorder *) thiz->mThis)->mRecord.mState; in getAssociatedState()
55 IBufferQueue *thiz = (IBufferQueue *) self; in IBufferQueue_Enqueue() local
56 interface_lock_exclusive(thiz); in IBufferQueue_Enqueue()
57 BufferHeader *oldRear = thiz->mRear, *newRear; in IBufferQueue_Enqueue()
58 if ((newRear = oldRear + 1) == &thiz->mArray[thiz->mNumBuffers + 1]) { in IBufferQueue_Enqueue()
59 newRear = thiz->mArray; in IBufferQueue_Enqueue()
61 if (newRear == thiz->mFront) { in IBufferQueue_Enqueue()
66 thiz->mRear = newRear; in IBufferQueue_Enqueue()
67 ++thiz->mState.count; in IBufferQueue_Enqueue()
71 interface_unlock_exclusive_attributes(thiz, ((SL_RESULT_SUCCESS == result) && in IBufferQueue_Enqueue()
72 (1 == thiz->mState.count) && (SL_PLAYSTATE_PLAYING == getAssociatedState(thiz))) ? in IBufferQueue_Enqueue()
84 IBufferQueue *thiz = (IBufferQueue *) self; in IBufferQueue_Clear() local
85 interface_lock_exclusive(thiz); in IBufferQueue_Clear()
88 if (SL_OBJECTID_AUDIOPLAYER == InterfaceToObjectID(thiz)) { in IBufferQueue_Clear()
89 CAudioPlayer *audioPlayer = (CAudioPlayer *) thiz->mThis; in IBufferQueue_Clear()
95 thiz->mFront = &thiz->mArray[0]; in IBufferQueue_Clear()
96 thiz->mRear = &thiz->mArray[0]; in IBufferQueue_Clear()
97 thiz->mState.count = 0; in IBufferQueue_Clear()
98 thiz->mState.playIndex = 0; in IBufferQueue_Clear()
99 thiz->mSizeConsumed = 0; in IBufferQueue_Clear()
100 thiz->mCallbackPending = false; in IBufferQueue_Clear()
107 thiz->mClearRequested = SL_BOOLEAN_TRUE; in IBufferQueue_Clear()
109 interface_cond_wait(thiz); in IBufferQueue_Clear()
110 } while (thiz->mClearRequested); in IBufferQueue_Clear()
113 interface_unlock_exclusive(thiz); in IBufferQueue_Clear()
131 IBufferQueue *thiz = (IBufferQueue *) self; in IBufferQueue_GetState() local
133 interface_lock_shared(thiz); in IBufferQueue_GetState()
135 state.count = thiz->mState.count; in IBufferQueue_GetState()
136 state.playIndex = thiz->mState.playIndex; in IBufferQueue_GetState()
138 state = thiz->mState; in IBufferQueue_GetState()
140 interface_unlock_shared(thiz); in IBufferQueue_GetState()
154 IBufferQueue *thiz = (IBufferQueue *) self; in IBufferQueue_RegisterCallback() local
155 interface_lock_exclusive(thiz); in IBufferQueue_RegisterCallback()
157 if (SL_PLAYSTATE_STOPPED == getAssociatedState(thiz)) { in IBufferQueue_RegisterCallback()
158 thiz->mCallback = callback; in IBufferQueue_RegisterCallback()
159 thiz->mContext = pContext; in IBufferQueue_RegisterCallback()
164 interface_unlock_exclusive(thiz); in IBufferQueue_RegisterCallback()
179 IBufferQueue *thiz = (IBufferQueue *) self; in IBufferQueue_init() local
180 thiz->mItf = &IBufferQueue_Itf; in IBufferQueue_init()
181 thiz->mState.count = 0; in IBufferQueue_init()
182 thiz->mState.playIndex = 0; in IBufferQueue_init()
183 thiz->mCallback = NULL; in IBufferQueue_init()
184 thiz->mContext = NULL; in IBufferQueue_init()
185 thiz->mNumBuffers = 0; in IBufferQueue_init()
186 thiz->mClearRequested = SL_BOOLEAN_FALSE; in IBufferQueue_init()
187 thiz->mArray = NULL; in IBufferQueue_init()
188 thiz->mFront = NULL; in IBufferQueue_init()
189 thiz->mRear = NULL; in IBufferQueue_init()
191 thiz->mSizeConsumed = 0; in IBufferQueue_init()
192 thiz->mCallbackPending = false; in IBufferQueue_init()
194 BufferHeader *bufferHeader = thiz->mTypical; in IBufferQueue_init()
209 IBufferQueue *thiz = (IBufferQueue *) self; in IBufferQueue_deinit() local
210 if ((NULL != thiz->mArray) && (thiz->mArray != thiz->mTypical)) { in IBufferQueue_deinit()
211 free(thiz->mArray); in IBufferQueue_deinit()
212 thiz->mArray = NULL; in IBufferQueue_deinit()