: The Player's enum value changes.
So modify it to match the changed enum value.
FROM :
typedef enum {
PLAYER_VIDEO_CODEC_TYPE_EX_DEFAULT, /**< This is an optional flag for using codec which has higher priority */
PLAYER_VIDEO_CODEC_TYPE_EX_HW, /**< This is an optional flag for using the h/w codec */
PLAYER_VIDEO_CODEC_TYPE_EX_SW, /**< This is an optional flag for using the s/w codec */
} player_video_codec_type_ex_e;
TO :
typedef enum {
PLAYER_VIDEO_CODEC_TYPE_EX_HW, /**< This is an optional flag for using the h/w codec */
PLAYER_VIDEO_CODEC_TYPE_EX_SW, /**< This is an optional flag for using the s/w codec */
PLAYER_VIDEO_CODEC_TYPE_EX_DEFAULT, /**< This is an optional flag for using codec which has higher priority */
} player_video_codec_type_ex_e;
And an error code has been added.
- PLAYER_ERROR_NOT_SUPPORTED_VIDEO_CODEC Not supported video codec type
Change-Id: Icac989cce5d6719fdf50472821beb0ef2b9e19f4
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 )
{
- 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 )
+ player_video_codec_type_ex_e codecType = PLAYER_VIDEO_CODEC_TYPE_EX_DEFAULT;
+ switch( type )
{
- DALI_LOG_ERROR( "The target should not support the codec type\n" );
+ 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;
+ }
}
- error = player_get_video_codec_type_ex( mPlayer, &mCodecType );
+ error = player_set_video_codec_type_ex( mPlayer, codecType );
LogPlayerError( error );
}
}
Dali::VideoPlayerPlugin::CodecType TizenVideoPlayer::GetCodecType() const
{
- return static_cast< Dali::VideoPlayerPlugin::CodecType >( mCodecType );
+ 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;
}
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 )
{
- 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 )
+ player_video_codec_type_ex_e codecType = PLAYER_VIDEO_CODEC_TYPE_EX_DEFAULT;
+ switch( type )
{
- DALI_LOG_ERROR( "The target should not support the codec type\n" );
+ 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;
+ }
}
- error = player_get_video_codec_type_ex( mPlayer, &mCodecType );
+ error = player_set_video_codec_type_ex( mPlayer, codecType );
LogPlayerError( error );
}
}
Dali::VideoPlayerPlugin::CodecType TizenVideoPlayer::GetCodecType() const
{
- return static_cast< Dali::VideoPlayerPlugin::CodecType >( mCodecType );
+ 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;
}
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: