X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=dali-toolkit%2Finternal%2Fcontrols%2Fvideo-view%2Fvideo-view-impl.cpp;h=2ec07ef8a9a293c55d2461d0ae883ffda10d6566;hb=refs%2Fchanges%2F97%2F107897%2F9;hp=0b431fc4f273c1a5b94b50b1c32c67211ad663be;hpb=2078fd4ac40a042eed5d62239e70745aea8f8fba;p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git diff --git a/dali-toolkit/internal/controls/video-view/video-view-impl.cpp b/dali-toolkit/internal/controls/video-view/video-view-impl.cpp index 0b431fc..2ec07ef 100644 --- a/dali-toolkit/internal/controls/video-view/video-view-impl.cpp +++ b/dali-toolkit/internal/controls/video-view/video-view-impl.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016 Samsung Electronics Co., Ltd. + * Copyright (c) 2017 Samsung Electronics Co., Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -29,6 +29,7 @@ // INTERNAL INCLUDES #include +#include namespace Dali { @@ -73,7 +74,7 @@ const char* const NATIVE_IMAGE_TARGET( "nativeImageTarget" ); } // anonymous namepsace VideoView::VideoView() -: Control( ControlBehaviour( ACTOR_BEHAVIOUR_NONE ) ), +: Control( ControlBehaviour( ACTOR_BEHAVIOUR_DEFAULT | DISABLE_STYLE_CHANGE_SIGNALS ) ), mCurrentVideoPlayPosition( 0 ), mSetRenderingTarget( false ), mIsPlay( false ), @@ -120,7 +121,7 @@ void VideoView::SetPropertyMap( Property::Map map ) mPropertyMap = map; Actor self( Self() ); - InitializeControlRenderer( self, mRenderer, mPropertyMap ); + Internal::InitializeVisual( self, mVisual, mPropertyMap ); Property::Value* widthValue = mPropertyMap.Find( "width" ); if( widthValue ) @@ -430,29 +431,29 @@ Property::Value VideoView::GetProperty( BaseObject* object, Property::Index prop void VideoView::SetDepthIndex( int depthIndex ) { - if( mRenderer ) + if( mVisual ) { - mRenderer.SetDepthIndex( depthIndex ); + mVisual.SetDepthIndex( depthIndex ); } } void VideoView::OnStageConnection( int depth ) { - Control::OnStageConnection( depth ); - - if( mRenderer ) + if( mVisual ) { CustomActor self = Self(); - mRenderer.SetOnStage( self ); + Toolkit::GetImplementation(mVisual).SetOnStage( self ); } + + Control::OnStageConnection( depth ); } void VideoView::OnStageDisconnection() { - if( mRenderer ) + if( mVisual ) { CustomActor self = Self(); - mRenderer.SetOffStage( self ); + Toolkit::GetImplementation(mVisual).SetOffStage( self ); } Control::OnStageDisconnection(); @@ -505,7 +506,12 @@ void VideoView::SetWindowSurfaceTarget() int curPos = mVideoPlayer.GetPlayPosition(); mSetRenderingTarget = true; - mRenderer.RemoveAndReset( self ); + + if( mVisual ) + { + Toolkit::GetImplementation(mVisual).SetOffStage(self); + mVisual.Reset(); + } mVideoPlayer.SetRenderingTarget( Dali::Adaptor::Get().GetNativeWindowHandle() ); mVideoPlayer.SetUrl( mUrl ); @@ -538,7 +544,7 @@ void VideoView::SetNativeImageTarget() mVideoPlayer.SetUrl( mUrl ); mVideoPlayer.FinishedSignal().Connect( this, &VideoView::EmitSignalFinish ); - InitializeControlRenderer( self, mRenderer, mNativeImage ); + Internal::InitializeVisual( self, mVisual, mNativeImage ); if( mIsPlay ) {