Apply to scene connection/disconnection for video player 48/311348/9
authorWonsik Jung <sidein@samsung.com>
Sun, 19 May 2024 09:49:56 +0000 (18:49 +0900)
committerWonsik Jung <sidein@samsung.com>
Mon, 5 Aug 2024 06:00:05 +0000 (15:00 +0900)
Change-Id: I61b0d1f8d7798ac4be4e2f6dc6751890405ea11e

automated-tests/src/dali-toolkit/dali-toolkit-test-utils/toolkit-video-player.cpp
dali-toolkit/internal/controls/video-view/video-view-impl.cpp

index 9909164b661b80168704f70e5f1bd1a067a74e89..899c098126778eef653cfe68dc5200cc5f5baa23 100755 (executable)
@@ -129,6 +129,16 @@ public:
 
   }
 
+  void SceneConnection()
+  {
+
+  }
+
+  void SceneDisconnection()
+  {
+
+  }
+
 public:
 
   std::string mUrl;
@@ -365,5 +375,15 @@ void VideoPlayer::LowerToBottom()
   Internal::Adaptor::GetImplementation( *this ).LowerToBottom();
 }
 
+void VideoPlayer::SceneConnection()
+{
+  Internal::Adaptor::GetImplementation( *this ).SceneConnection();
+}
+
+void VideoPlayer::SceneDisconnection()
+{
+  Internal::Adaptor::GetImplementation( *this ).SceneDisconnection();
+}
+
 } // namespace Dali;
 
index 5fa13de7a4d222dd3b6f3aaea12f1e378acdcf8f..8524950acf3e834667d8b31c09cda8db5aab1ceb 100644 (file)
@@ -518,11 +518,15 @@ void VideoView::OnSceneConnection(int depth)
     SetWindowSurfaceTarget();
   }
 
+  DALI_LOG_RELEASE_INFO("Calls mVideoPlayer.SceneConnection()\n");
+  mVideoPlayer.SceneConnection();
   Control::OnSceneConnection(depth);
 }
 
 void VideoView::OnSceneDisconnection()
 {
+  DALI_LOG_RELEASE_INFO("Calls mVideoPlayer.SceneDisconnection()\n");
+  mVideoPlayer.SceneDisconnection();
   Control::OnSceneDisconnection();
 }
 
@@ -530,7 +534,11 @@ void VideoView::OnSizeSet(const Vector3& targetSize)
 {
   if(mIsUnderlay && mSyncMode == Dali::VideoSyncMode::ENABLED)
   {
-    SetFrameRenderCallback();
+    // TODO: SR Video shell's designed is completed,
+    // it will be re-designed and implemented.
+    // Until it is completed, the below code will be commented.
+
+    //SetFrameRenderCallback();
     mVideoPlayer.StartSynchronization();
   }
   Control::OnSizeSet(targetSize);
@@ -732,7 +740,11 @@ void VideoView::UpdateDisplayArea(Dali::PropertyNotification& source)
 {
   // If mSyncMode is enabled, Video player's size and poistion is updated in Video player's constraint.
   // Because video view and player should be work syncronization.
-  if(!mIsUnderlay || mSyncMode == Dali::VideoSyncMode::ENABLED)
+
+  // TODO: SR Video shell's designed is completed,
+  // it will be re-designed and implemented.
+  // Until it is completed, the below code will be commented.
+  if(!mIsUnderlay /* || mSyncMode == Dali::VideoSyncMode::ENABLED */)
   {
     return;
   }
@@ -819,7 +831,11 @@ Any VideoView::GetMediaPlayer()
 void VideoView::OnAnimationFinished(Animation& animation)
 {
   // send desync
-  SetFrameRenderCallback();
+  // TODO: SR Video shell's designed is completed,
+  // it will be re-designed and implemented.
+  // Until it is completed, the below code will be commented.
+
+  //SetFrameRenderCallback();
 }
 
 void VideoView::OnWindowResized(Dali::Window winHandle, Dali::Window::WindowSize size)