Home | History | Annotate | Download | only in itf

Lines Matching refs:thiz

26 static SLuint32 getAssociatedState(IBufferQueue *thiz)
29 switch (InterfaceToObjectID(thiz)) {
31 state = ((CAudioPlayer *) thiz->mThis)->mPlay.mState;
34 state = ((CAudioRecorder *) thiz->mThis)->mRecord.mState;
56 IBufferQueue *thiz = (IBufferQueue *) self;
57 interface_lock_exclusive(thiz);
58 BufferHeader *oldRear = thiz->mRear, *newRear;
59 if ((newRear = oldRear + 1) == &thiz->mArray[thiz->mNumBuffers + 1]) {
60 newRear = thiz->mArray;
62 if (newRear == thiz->mFront) {
67 thiz->mRear = newRear;
68 ++thiz->mState.count;
72 interface_unlock_exclusive_attributes(thiz, ((SL_RESULT_SUCCESS == result) &&
73 (1 == thiz->mState.count) && (SL_PLAYSTATE_PLAYING == getAssociatedState(thiz))) ?
85 IBufferQueue *thiz = (IBufferQueue *) self;
86 interface_lock_exclusive(thiz);
89 if (SL_OBJECTID_AUDIOPLAYER == InterfaceToObjectID(thiz)) {
90 CAudioPlayer *audioPlayer = (CAudioPlayer *) thiz->mThis;
94 thiz->mFront = &thiz->mArray[0];
95 thiz->mRear = &thiz->mArray[0];
96 thiz->mState.count = 0;
97 thiz->mState.playIndex = 0;
98 thiz->mSizeConsumed = 0;
99 thiz->mCallbackPending = false;
107 thiz->mClearRequested = SL_BOOLEAN_TRUE;
109 interface_cond_wait(thiz);
110 } while (thiz->mClearRequested);
113 interface_unlock_exclusive(thiz);
128 IBufferQueue *thiz = (IBufferQueue *) self;
130 interface_lock_shared(thiz);
132 state.count = thiz->mState.count;
133 state.playIndex = thiz->mState.playIndex;
135 state = thiz->mState;
137 interface_unlock_shared(thiz);
151 IBufferQueue *thiz = (IBufferQueue *) self;
152 interface_lock_exclusive(thiz);
154 if (SL_PLAYSTATE_STOPPED == getAssociatedState(thiz)) {
155 thiz->mCallback = callback;
156 thiz->mContext = pContext;
161 interface_unlock_exclusive(thiz);
176 IBufferQueue *thiz = (IBufferQueue *) self;
177 thiz->mItf = &IBufferQueue_Itf;
178 thiz->mState.count = 0;
179 thiz->mState.playIndex = 0;
180 thiz->mCallback = NULL;
181 thiz->mContext = NULL;
182 thiz->mNumBuffers = 0;
183 thiz->mClearRequested = SL_BOOLEAN_FALSE;
184 thiz->mArray = NULL;
185 thiz->mFront = NULL;
186 thiz->mRear = NULL;
188 thiz->mSizeConsumed = 0;
189 thiz->mCallbackPending = false;
191 BufferHeader *bufferHeader = thiz->mTypical;
206 IBufferQueue *thiz = (IBufferQueue *) self;
207 if ((NULL != thiz->mArray) && (thiz->mArray != thiz->mTypical)) {
208 free(thiz->mArray);
209 thiz->mArray = NULL;