Hi,
I'm using MediaPlayer to play some audio files and I'm getting an unusual error when I attemp to stop a player in the PLAYER_STATE_ENDOFCLIP state. When I call the Stop() function the player believe that it is in state 2 (PLAYER_STATE_OPENED)
The code look something like this:
void TizenMediaPlayer::OnPlayerEndOfClip(void) { Stop(); } void TizenMediaPlayer::Stop(void) { AppLog("Before Stop. State %d", mPlayer.GetState()); mPlayer.Stop(); AppLog("After Stop. State %d", mPlayer.GetState()); mPlayer.Close(); AppLog("After Close. State %d", mPlayer.GetState()); }
The output looks like this:
void TizenMediaPlayer::Stop()(264) > Before Stop. State 3 result Tizen::Media::_PlayerImpl::Stop()(875) > [E_INVALID_STATE] Player state is in an invalid state. State is 2 result Tizen::Media::Player::Stop()(224) > [E_INVALID_STATE] Failed to perform Stop operation. void TizenMediaPlayer::Stop()(266) > After Stop. State 3 void TizenMediaPlayer::Stop()(268) > After Close. State 7
As you can see I check the state right before calling stop and it confirms it's in state 3 (PLAYER_STATE_ENDOFCLIP) but during the Stop operation it throw and error indicating that the state is 2 (PLAYER_STATE_OPENED).
Is this a bug in the API or am I missing something?
Thanks