DALI_LOG_ERROR( "Player error: Buffer space\n" );
return;
}
- case PLAYER_ERROR_NOT_SUPPORTED_VIDEO_CODEC:
- {
- DALI_LOG_ERROR( "Player error: The target should not support the codec type\n" );
- return;
- }
- default :
- {
- DALI_LOG_ERROR( "Player error: Unknown error code ( %d ) \n", error );
- return;
- }
}
}
}
mPacketVector(),
mEcoreWlWindow( NULL ),
mAlphaBitChanged( false ),
+ mCodecType( PLAYER_VIDEO_CODEC_TYPE_EX_DEFAULT ),
mStreamInfo( NULL ),
mStreamType( SOUND_STREAM_TYPE_MEDIA )
{
if( mPlayerState == PLAYER_STATE_IDLE )
{
- player_video_codec_type_ex_e codecType = PLAYER_VIDEO_CODEC_TYPE_EX_DEFAULT;
- switch( type )
+ error = player_set_video_codec_type_ex( mPlayer, static_cast< player_video_codec_type_ex_e >( type ) );
+ LogPlayerError( error );
+
+ if( error == PLAYER_ERROR_INVALID_OPERATION )
{
- case Dali::VideoPlayerPlugin::CodecType::DEFAULT :
- {
- codecType = PLAYER_VIDEO_CODEC_TYPE_EX_DEFAULT;
- break;
- }
- case Dali::VideoPlayerPlugin::CodecType::HW :
- {
- codecType = PLAYER_VIDEO_CODEC_TYPE_EX_HW;
- break;
- }
- case Dali::VideoPlayerPlugin::CodecType::SW :
- {
- codecType = PLAYER_VIDEO_CODEC_TYPE_EX_SW;
- break;
- }
+ DALI_LOG_ERROR( "The target should not support the codec type\n" );
}
- error = player_set_video_codec_type_ex( mPlayer, codecType );
+ error = player_get_video_codec_type_ex( mPlayer, &mCodecType );
LogPlayerError( error );
}
}
Dali::VideoPlayerPlugin::CodecType TizenVideoPlayer::GetCodecType() const
{
- Dali::VideoPlayerPlugin::CodecType type = Dali::VideoPlayerPlugin::CodecType::DEFAULT;
- if( mPlayerState != PLAYER_STATE_NONE )
- {
- player_video_codec_type_ex_e codecType = PLAYER_VIDEO_CODEC_TYPE_EX_DEFAULT;
- int error = player_get_video_codec_type_ex( mPlayer, &codecType );
- if( error != PLAYER_ERROR_NONE )
- {
- LogPlayerError( error );
- return type;
- }
-
- switch( codecType )
- {
- case PLAYER_VIDEO_CODEC_TYPE_EX_DEFAULT :
- {
- type = Dali::VideoPlayerPlugin::CodecType::DEFAULT;
- break;
- }
- case PLAYER_VIDEO_CODEC_TYPE_EX_HW :
- {
- type = Dali::VideoPlayerPlugin::CodecType::HW;
- break;
- }
- case PLAYER_VIDEO_CODEC_TYPE_EX_SW :
- {
- type = Dali::VideoPlayerPlugin::CodecType::SW;
- break;
- }
- }
- }
- return type;
+ return static_cast< Dali::VideoPlayerPlugin::CodecType >( mCodecType );
}
void TizenVideoPlayer::SetDisplayMode( Dali::VideoPlayerPlugin::DisplayMode::Type mode )
bool mAlphaBitChanged; ///< True if underlay rendering initialization changes window alpha
+ player_video_codec_type_ex_e mCodecType;
+
sound_stream_info_h mStreamInfo;
sound_stream_type_e mStreamType;
public:
DALI_LOG_ERROR( "Player error: Buffer space\n" );
return;
}
- case PLAYER_ERROR_NOT_SUPPORTED_VIDEO_CODEC:
- {
- DALI_LOG_ERROR( "Player error: The target should not support the codec type\n" );
- return;
- }
- default :
- {
- DALI_LOG_ERROR( "Player error: Unknown error code ( %d ) \n", error );
- return;
- }
}
}
}
mPacketVector(),
mEcoreWlWindow( NULL ),
mAlphaBitChanged( false ),
+ mCodecType( PLAYER_VIDEO_CODEC_TYPE_EX_DEFAULT ),
mStreamInfo( NULL ),
mStreamType( SOUND_STREAM_TYPE_MEDIA )
{
if( mPlayerState == PLAYER_STATE_IDLE )
{
- player_video_codec_type_ex_e codecType = PLAYER_VIDEO_CODEC_TYPE_EX_DEFAULT;
- switch( type )
+ error = player_set_video_codec_type_ex( mPlayer, static_cast< player_video_codec_type_ex_e >( type ) );
+ LogPlayerError( error );
+
+ if( error == PLAYER_ERROR_INVALID_OPERATION )
{
- case Dali::VideoPlayerPlugin::CodecType::DEFAULT :
- {
- codecType = PLAYER_VIDEO_CODEC_TYPE_EX_DEFAULT;
- break;
- }
- case Dali::VideoPlayerPlugin::CodecType::HW :
- {
- codecType = PLAYER_VIDEO_CODEC_TYPE_EX_HW;
- break;
- }
- case Dali::VideoPlayerPlugin::CodecType::SW :
- {
- codecType = PLAYER_VIDEO_CODEC_TYPE_EX_SW;
- break;
- }
+ DALI_LOG_ERROR( "The target should not support the codec type\n" );
}
- error = player_set_video_codec_type_ex( mPlayer, codecType );
+ error = player_get_video_codec_type_ex( mPlayer, &mCodecType );
LogPlayerError( error );
}
}
Dali::VideoPlayerPlugin::CodecType TizenVideoPlayer::GetCodecType() const
{
- Dali::VideoPlayerPlugin::CodecType type = Dali::VideoPlayerPlugin::CodecType::DEFAULT;
- if( mPlayerState != PLAYER_STATE_NONE )
- {
- player_video_codec_type_ex_e codecType = PLAYER_VIDEO_CODEC_TYPE_EX_DEFAULT;
- int error = player_get_video_codec_type_ex( mPlayer, &codecType );
- if( error != PLAYER_ERROR_NONE )
- {
- LogPlayerError( error );
- return type;
- }
-
- switch( codecType )
- {
- case PLAYER_VIDEO_CODEC_TYPE_EX_DEFAULT :
- {
- type = Dali::VideoPlayerPlugin::CodecType::DEFAULT;
- break;
- }
- case PLAYER_VIDEO_CODEC_TYPE_EX_HW :
- {
- type = Dali::VideoPlayerPlugin::CodecType::HW;
- break;
- }
- case PLAYER_VIDEO_CODEC_TYPE_EX_SW :
- {
- type = Dali::VideoPlayerPlugin::CodecType::SW;
- break;
- }
- }
- }
- return type;
+ return static_cast< Dali::VideoPlayerPlugin::CodecType >( mCodecType );
}
void TizenVideoPlayer::SetDisplayMode( Dali::VideoPlayerPlugin::DisplayMode::Type mode )
bool mAlphaBitChanged; ///< True if underlay rendering initialization changes window alpha
+ player_video_codec_type_ex_e mCodecType;
+
sound_stream_info_h mStreamInfo;
sound_stream_type_e mStreamType;
public: