Add api for get the internal media player handle of the VideoView accepted/tizen/5.5/unified/20200128.122313 submit/tizen_5.5/20200123.060916
authorJoogab Yun <joogab.yun@samsung.com>
Mon, 13 Jan 2020 08:17:54 +0000 (17:17 +0900)
committerJoogab Yun <joogab.yun@samsung.com>
Wed, 22 Jan 2020 01:19:46 +0000 (10:19 +0900)
Change-Id: I1671caaa688038c6ee15622c72317b4c90487b98

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 [new file with mode: 0755]
dali-toolkit/devel-api/controls/video-view/video-view-devel.h [new file with mode: 0755]
dali-toolkit/devel-api/file.list [changed mode: 0644->0755]
dali-toolkit/internal/controls/video-view/video-view-impl.cpp
dali-toolkit/internal/controls/video-view/video-view-impl.h

index b79213d..957681e 100755 (executable)
@@ -93,6 +93,11 @@ public:
     mDisplyMode = mode;
   }
 
+  Any GetMediaPlayer()
+  {
+    return NULL;
+  }
+
 
 public:
 
@@ -288,5 +293,10 @@ Dali::VideoPlayerPlugin::DisplayMode::Type VideoPlayer::GetDisplayMode() const
   return Internal::Adaptor::GetImplementation( *this ).GetDisplayMode();
 }
 
+Any VideoPlayer::GetMediaPlayer()
+{
+  return Internal::Adaptor::GetImplementation( *this ).GetMediaPlayer();
+}
+
 } // namespace Dali;
 
index 03da3ff..a38ec18 100755 (executable)
@@ -20,6 +20,7 @@
 #include <dali-toolkit-test-suite-utils.h>
 #include <dali-toolkit/dali-toolkit.h>
 #include <dali-toolkit/public-api/controls/video-view/video-view.h>
+#include <dali-toolkit/devel-api/controls/video-view/video-view-devel.h>
 
 using namespace Dali;
 using namespace Dali::Toolkit;
@@ -301,6 +302,9 @@ int UtcDaliVideoViewMethodsForCoverage(void)
   videoView.Stop();
   videoView.Forward(10);
   videoView.Backward(10);
+
+  Toolkit::DevelVideoView::GetMediaPlayer( videoView );
+
   VideoView::VideoViewSignalType& signal = videoView.FinishedSignal();
   DALI_TEST_EQUALS( 0, signal.GetConnectionCount(), TEST_LOCATION );
 
diff --git a/dali-toolkit/devel-api/controls/video-view/video-view-devel.cpp b/dali-toolkit/devel-api/controls/video-view/video-view-devel.cpp
new file mode 100755 (executable)
index 0000000..317d34d
--- /dev/null
@@ -0,0 +1,41 @@
+/*\r
+ * Copyright (c) 2020 Samsung Electronics Co., Ltd.\r
+ *\r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ * http://www.apache.org/licenses/LICENSE-2.0\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ *\r
+ */\r
+\r
+// INTERNAL INCLUDES\r
+#include <dali-toolkit/devel-api/controls/video-view/video-view-devel.h>\r
+#include <dali-toolkit/internal/controls/video-view/video-view-impl.h>\r
+\r
+namespace Dali\r
+{\r
+\r
+namespace Toolkit\r
+{\r
+\r
+namespace DevelVideoView\r
+{\r
+\r
+Any GetMediaPlayer( VideoView videoView )\r
+{\r
+  return Dali::Toolkit::GetImpl( videoView ).GetMediaPlayer();\r
+}\r
+\r
+\r
+} // namespace DevelVideoView\r
+\r
+} // namespace Toolkit\r
+\r
+} // namespace Dali\r
diff --git a/dali-toolkit/devel-api/controls/video-view/video-view-devel.h b/dali-toolkit/devel-api/controls/video-view/video-view-devel.h
new file mode 100755 (executable)
index 0000000..b121506
--- /dev/null
@@ -0,0 +1,49 @@
+#ifndef DALI_TOOLKIT_VIDEO_VIEW_DEVEL_H\r
+#define DALI_TOOLKIT_VIDEO_VIEW_DEVEL_H\r
+\r
+/*\r
+ * Copyright (c) 2020 Samsung Electronics Co., Ltd.\r
+ *\r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ * http://www.apache.org/licenses/LICENSE-2.0\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ *\r
+ */\r
+\r
+// INTERNAL INCLUDES\r
+#include <dali-toolkit/public-api/controls/video-view/video-view.h>\r
+#include <dali/public-api/object/any.h>\r
+\r
+namespace Dali\r
+{\r
+\r
+namespace Toolkit\r
+{\r
+\r
+namespace DevelVideoView\r
+{\r
+\r
+\r
+/**\r
+ * @brief Returns the internal media player.\r
+ * @param[in] videoView The current VideoView\r
+ * @return The internal media player of current VideoView\r
+ */\r
+DALI_TOOLKIT_API Any GetMediaPlayer( VideoView videoView );\r
+\r
+\r
+} // namespace DevelVideoView\r
+\r
+} // namespace Toolkit\r
+\r
+} // namespace Dali\r
+\r
+#endif // DALI_TOOLKIT_VIDEO_VIEW_DEVEL_H\r
old mode 100644 (file)
new mode 100755 (executable)
index fb09d46..dfba750
@@ -30,6 +30,7 @@ SET( devel_api_src_files
   ${devel_api_src_dir}/controls/text-controls/text-selection-popup.cpp
   ${devel_api_src_dir}/controls/text-controls/text-selection-toolbar.cpp
   ${devel_api_src_dir}/controls/tool-bar/tool-bar.cpp
+  ${devel_api_src_dir}/controls/video-view/video-view-devel.cpp
   ${devel_api_src_dir}/controls/web-view/web-view.cpp
   ${devel_api_src_dir}/focus-manager/keyinput-focus-manager.cpp
   ${devel_api_src_dir}/focus-manager/keyboard-focus-manager-devel.cpp
@@ -204,6 +205,10 @@ SET( devel_api_gaussian_blur_view_header_files
   ${devel_api_src_dir}/controls/gaussian-blur-view/gaussian-blur-view.h
 )
 
+SET( devel_api_video_view_header_files
+  ${devel_api_src_dir}/controls/video-view/video-view-devel.h
+)
+
 SET( devel_api_web_view_header_files
   ${devel_api_src_dir}/controls/web-view/web-view.h
 )
@@ -244,6 +249,7 @@ SET( DEVEL_API_HEADERS ${DEVEL_API_HEADERS}
   ${devel_api_tooltip_header_files}
   ${devel_api_transition_effects_header_files}
   ${devel_api_gaussian_blur_view_header_files}
+  ${devel_api_video_view_header_files}
   ${devel_api_web_view_header_files}
   ${devel_api_drag_and_drop_detector_header_files}
 )
index 7fcab03..8c34ab5 100755 (executable)
@@ -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";
index ca8a2f8..3d345a3 100755 (executable)
@@ -251,6 +251,11 @@ public:
    */
   int GetDisplayMode() const;
 
+  /**
+   * @brief Gets internal media player.
+   */
+  Any GetMediaPlayer();
+
 private: // From Control
 
   /**