From 7728735df1ab7a3453083000fa7483146e1b64c3 Mon Sep 17 00:00:00 2001 From: "Seungho, Baek" Date: Mon, 16 Apr 2018 15:22:17 +0900 Subject: [PATCH] Revert "[Tizen] Add ecore-wl2" This reverts commit bcbb932c261d630d0a1af68c752a100890bef115. Change-Id: Id17894b95b40386d286dd724f7f4df9d928194a4 --- .../ecore-wl2/tizen-video-player-ecore-wl2.cpp | 94 ++-------------------- .../video-player/ecore-wl2/tizen-video-player.h | 28 +------ packaging/dali-extension.spec | 2 +- 3 files changed, 10 insertions(+), 114 deletions(-) mode change 100755 => 100644 dali-extension/video-player/ecore-wl2/tizen-video-player-ecore-wl2.cpp mode change 100755 => 100644 dali-extension/video-player/ecore-wl2/tizen-video-player.h mode change 100755 => 100644 packaging/dali-extension.spec diff --git a/dali-extension/video-player/ecore-wl2/tizen-video-player-ecore-wl2.cpp b/dali-extension/video-player/ecore-wl2/tizen-video-player-ecore-wl2.cpp old mode 100755 new mode 100644 index 98caeb2..aaae82c --- a/dali-extension/video-player/ecore-wl2/tizen-video-player-ecore-wl2.cpp +++ b/dali-extension/video-player/ecore-wl2/tizen-video-player-ecore-wl2.cpp @@ -219,10 +219,7 @@ TizenVideoPlayer::TizenVideoPlayer() mPacketMutex(), mPacketVector(), mEcoreWlWindow( NULL ), - mAlphaBitChanged( false ), - mCodecType( PLAYER_CODEC_TYPE_DEFAULT ), - mStreamInfo( NULL ), - mStreamType( SOUND_STREAM_TYPE_MEDIA ) + mAlphaBitChanged( false ) { } @@ -231,7 +228,7 @@ TizenVideoPlayer::~TizenVideoPlayer() DestroyPlayer(); } -void TizenVideoPlayer::GetPlayerState( player_state_e* state ) const +void TizenVideoPlayer::GetPlayerState( player_state_e* state ) { if( mPlayer != NULL && player_get_state( mPlayer, state ) != PLAYER_ERROR_NONE ) { @@ -244,45 +241,20 @@ void TizenVideoPlayer::SetUrl( const std::string& url ) { if( mUrl != url ) { - int error = PLAYER_ERROR_NONE; - mUrl = url; GetPlayerState( &mPlayerState ); if( mPlayerState != PLAYER_STATE_NONE && mPlayerState != PLAYER_STATE_IDLE ) { - if( mNativeImageSourcePtr ) - { - error = player_unset_media_packet_video_frame_decoded_cb( mPlayer ); - LogPlayerError( error ); - } Stop(); - - error = player_unprepare( mPlayer ); - LogPlayerError( error ); - - if( mNativeImageSourcePtr ) - { - error = player_set_media_packet_video_frame_decoded_cb( mPlayer, MediaPacketVideoDecodedCb, this ); - LogPlayerError( error ); - } - else - { - int width, height; - Ecore_Wl2_Display *wl2_display = ecore_wl2_connected_display_get(NULL); - ecore_wl2_display_screen_size_get( wl2_display, &width, &height ); - - error = player_set_ecore_wl_display( mPlayer, PLAYER_DISPLAY_TYPE_OVERLAY, mEcoreWlWindow, 0, 0, width, height ); - LogPlayerError( error ); - } - GetPlayerState( &mPlayerState ); + int error = player_unprepare( mPlayer ); LogPlayerError( error ); } if( mPlayerState == PLAYER_STATE_IDLE ) { - error = player_set_uri( mPlayer, mUrl.c_str() ); + int error = player_set_uri( mPlayer, mUrl.c_str() ); LogPlayerError( error ); error = player_prepare( mPlayer ); @@ -551,10 +523,7 @@ void TizenVideoPlayer::InitializeTextureStreamMode( Dali::NativeImageSourcePtr n error = player_set_media_packet_video_frame_decoded_cb( mPlayer, MediaPacketVideoDecodedCb, this ); LogPlayerError( error ); - error = sound_manager_create_stream_information( mStreamType, NULL, NULL, &mStreamInfo ); - LogPlayerError( error ); - - error = player_set_sound_stream_info( mPlayer, mStreamInfo ); + error = player_set_sound_type( mPlayer, SOUND_TYPE_MEDIA ); LogPlayerError( error ); error = player_set_display_mode( mPlayer, PLAYER_DISPLAY_MODE_FULL_SCREEN ); @@ -588,10 +557,7 @@ void TizenVideoPlayer::InitializeUnderlayMode( Ecore_Wl2_Window* ecoreWlWindow ) error = player_set_completed_cb( mPlayer, EmitPlaybackFinishedSignal, this ); LogPlayerError( error ); - error = sound_manager_create_stream_information( mStreamType, NULL, NULL, &mStreamInfo ); - LogPlayerError( error ); - - error = player_set_sound_stream_info( mPlayer, mStreamInfo ); + error = player_set_sound_type( mPlayer, SOUND_TYPE_MEDIA ); LogPlayerError( error ); error = player_set_display_mode( mPlayer, PLAYER_DISPLAY_MODE_DST_ROI ); @@ -758,7 +724,7 @@ void TizenVideoPlayer::Backward( int millisecond ) } } -bool TizenVideoPlayer::IsVideoTextureSupported() +bool TizenVideoPlayer::IsVideoTextureSupported() const { bool featureFlag = true; int error = SYSTEM_INFO_ERROR_NONE; @@ -790,57 +756,11 @@ void TizenVideoPlayer::DestroyPlayer() error = player_destroy( mPlayer ); LogPlayerError( error ); - - error = sound_manager_destroy_stream_information(mStreamInfo); - LogPlayerError( error ); - mPlayerState = PLAYER_STATE_NONE; mPlayer = NULL; mUrl = ""; } } -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 ); -} - -void TizenVideoPlayer::SetDisplayMode( Dali::VideoPlayerPlugin::DisplayMode::Type mode ) -{ - int error; - error = player_set_display_mode( mPlayer, static_cast< player_display_mode_e >( mode ) ); - LogPlayerError( error ); -} - -Dali::VideoPlayerPlugin::DisplayMode::Type TizenVideoPlayer::GetDisplayMode() const -{ - player_display_mode_e mode; - player_get_display_mode( mPlayer, &mode ); - return static_cast< Dali::VideoPlayerPlugin::DisplayMode::Type >( mode ); -} - - } // namespace Plugin } // namespace Dali; diff --git a/dali-extension/video-player/ecore-wl2/tizen-video-player.h b/dali-extension/video-player/ecore-wl2/tizen-video-player.h old mode 100755 new mode 100644 index 40b7dd8..2f5bdae --- a/dali-extension/video-player/ecore-wl2/tizen-video-player.h +++ b/dali-extension/video-player/ecore-wl2/tizen-video-player.h @@ -176,27 +176,7 @@ public: /** * @brief Dali::VideoPlayer::IsVideoTextureSupported() */ - bool IsVideoTextureSupported(); - - /** - * @brief Dali::VideoPlayer::SetCodecType() - */ - void SetCodecType( Dali::VideoPlayerPlugin::CodecType type ); - - /** - * @brief Dali::VideoPlayer::GetCodecType() - */ - Dali::VideoPlayerPlugin::CodecType GetCodecType() const; - - /** - * @copydoc Dali::VideoPlayerPlugin::SetDisplayMode() - */ - void SetDisplayMode( Dali::VideoPlayerPlugin::DisplayMode::Type mode ); - - /** - * @copydoc Dali::VideoPlayerPlugin::GetDisplayMode() - */ - Dali::VideoPlayerPlugin::DisplayMode::Type GetDisplayMode() const; + bool IsVideoTextureSupported() const; private: @@ -208,7 +188,7 @@ private: /** * @brief Gets current player state */ - void GetPlayerState( player_state_e* state ) const; + void GetPlayerState( player_state_e* state ); /** * @brief Destroy all packests, which this plugin stores @@ -249,10 +229,6 @@ private: bool mAlphaBitChanged; ///< True if underlay rendering initialization changes window alpha - player_codec_type_e mCodecType; - - sound_stream_info_h mStreamInfo; - sound_stream_type_e mStreamType; public: Dali::VideoPlayerPlugin::VideoPlayerSignalType mFinishedSignal; diff --git a/packaging/dali-extension.spec b/packaging/dali-extension.spec old mode 100755 new mode 100644 index 0eac370..f99cb74 --- a/packaging/dali-extension.spec +++ b/packaging/dali-extension.spec @@ -7,7 +7,7 @@ Name: dali-extension Summary: The DALi Tizen Extensions -Version: 1.3.17 +Version: 1.3.9 Release: 1 Group: System/Libraries License: Apache-2.0 and BSD-3-Clause and MIT -- 2.7.4