/*
- * 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.
// INTERNAL INCLUDES
#include <dali-toolkit/public-api/controls/video-view/video-view.h>
+#include <dali-toolkit/internal/visuals/visual-factory-impl.h>
namespace Dali
{
} // anonymous namepsace
VideoView::VideoView()
-: Control( ControlBehaviour( ACTOR_BEHAVIOUR_NONE ) ),
+: Control( ControlBehaviour( ACTOR_BEHAVIOUR_DEFAULT | DISABLE_STYLE_CHANGE_SIGNALS ) ),
mCurrentVideoPlayPosition( 0 ),
mSetRenderingTarget( false ),
mIsPlay( false ),
mPropertyMap = map;
Actor self( Self() );
- InitializeControlRenderer( self, mRenderer, mPropertyMap );
+ Internal::InitializeVisual( self, mVisual, mPropertyMap );
Property::Value* widthValue = mPropertyMap.Find( "width" );
if( widthValue )
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();
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 );
mVideoPlayer.SetUrl( mUrl );
mVideoPlayer.FinishedSignal().Connect( this, &VideoView::EmitSignalFinish );
- InitializeControlRenderer( self, mRenderer, mNativeImage );
+ Internal::InitializeVisual( self, mVisual, mNativeImage );
if( mIsPlay )
{