Lines Matching refs:mCurrentState
64 mCurrentState = MEDIA_PLAYER_IDLE; in MediaPlayer()
131 if ( !( (mCurrentState & MEDIA_PLAYER_IDLE) || in attachNewPlayer()
132 (mCurrentState == MEDIA_PLAYER_STATE_ERROR ) ) ) { in attachNewPlayer()
133 ALOGE("attachNewPlayer called in state %d", mCurrentState); in attachNewPlayer()
141 mCurrentState = MEDIA_PLAYER_INITIALIZED; in attachNewPlayer()
211 (mCurrentState != MEDIA_PLAYER_STATE_ERROR) && in invoke()
212 ((mCurrentState & MEDIA_PLAYER_IDLE) != MEDIA_PLAYER_IDLE); in invoke()
217 ALOGE("invoke failed: wrong state %X, mPlayer(%p)", mCurrentState, mPlayer.get()); in invoke()
275 if ( (mPlayer != 0) && ( mCurrentState & (MEDIA_PLAYER_INITIALIZED | MEDIA_PLAYER_STOPPED) ) ) { in prepareAsync_l()
281 mCurrentState = MEDIA_PLAYER_PREPARING; in prepareAsync_l()
284 ALOGE("prepareAsync called in state %d, mPlayer(%p)", mCurrentState, mPlayer.get()); in prepareAsync_l()
333 if (mCurrentState & MEDIA_PLAYER_STARTED) { in start()
335 } else if ( (mPlayer != 0) && ( mCurrentState & ( MEDIA_PLAYER_PREPARED | in start()
340 mCurrentState = MEDIA_PLAYER_STARTED; in start()
343 mCurrentState = MEDIA_PLAYER_STATE_ERROR; in start()
345 if (mCurrentState == MEDIA_PLAYER_PLAYBACK_COMPLETE) { in start()
350 ALOGE("start called in state %d, mPlayer(%p)", mCurrentState, mPlayer.get()); in start()
363 if (mCurrentState & MEDIA_PLAYER_STOPPED) return NO_ERROR; in stop()
364 if ( (mPlayer != 0) && ( mCurrentState & ( MEDIA_PLAYER_STARTED | MEDIA_PLAYER_PREPARED | in stop()
368 mCurrentState = MEDIA_PLAYER_STATE_ERROR; in stop()
370 mCurrentState = MEDIA_PLAYER_STOPPED; in stop()
374 ALOGE("stop called in state %d, mPlayer(%p)", mCurrentState, mPlayer.get()); in stop()
382 if (mCurrentState & (MEDIA_PLAYER_PAUSED|MEDIA_PLAYER_PLAYBACK_COMPLETE)) in pause()
384 if ((mPlayer != 0) && (mCurrentState & MEDIA_PLAYER_STARTED)) { in pause()
387 mCurrentState = MEDIA_PLAYER_STATE_ERROR; in pause()
389 mCurrentState = MEDIA_PLAYER_PAUSED; in pause()
393 ALOGE("pause called in state %d, mPlayer(%p)", mCurrentState, mPlayer.get()); in pause()
404 if ((mCurrentState & MEDIA_PLAYER_STARTED) && ! temp) { in isPlaying()
406 mCurrentState = MEDIA_PLAYER_PAUSED; in isPlaying()
407 } else if ((mCurrentState & MEDIA_PLAYER_PAUSED) && temp) { in isPlaying()
409 mCurrentState = MEDIA_PLAYER_STARTED; in isPlaying()
427 if (mPlayer == 0 || (mCurrentState & MEDIA_PLAYER_STOPPED)) { in setPlaybackSettings()
431 if (rate.mSpeed != 0.f && !(mCurrentState & MEDIA_PLAYER_STARTED) in setPlaybackSettings()
432 && (mCurrentState & (MEDIA_PLAYER_PREPARED | MEDIA_PLAYER_PAUSED in setPlaybackSettings()
441 if (rate.mSpeed == 0.f && mCurrentState == MEDIA_PLAYER_STARTED) { in setPlaybackSettings()
442 mCurrentState = MEDIA_PLAYER_PAUSED; in setPlaybackSettings()
444 && (mCurrentState & (MEDIA_PLAYER_PREPARED | MEDIA_PLAYER_PAUSED in setPlaybackSettings()
446 mCurrentState = MEDIA_PLAYER_STARTED; in setPlaybackSettings()
512 bool isValidState = (mCurrentState & (MEDIA_PLAYER_PREPARED | MEDIA_PLAYER_STARTED | in getDuration_l()
530 mPlayer.get(), mCurrentState); in getDuration_l()
543 if ((mPlayer != 0) && ( mCurrentState & ( MEDIA_PLAYER_STARTED | MEDIA_PLAYER_PREPARED | in seekTo_l()
581 mCurrentState); in seekTo_l()
607 if (mCurrentState == MEDIA_PLAYER_IDLE) return NO_ERROR; in reset_l()
613 mCurrentState = MEDIA_PLAYER_STATE_ERROR; in reset_l()
616 mCurrentState = MEDIA_PLAYER_IDLE; in reset_l()
657 if (mCurrentState & ( MEDIA_PLAYER_PREPARED | MEDIA_PLAYER_STARTED | in setAudioStreamType()
660 ALOGE("setAudioStream called in state %d", mCurrentState); in setAudioStreamType()
713 if (!(mCurrentState & MEDIA_PLAYER_IDLE)) { in setAudioSessionId()
714 ALOGE("setAudioSessionId called in state %d", mCurrentState); in setAudioSessionId()
750 (mCurrentState & MEDIA_PLAYER_IDLE) || in attachAuxEffect()
751 (mCurrentState == MEDIA_PLAYER_STATE_ERROR )) { in attachAuxEffect()
752 ALOGE("attachAuxEffect called in state %d, mPlayer(%p)", mCurrentState, mPlayer.get()); in attachAuxEffect()
764 if (mCurrentState & ( MEDIA_PLAYER_PREPARED | MEDIA_PLAYER_STARTED | in checkStateForKeySet_l()
767 ALOGE("trying to set audio attributes called in state %d", mCurrentState); in checkStateForKeySet_l()
826 if ((mPlayer != NULL) || (mCurrentState != MEDIA_PLAYER_IDLE)) in setRetransmitEndpoint()
868 if (!(msg == MEDIA_ERROR && mCurrentState == MEDIA_PLAYER_IDLE) && mPlayer == 0) { in notify()
879 mCurrentState = MEDIA_PLAYER_PREPARED; in notify()
892 if (mCurrentState == MEDIA_PLAYER_IDLE) { in notify()
896 mCurrentState = MEDIA_PLAYER_PLAYBACK_COMPLETE; in notify()
904 mCurrentState = MEDIA_PLAYER_STATE_ERROR; in notify()
984 if (next != NULL && !(next->mCurrentState & in setNextMediaPlayer()
1029 if (!(mCurrentState & (MEDIA_PLAYER_PREPARING | MEDIA_PLAYER_PREPARED))) { in prepareDrm()
1030 ALOGE("prepareDrm is called in the wrong state (%d).", mCurrentState); in prepareDrm()
1057 if (mCurrentState & (MEDIA_PLAYER_STARTED | in releaseDrm()
1061 ALOGE("releaseDrm Unexpected state %d. Can only be called in stopped/idle.", mCurrentState); in releaseDrm()