Lines Matching defs:thiz

30 static SLuint32 getAssociatedState(IAndroidBufferQueue *thiz)
33 switch (InterfaceToObjectID(thiz)) {
35 state = ((CMediaPlayer *) thiz->mThis)->mPlay.mState;
38 state = ((CAudioPlayer *) thiz->mThis)->mPlay.mState;
229 IAndroidBufferQueue *thiz = (IAndroidBufferQueue *) self;
231 interface_lock_exclusive(thiz);
234 if (SL_PLAYSTATE_STOPPED == getAssociatedState(thiz)) {
235 thiz->mCallback = callback;
236 thiz->mContext = pContext;
239 switch (InterfaceToObjectID(thiz)) {
242 (CAudioPlayer*) thiz->mThis);
255 interface_unlock_exclusive(thiz);
266 IAndroidBufferQueue *thiz = (IAndroidBufferQueue *) self;
268 interface_lock_exclusive(thiz);
271 thiz->mFront = &thiz->mBufferArray[0];
272 thiz->mRear = &thiz->mBufferArray[0];
274 thiz->mState.count = 0;
275 thiz->mState.index = 0;
277 for (XAuint16 i=0 ; i<(thiz->mNumBuffers + 1) ; i++) {
278 thiz->mBufferArray[i].mDataBuffer = NULL;
279 thiz->mBufferArray[i].mDataSize = 0;
280 thiz->mBufferArray[i].mDataSizeConsumed = 0;
281 thiz->mBufferArray[i].mBufferContext = NULL;
282 thiz->mBufferArray[i].mBufferState = SL_ANDROIDBUFFERQUEUEEVENT_NONE;
283 switch (thiz->mBufferType) {
285 thiz->mBufferArray[i].mItems.mTsCmdData.mTsCmdCode = ANDROID_MP2TSEVENT_NONE;
286 thiz->mBufferArray[i].mItems.mTsCmdData.mPts = 0;
289 thiz->mBufferArray[i].mItems.mAdtsCmdData.mAdtsCmdCode = ANDROID_ADTSEVENT_NONE;
298 switch (InterfaceToObjectID(thiz)) {
301 android_audioPlayer_androidBufferQueue_clear_l((CAudioPlayer*) thiz->mThis);
305 android_Player_androidBufferQueue_clear_l((CMediaPlayer*) thiz->mThis);
312 interface_unlock_exclusive(thiz);
343 IAndroidBufferQueue *thiz = (IAndroidBufferQueue *) self;
346 switch (thiz->mBufferType) {
374 interface_lock_exclusive(thiz);
376 AdvancedBufferHeader *oldRear = thiz->mRear, *newRear;
377 if ((newRear = oldRear + 1) == &thiz->mBufferArray[thiz->mNumBuffers + 1]) {
378 newRear = thiz->mBufferArray;
380 if (newRear == thiz->mFront) {
388 thiz->mRear = newRear;
389 ++thiz->mState.count;
391 setItems(pItems, itemsLength, thiz->mBufferType, oldRear);
395 interface_unlock_exclusive_attributes(thiz, ((SL_RESULT_SUCCESS == result) &&
396 (1 == thiz->mState.count) && (SL_PLAYSTATE_PLAYING == getAssociatedState(thiz))) ?
414 IAndroidBufferQueue *thiz = (IAndroidBufferQueue *) self;
416 interface_lock_shared(thiz);
418 pState->count = thiz->mState.count;
419 pState->index = thiz->mState.index;
421 interface_unlock_shared(thiz);
435 IAndroidBufferQueue *thiz = (IAndroidBufferQueue *) self;
436 interface_lock_exclusive(thiz);
440 thiz->mCallbackEventsMask = eventFlags;
445 interface_unlock_exclusive(thiz);
459 IAndroidBufferQueue *thiz = (IAndroidBufferQueue *) self;
460 interface_lock_shared(thiz);
461 SLuint32 callbackEventsMask = thiz->mCallbackEventsMask;
462 interface_unlock_shared(thiz);
483 IAndroidBufferQueue *thiz = (IAndroidBufferQueue *) self;
484 thiz->mItf = &IAndroidBufferQueue_Itf;
486 thiz->mState.count = 0;
487 thiz->mState.index = 0;
489 thiz->mCallback = NULL;
490 thiz->mContext = NULL;
491 thiz->mCallbackEventsMask = SL_ANDROIDBUFFERQUEUEEVENT_PROCESSED;
493 thiz->mBufferType = kAndroidBufferTypeInvalid;
494 thiz->mBufferArray = NULL;
495 thiz->mFront = NULL;
496 thiz->mRear = NULL;
502 IAndroidBufferQueue *thiz = (IAndroidBufferQueue *) self;
503 if (NULL != thiz->mBufferArray) {
504 free(thiz->mBufferArray);
505 thiz->mBufferArray = NULL;