X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=dali-toolkit%2Finternal%2Fcontrols%2Fvideo-view%2Fvideo-view-impl.cpp;h=cb5bfcdc02bfa6c44262d5dd01710dadf2a4f8c8;hb=5d48d558217c4667604a8326c5d81a9befe8b897;hp=dfd441baca1be3adf9596935922a28ef888bf81a;hpb=b3636da16f13873c444b913df7bc6acf5b9dacb8;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 dfd441b..cb5bfcd 100755 --- 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) 2018 Samsung Electronics Co., Ltd. + * Copyright (c) 2019 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. @@ -25,7 +25,6 @@ #include #include #include -#include #include #include #include @@ -33,6 +32,7 @@ // INTERNAL INCLUDES #include #include +#include namespace Dali { @@ -611,7 +611,7 @@ void VideoView::SetWindowSurfaceTarget() { Actor self = Self(); - if( !self.OnStage() ) + if( !self.GetProperty< bool >( Actor::Property::CONNECTED_TO_SCENE ) ) { // When the control is off the stage, it does not have Window. return; @@ -736,11 +736,11 @@ void VideoView::UpdateDisplayArea( Dali::PropertyNotification& source ) Actor self( Self() ); - bool positionUsesAnchorPoint = self.GetProperty( DevelActor::Property::POSITION_USES_ANCHOR_POINT ).Get< bool >(); - Vector3 actorSize = self.GetCurrentSize() * self.GetCurrentScale(); - Vector3 anchorPointOffSet = actorSize * ( positionUsesAnchorPoint ? self.GetCurrentAnchorPoint() : AnchorPoint::TOP_LEFT ); + bool positionUsesAnchorPoint = self.GetProperty( Actor::Property::POSITION_USES_ANCHOR_POINT ).Get< bool >(); + Vector3 actorSize = self.GetCurrentProperty< Vector3 >( Actor::Property::SIZE ) * self.GetCurrentProperty< Vector3 >( Actor::Property::SCALE ); + Vector3 anchorPointOffSet = actorSize * ( positionUsesAnchorPoint ? self.GetCurrentProperty< Vector3 >( Actor::Property::ANCHOR_POINT ) : AnchorPoint::TOP_LEFT ); - Vector2 screenPosition = self.GetProperty( DevelActor::Property::SCREEN_POSITION ).Get< Vector2 >(); + Vector2 screenPosition = self.GetProperty( Actor::Property::SCREEN_POSITION ).Get< Vector2 >(); mDisplayArea.x = screenPosition.x - anchorPointOffSet.x; mDisplayArea.y = screenPosition.y - anchorPointOffSet.y; @@ -808,6 +808,11 @@ int VideoView::GetDisplayMode() const return static_cast< int >( mVideoPlayer.GetDisplayMode() ); } +Any VideoView::GetMediaPlayer() +{ + return mVideoPlayer.GetMediaPlayer(); +} + Dali::Shader VideoView::CreateShader() { std::string fragmentShader = "#extension GL_OES_EGL_image_external:require\n";