Revert "[Tizen] Add AutoRotation, LetterBox" 43/322243/1 accepted/tizen/7.0/unified/20250407.130755 accepted/tizen/7.0/unified/20250407.142204
authorJaehyun Cho <jae_hyun.cho@samsung.com>
Mon, 7 Apr 2025 03:45:13 +0000 (12:45 +0900)
committerJaehyun Cho <jae_hyun.cho@samsung.com>
Mon, 7 Apr 2025 03:45:20 +0000 (12:45 +0900)
This reverts commit bfb8671f550f3796c6b1ae22afb64bccaea18fce.

Change-Id: Ib1a327744cc561f3e82e7917ea7c47b4e6475d93

automated-tests/src/dali-toolkit/dali-toolkit-test-utils/toolkit-video-player.cpp
automated-tests/src/dali-toolkit/utc-Dali-VideoView.cpp
dali-toolkit/devel-api/controls/video-view/video-view-devel.cpp
dali-toolkit/devel-api/controls/video-view/video-view-devel.h
dali-toolkit/internal/controls/camera-view/camera-view-impl.cpp
dali-toolkit/internal/controls/video-view/video-view-impl.cpp
dali-toolkit/internal/controls/video-view/video-view-impl.h
dali-toolkit/internal/graphics/shaders/video-view-texture.vert

index 0d3eb0f5edaa2253320cabbd60e71af76549d4a1..9909164b661b80168704f70e5f1bd1a067a74e89 100755 (executable)
@@ -129,27 +129,6 @@ public:
 
   }
 
-  void SetAutoRotationEnabled(bool enable)
-  {
-
-  }
-
-  bool IsAutoRotationEnabled() const
-  {
-    return false;
-  }
-
-  void SetLetterBoxEnabled(bool enable)
-  {
-
-  }
-
-  bool IsLetterBoxEnabled() const
-  {
-    return false;
-  }
-
-
 public:
 
   std::string mUrl;
@@ -386,26 +365,5 @@ void VideoPlayer::LowerToBottom()
   Internal::Adaptor::GetImplementation( *this ).LowerToBottom();
 }
 
-void VideoPlayer::SetAutoRotationEnabled(bool enable)
-{
-  Internal::Adaptor::GetImplementation( *this ).SetAutoRotationEnabled(enable);
-}
-
-bool VideoPlayer::IsAutoRotationEnabled() const
-{
-  return Internal::Adaptor::GetImplementation( *this ).IsAutoRotationEnabled();
-}
-
-void VideoPlayer::SetLetterBoxEnabled(bool enable)
-{
-  Internal::Adaptor::GetImplementation( *this ).SetLetterBoxEnabled(enable);
-}
-
-bool VideoPlayer::IsLetterBoxEnabled() const
-{
-  return Internal::Adaptor::GetImplementation( *this ).IsLetterBoxEnabled();
-}
-
-
 } // namespace Dali;
 
index 8704a65e19d705084ba38c2681b6ab58a53b313c..4dbea796f42a768d0f0b707ccdb99598def946fa 100644 (file)
@@ -900,22 +900,3 @@ int UtcDaliVideoViewSynchronizationForWindowRotation(void)
 
   END_TEST;
 }
-
-// For coverage
-int UtcDaliVideoViewDisplayModeForCoverage(void)
-{
-  ToolkitTestApplication application;
-
-  VideoView videoView = VideoView::New();
-  DALI_TEST_CHECK(videoView);
-
-  Toolkit::DevelVideoView::SetAutoRotationEnabled(videoView, true);
-  // A false return is correct because there is no plugin.
-  DALI_TEST_EQUALS(false, Toolkit::DevelVideoView::IsAutoRotationEnabled(videoView), TEST_LOCATION);
-
-  Toolkit::DevelVideoView::SetLetterBoxEnabled(videoView, true);
-  // A false return is correct because there is no plugin.
-  DALI_TEST_EQUALS(false, Toolkit::DevelVideoView::IsLetterBoxEnabled(videoView), TEST_LOCATION);
-
-  END_TEST;
-}
index f5191978e1e7b4c7d5ddc3002f20b15bab71149b..f58501349ec8cfa798e764e6f38e80054e870c07 100644 (file)
@@ -41,26 +41,6 @@ void PlayAnimation(VideoView videoView, Animation animation)
   Dali::Toolkit::GetImpl(videoView).PlayAnimation(animation);\r
 }\r
 \r
-void SetAutoRotationEnabled(VideoView videoView, bool enable)\r
-{\r
-  Dali::Toolkit::GetImpl(videoView).SetAutoRotationEnabled(enable);\r
-}\r
-\r
-bool IsAutoRotationEnabled(VideoView videoView)\r
-{\r
-return Dali::Toolkit::GetImpl(videoView).IsAutoRotationEnabled();\r
-}\r
-\r
-void SetLetterBoxEnabled(VideoView videoView, bool enable)\r
-{\r
-  Dali::Toolkit::GetImpl(videoView).SetLetterBoxEnabled(enable);\r
-}\r
-\r
-bool IsLetterBoxEnabled(VideoView videoView)\r
-{\r
-  return Dali::Toolkit::GetImpl(videoView).IsLetterBoxEnabled();\r
-}\r
-\r
 } // namespace DevelVideoView\r
 \r
 } // namespace Toolkit\r
index c3543c80fade60f3ecde994442dc35cf694ab574..73d7826f2392f4c8d8ed85260a5c30bee062faa8 100644 (file)
@@ -60,38 +60,6 @@ DALI_TOOLKIT_API VideoView New(VideoSyncMode syncMode);
  */\r
 DALI_TOOLKIT_API void PlayAnimation(VideoView videoView, Animation animation);\r
 \r
-/**\r
- * @brief Sets auto rotation feature. If enabled, video will rotate automatically according to the video orientation.\r
- *\r
- * @param[in] videoView The current VideoView\r
- * @param[in] enable true if auto rotation should be enabled, false otherwise. Default value is false.\r
- */\r
-DALI_TOOLKIT_API void SetAutoRotationEnabled(VideoView videoView, bool enable);\r
-\r
-/**\r
- * @brief Checks whether auto rotation feature is enabled.\r
- *\r
- * @param[in] videoView The current VideoView\r
- * @return true if auto rotation is enabled, false otherwise. Default value is false.\r
- */\r
-DALI_TOOLKIT_API bool IsAutoRotationEnabled(VideoView videoView);\r
-\r
-/**\r
- * @brief Sets letter box feature. If enabled, the video will play in the video player's aspect ratio.\r
- *\r
- * @param[in] videoView The current VideoView\r
- * @param[in] enable true if letter box should be enabled, false otherwise. Default value is false.\r
- */\r
-DALI_TOOLKIT_API void SetLetterBoxEnabled(VideoView videoView, bool enable);\r
-\r
-/**\r
- * @brief Checks whether letter box feature is enabled.\r
- *\r
- * @param[in] videoView The current VideoView\r
- * @return true if letter box is enabled, false otherwise. Default value is false.\r
- */\r
-DALI_TOOLKIT_API bool IsLetterBoxEnabled(VideoView videoView);\r
-\r
 } // namespace DevelVideoView\r
 \r
 } // namespace Toolkit\r
index 3116f5221438c0642b52934ca78500b25d67e553..772c1a038224727740063836a5672a99bb05537b 100644 (file)
@@ -188,12 +188,7 @@ Dali::Shader CameraView::CreateShader(Dali::NativeImageSourcePtr nativeImageSour
 
   nativeImageSourcePtr->ApplyNativeFragmentShader(fragmentShader);
 
-  Dali::Shader shader = Dali::Shader::New(vertexShader, fragmentShader);
-  // Initialize shader properties
-  shader.RegisterProperty("uRotationMatrix", Property::Value(Vector4(1.0f, 0.0f, 0.0f, 1.0f)));
-  shader.RegisterProperty("uSizeRatio", Property::Value(Vector2(0.0f, 0.0f)));
-
-  return shader;
+  return Dali::Shader::New(vertexShader, fragmentShader);
 }
 
 } // namespace Internal
index 0ef2ea10ed6ca804d06c2edfa2e2a6171a4c3246..154caac0c31986bd7c02c225c37ce3f02e993b43 100644 (file)
@@ -711,7 +711,6 @@ void VideoView::SetNativeImageTarget()
     textureSet.SetTexture(0u, mNativeTexture);
   }
   Self().AddRenderer(mTextureRenderer);
-  mTextureRenderer.SetProperty(DevelRenderer::Property::RENDERING_BEHAVIOR, DevelRenderer::Rendering::CONTINUOUSLY);
 
   // Note VideoPlayer::SetRenderingTarget resets all the options. (e.g. url, mute, looping)
   mVideoPlayer.SetRenderingTarget(nativeImageSourcePtr);
@@ -888,11 +887,7 @@ Dali::Shader VideoView::CreateShader()
     DevelTexture::ApplyNativeFragmentShader(mNativeTexture, fragmentShader);
   }
 
-  Dali::Shader shader = Dali::Shader::New(vertexShader, fragmentShader);
-    // Initialize shader properties
-  shader.RegisterProperty("uRotationMatrix", Property::Value(Vector4(1.0f, 0.0f, 0.0f, 1.0f)));
-  shader.RegisterProperty("uSizeRatio", Property::Value(Vector2(0.0f, 0.0f)));
-  return shader;
+  return Dali::Shader::New(vertexShader, fragmentShader);
 }
 
 bool VideoView::GetStringFromProperty(const Dali::Property::Value& value, std::string& output)
@@ -959,27 +954,6 @@ VideoPlayer VideoView::GetVideoPlayer()
   return mVideoPlayer;
 }
 
-void VideoView::SetAutoRotationEnabled(bool enable)
-{
-  mVideoPlayer.SetAutoRotationEnabled(enable);
-}
-
-bool VideoView::IsAutoRotationEnabled() const
-{
-  return mVideoPlayer.IsAutoRotationEnabled();
-}
-
-void VideoView::SetLetterBoxEnabled(bool enable)
-{
-  mVideoPlayer.SetLetterBoxEnabled(enable);
-}
-
-bool VideoView::IsLetterBoxEnabled() const
-{
-  return mVideoPlayer.IsLetterBoxEnabled();
-}
-
-
 } // namespace Internal
 
 } // namespace Toolkit
index 707a6cbd907d59fc988c572d6d6e03f2b31d62a8..c8b2a83ff22f55b16ef85cfb375ebaeb41aea355 100644 (file)
@@ -278,30 +278,6 @@ public:
    */
   VideoPlayer GetVideoPlayer();
 
-  /**
-   * @brief Sets auto rotation feature. If enabled, video will rotate automatically according to the video orientation.
-   * @param[in] enable Whether to enable auto rotation feature. Default is false.
-   */
-  void SetAutoRotationEnabled(bool enable);
-
-  /**
-   * @brief Checks whether auto rotation feature is enabled.
-   * @return True if auto rotation feature is enabled. Default is false.
-   */
-  bool IsAutoRotationEnabled() const;
-
-  /**
-   * @brief Sets letter box feature. If enabled, the video will play in the video player's aspect ratio.
-   * @param[in] enable Whether to enable letter box feature. Default is false.
-   */
-  void SetLetterBoxEnabled(bool enable);
-
-  /**
-   * @brief Checks whether letter box feature is enabled.
-   * @return True if letter box feature is enabled. Default is false.
-   */
-  bool IsLetterBoxEnabled() const;
-
 private: // From Control
   /**
    * @copydoc Toolkit::Control::OnInitialize()
index 59b908c4502cd184a1d16fbc6df0f308539c92ce..79cbb239370e9a33937092e7344814ab30be6867 100644 (file)
@@ -2,25 +2,10 @@ attribute mediump vec2 aPosition;
 varying mediump vec2 vTexCoord;
 uniform highp mat4 uMvpMatrix;
 uniform highp vec3 uSize;
-uniform highp vec2 uSizeRatio;
-uniform highp mat2 uRotationMatrix;
 varying mediump vec2 sTexCoordRect;
 
-highp vec2 getSize(highp vec2 size)
-{
-  if (size.x < 0.5 || size.y < 0.5)
-  {
-    return uSize.xy;
-  }
-  else
-  {
-    highp float ratio = min(uSize.x / size.x, uSize.y / size.y);
-    return vec2(size.xy * ratio);
-  }
-}
-
 void main()
 {
-  gl_Position = uMvpMatrix * vec4(aPosition * getSize(uSizeRatio), 0.0, 1.0);
-  vTexCoord = aPosition * uRotationMatrix + vec2(0.5);
+  gl_Position = uMvpMatrix * vec4(aPosition * uSize.xy, 0.0, 1.0);
+  vTexCoord = aPosition + vec2(0.5);
 }