mPacketMutex(),
mPacketVector(),
mEcoreWlWindow( NULL ),
- mAlphaBitChanged( false )
+ mAlphaBitChanged( false ),
+ mCodecType( PLAYER_CODEC_TYPE_DEFAULT )
{
}
DestroyPlayer();
}
-void TizenVideoPlayer::GetPlayerState( player_state_e* state )
+void TizenVideoPlayer::GetPlayerState( player_state_e* state ) const
{
if( mPlayer != NULL && player_get_state( mPlayer, state ) != PLAYER_ERROR_NONE )
{
}
}
+void TizenVideoPlayer::SetCodecType( Dali::VideoPlayerPlugin::CodecType type )
+{
+ int error;
+ if( mPlayerState != PLAYER_STATE_NONE )
+ {
+ GetPlayerState( &mPlayerState );
+
+ if( mPlayerState == PLAYER_STATE_IDLE )
+ {
+ error = player_set_codec_type( mPlayer, PLAYER_STREAM_TYPE_VIDEO, static_cast< player_codec_type_e >( type ) );
+ LogPlayerError( error );
+
+ if( error == PLAYER_ERROR_INVALID_OPERATION )
+ {
+ DALI_LOG_ERROR( "The target should not support the codec type\n" );
+ }
+ error = player_get_codec_type( mPlayer, PLAYER_STREAM_TYPE_VIDEO, &mCodecType );
+ LogPlayerError( error );
+ }
+ }
+}
+
+Dali::VideoPlayerPlugin::CodecType TizenVideoPlayer::GetCodecType() const
+{
+ return static_cast< Dali::VideoPlayerPlugin::CodecType >( mCodecType );
+}
+
} // namespace Plugin
} // namespace Dali;
*/
bool IsVideoTextureSupported();
+ /**
+ * @brief Dali::VideoPlayer::SetCodecType()
+ */
+ void SetCodecType( Dali::VideoPlayerPlugin::CodecType type );
+
+ /**
+ * @brief Dali::VideoPlayer::GetCodecType()
+ */
+ Dali::VideoPlayerPlugin::CodecType GetCodecType() const;
+
private:
/**
/**
* @brief Gets current player state
*/
- void GetPlayerState( player_state_e* state );
+ void GetPlayerState( player_state_e* state ) const;
/**
* @brief Destroy all packests, which this plugin stores
bool mAlphaBitChanged; ///< True if underlay rendering initialization changes window alpha
+ player_codec_type_e mCodecType;
+
public:
Dali::VideoPlayerPlugin::VideoPlayerSignalType mFinishedSignal;