TizenVideoPlayer::~TizenVideoPlayer()
{
+ DestroyPlayer();
}
void TizenVideoPlayer::GetPlayerState( player_state_e* state )
void TizenVideoPlayer::SetRenderingTarget( Any target )
{
- int error;
- if( mPlayerState != PLAYER_STATE_NONE )
- {
- GetPlayerState( &mPlayerState );
-
- if( mPlayerState != PLAYER_STATE_IDLE )
- {
- Stop();
- error = player_unprepare( mPlayer );
- LogPlayerError( error );
- }
-
- error = player_destroy( mPlayer );
- LogPlayerError( error );
- mPlayerState = PLAYER_STATE_NONE;
- mPlayer = NULL;
- mUrl = "";
- }
+ DestroyPlayer();
mNativeImageSourcePtr = NULL;
mEcoreWlWindow = NULL;
return featureFlag;
}
+void TizenVideoPlayer::DestroyPlayer()
+{
+ int error;
+ if( mPlayerState != PLAYER_STATE_NONE )
+ {
+ GetPlayerState( &mPlayerState );
+
+ if( mPlayerState != PLAYER_STATE_IDLE )
+ {
+ Stop();
+ error = player_unprepare( mPlayer );
+ LogPlayerError( error );
+ }
+
+ error = player_destroy( mPlayer );
+ LogPlayerError( error );
+ mPlayerState = PLAYER_STATE_NONE;
+ mPlayer = NULL;
+ mUrl = "";
+ }
+}
+
} // namespace Plugin
} // namespace Dali;