Make Capture api common. 86/232086/1
authorSeungho, Baek <sbsh.baek@samsung.com>
Fri, 27 Mar 2020 06:06:31 +0000 (15:06 +0900)
committerSeungho, Baek <sbsh.baek@samsung.com>
Tue, 28 Apr 2020 06:25:49 +0000 (15:25 +0900)
 - Current implementation, Capture can be used only in the wearable profile

Change-Id: I269e5e5b604b6deba97980ce53493fd0ae9039c0
Signed-off-by: Seungho, Baek <sbsh.baek@samsung.com>
build/tizen/profiles/wearable-profile.cmake
dali/internal/system/common/capture-impl.cpp [new file with mode: 0644]
dali/internal/system/common/capture-impl.h [new file with mode: 0644]
dali/internal/system/file.list
dali/internal/system/tizen-wayland/tizen-wearable/capture-impl-tizen.cpp [deleted file]
dali/internal/system/tizen-wayland/tizen-wearable/capture-impl.h [deleted file]
dali/internal/system/tizen-wayland/tizen-wearable/capture.cpp [deleted file]
dali/public-api/capture/capture.cpp [new file with mode: 0644]
dali/public-api/capture/capture.h
dali/public-api/file.list

index 8488967dfe25f66a863bbf6f30349c8df5039a69..3682664ff0e4824a7598b44ca9675309af2771f1 100644 (file)
@@ -30,6 +30,7 @@ SET( SOURCES
     ${adaptor_styling_common_src_files}
     ${adaptor_system_common_src_files}
     ${adaptor_system_linux_src_files}
+    ${adaptor_system_tizen_wayland_src_files}
     ${adaptor_system_tizen_wearable_src_files}
     ${adaptor_text_common_src_files}
     ${adaptor_resampler_src_files}
diff --git a/dali/internal/system/common/capture-impl.cpp b/dali/internal/system/common/capture-impl.cpp
new file mode 100644 (file)
index 0000000..1ba6f58
--- /dev/null
@@ -0,0 +1,300 @@
+/*
+ * 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.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+// CLASS HEADER
+#include <dali/internal/system/common/capture-impl.h>
+
+// EXTERNAL INCLUDES
+#include <fstream>
+#include <string.h>
+#include <dali/public-api/common/stage.h>
+#include <dali/public-api/common/vector-wrapper.h>
+#include <dali/public-api/render-tasks/render-task-list.h>
+#include <dali/integration-api/debug.h>
+
+// INTERNAL INCLUDES
+#include <dali/integration-api/adaptor-framework/adaptor.h>
+
+namespace
+{
+unsigned int TIME_OUT_DURATION = 1000;
+}
+
+namespace Dali
+{
+
+namespace Internal
+{
+
+namespace Adaptor
+{
+
+Capture::Capture()
+: mTimer(),
+  mPath(),
+  mNativeImageSourcePtr( NULL )
+{
+}
+
+Capture::Capture( Dali::CameraActor cameraActor )
+: mCameraActor( cameraActor ),
+  mTimer(),
+  mPath(),
+  mNativeImageSourcePtr( NULL )
+{
+}
+
+Capture::~Capture()
+{
+  DeleteNativeImageSource();
+}
+
+CapturePtr Capture::New()
+{
+  CapturePtr pWorker = new Capture();
+
+  return pWorker;
+}
+
+CapturePtr Capture::New( Dali::CameraActor cameraActor )
+{
+  CapturePtr pWorker = new Capture( cameraActor );
+
+  return pWorker;
+}
+
+void Capture::Start( Dali::Actor source, const Dali::Vector2& size, const std::string &path, const Dali::Vector4& clearColor )
+{
+  DALI_ASSERT_ALWAYS(path.size() > 4 && "Path is invalid.");
+
+  // Increase the reference count focely to avoid application mistake.
+  Reference();
+
+  mPath = path;
+
+  DALI_ASSERT_ALWAYS(source && "Source is NULL.");
+
+  UnsetResources();
+  SetupResources( size, clearColor, source );
+}
+
+Dali::Capture::CaptureFinishedSignalType& Capture::FinishedSignal()
+{
+  return mFinishedSignal;
+}
+
+void Capture::CreateNativeImageSource( const Vector2& size )
+{
+  Dali::Adaptor& adaptor = Dali::Adaptor::Get();
+
+  DALI_ASSERT_ALWAYS(adaptor.IsAvailable() && "Dali::Adaptor is not available.");
+
+  DALI_ASSERT_ALWAYS(!mNativeImageSourcePtr && "NativeImageSource is already created.");
+
+  // create the NativeImageSource object with our surface
+  mNativeImageSourcePtr = Dali::NativeImageSource::New( size.width, size.height, Dali::NativeImageSource::COLOR_DEPTH_DEFAULT );
+}
+
+void Capture::DeleteNativeImageSource()
+{
+  DALI_ASSERT_ALWAYS(mNativeImageSourcePtr && "mNativeImageSource is NULL.");
+
+  mNativeImageSourcePtr.Reset();
+}
+
+bool Capture::IsNativeImageSourceCreated()
+{
+  return mNativeImageSourcePtr;
+}
+
+void Capture::CreateFrameBuffer()
+{
+  DALI_ASSERT_ALWAYS(mNativeImageSourcePtr && "NativeImageSource is NULL.");
+
+  DALI_ASSERT_ALWAYS(!mFrameBuffer && "FrameBuffer is already created.");
+
+  mNativeTexture = Dali::Texture::New( *mNativeImageSourcePtr );
+
+  // Create a FrameBuffer object with depth attachments.
+  mFrameBuffer = Dali::FrameBuffer::New( mNativeTexture.GetWidth(), mNativeTexture.GetHeight(), Dali::FrameBuffer::Attachment::DEPTH );
+  // Add a color attachment to the FrameBuffer object.
+  mFrameBuffer.AttachColorTexture( mNativeTexture );
+}
+
+void Capture::DeleteFrameBuffer()
+{
+  DALI_ASSERT_ALWAYS(mFrameBuffer && "FrameBuffer is NULL.");
+
+  mFrameBuffer.Reset();
+  mNativeTexture.Reset();
+}
+
+bool Capture::IsFrameBufferCreated()
+{
+  return mFrameBuffer;
+}
+
+void Capture::SetupRenderTask( Dali::Actor source, const Dali::Vector4& clearColor )
+{
+  DALI_ASSERT_ALWAYS(source && "Source is empty.");
+
+  mSource = source;
+
+  // Check the original parent about source.
+  mParent = mSource.GetParent();
+
+  Dali::Stage stage = Dali::Stage::GetCurrent();
+  Dali::Size stageSize = stage.GetSize();
+
+  // Add to stage for rendering the source. If source isn't on the stage then it never be rendered.
+  stage.Add( mSource );
+
+  if( !mCameraActor )
+  {
+    mCameraActor = Dali::CameraActor::New( stageSize );
+    mCameraActor.SetParentOrigin( ParentOrigin::CENTER );
+    mCameraActor.SetAnchorPoint( AnchorPoint::CENTER );
+  }
+
+  stage.Add( mCameraActor );
+
+  DALI_ASSERT_ALWAYS(mFrameBuffer && "Framebuffer is NULL.");
+
+  DALI_ASSERT_ALWAYS(!mRenderTask && "RenderTask is already created.");
+
+  Dali::RenderTaskList taskList = stage.GetRenderTaskList();
+  mRenderTask = taskList.CreateTask();
+  mRenderTask.SetRefreshRate( Dali::RenderTask::REFRESH_ONCE );
+  mRenderTask.SetSourceActor( source );
+  mRenderTask.SetCameraActor( mCameraActor );
+  mRenderTask.SetScreenToFrameBufferFunction( Dali::RenderTask::FULLSCREEN_FRAMEBUFFER_FUNCTION );
+  mRenderTask.SetFrameBuffer( mFrameBuffer );
+  mRenderTask.SetClearColor( clearColor );
+  mRenderTask.SetClearEnabled( true );
+  mRenderTask.SetProperty( Dali::RenderTask::Property::REQUIRES_SYNC, true );
+  mRenderTask.FinishedSignal().Connect( this, &Capture::OnRenderFinished );
+  mRenderTask.GetCameraActor().SetInvertYAxis( true );
+
+  mTimer = Dali::Timer::New( TIME_OUT_DURATION );
+  mTimer.TickSignal().Connect( this, &Capture::OnTimeOut );
+  mTimer.Start();
+}
+
+void Capture::UnsetRenderTask()
+{
+  DALI_ASSERT_ALWAYS(mCameraActor && "CameraActor is NULL.");
+
+  if( mParent )
+  {
+    // Restore the parent of source.
+    mParent.Add( mSource );
+    mParent.Reset();
+  }
+  else
+  {
+    mSource.Unparent();
+  }
+
+  mSource.Reset();
+
+  mTimer.Reset();
+
+  mCameraActor.Unparent();
+  mCameraActor.Reset();
+
+  DALI_ASSERT_ALWAYS( mRenderTask && "RenderTask is NULL." );
+
+  Dali::RenderTaskList taskList = Dali::Stage::GetCurrent().GetRenderTaskList();
+  taskList.RemoveTask( mRenderTask );
+  mRenderTask.Reset();
+}
+
+bool Capture::IsRenderTaskSetup()
+{
+  return mCameraActor && mRenderTask;
+}
+
+void Capture::SetupResources( const Dali::Vector2& size, const Dali::Vector4& clearColor, Dali::Actor source )
+{
+  CreateNativeImageSource( size );
+
+  CreateFrameBuffer();
+
+  SetupRenderTask( source, clearColor );
+}
+
+void Capture::UnsetResources()
+{
+  if( IsRenderTaskSetup() )
+  {
+    UnsetRenderTask();
+  }
+
+  if( IsFrameBufferCreated() )
+  {
+    DeleteFrameBuffer();
+  }
+}
+
+void Capture::OnRenderFinished( Dali::RenderTask& task )
+{
+  Dali::Capture::FinishState state = Dali::Capture::FinishState::SUCCEEDED;
+
+  mTimer.Stop();
+
+  if( !Save() )
+  {
+    state = Dali::Capture::FinishState::FAILED;
+    DALI_LOG_ERROR("Fail to Capture Path[%s]", mPath.c_str());
+  }
+
+  Dali::Capture handle( this );
+  mFinishedSignal.Emit( handle, state );
+
+  UnsetResources();
+
+  // Decrease the reference count forcely. It is increased at Start().
+  Unreference();
+}
+
+bool Capture::OnTimeOut()
+{
+  Dali::Capture::FinishState state = Dali::Capture::FinishState::FAILED;
+
+  Dali::Capture handle( this );
+  mFinishedSignal.Emit( handle, state );
+
+  UnsetResources();
+
+  // Decrease the reference count forcely. It is increased at Start().
+  Unreference();
+
+  return false;
+}
+
+bool Capture::Save()
+{
+  DALI_ASSERT_ALWAYS(mNativeImageSourcePtr && "mNativeImageSourcePtr is NULL");
+
+  return mNativeImageSourcePtr->EncodeToFile( mPath );
+}
+
+}  // End of namespace Adaptor
+
+}  // End of namespace Internal
+
+}  // End of namespace Dali
diff --git a/dali/internal/system/common/capture-impl.h b/dali/internal/system/common/capture-impl.h
new file mode 100644 (file)
index 0000000..69d97e2
--- /dev/null
@@ -0,0 +1,221 @@
+#ifndef DALI_INTERNAL_CAPTURE_H
+#define DALI_INTERNAL_CAPTURE_H
+
+/*
+ * Copyright (c) 2018 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.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+// EXTERNAL INCLUDES
+#include <string>
+#include <memory>
+#include <dali/public-api/object/ref-object.h>
+#include <dali/public-api/object/base-object.h>
+#include <dali/public-api/render-tasks/render-task.h>
+#include <dali/public-api/rendering/texture.h>
+#include <dali/public-api/rendering/frame-buffer.h>
+
+// INTERNAL INCLUDES
+#include <dali/public-api/dali-adaptor-common.h>
+#include <dali/public-api/capture/capture.h>
+#include <dali/public-api/adaptor-framework/native-image-source.h>
+#include <dali/public-api/adaptor-framework/timer.h>
+
+namespace Dali
+{
+
+namespace Internal
+{
+
+namespace Adaptor
+{
+
+class Capture;
+typedef IntrusivePtr<Capture> CapturePtr;
+
+class Capture : public BaseObject, public ConnectionTracker
+{
+public:
+  /**
+   * @brief Constructor.
+   */
+  Capture();
+
+  Capture( Dali::CameraActor cameraActor );
+
+  /**
+   * @copydoc Dali::Capture::New
+   */
+  static CapturePtr New();
+
+  /**
+   * @copydoc Dali::Capture::New
+   */
+  static CapturePtr New( Dali::CameraActor cameraActor );
+
+  /**
+   * @copydoc Dali::Capture::Start
+   */
+  void Start( Dali::Actor source, const Dali::Vector2& size, const std::string &path, const Dali::Vector4& clearColor );
+
+  /**
+   * @copydoc Dali::Capture::FinishedSignal
+   */
+  Dali::Capture::CaptureFinishedSignalType& FinishedSignal();
+
+protected:
+
+  /**
+   * @brief A reference counted object may only be deleted by calling Unreference()
+   */
+  virtual ~Capture();
+
+private:
+  /**
+   * @brief Create native image source.
+   */
+  void CreateNativeImageSource( const Dali::Vector2& size );
+
+  /**
+   * @brief Delete native image source.
+   */
+  void DeleteNativeImageSource();
+
+  /**
+   * @brief Query whether native image source is created or not.
+   *
+   * @return True is native image source is created.
+   */
+  bool IsNativeImageSourceCreated();
+
+  /**
+   * @brief Create frame buffer.
+   */
+  void CreateFrameBuffer();
+
+  /**
+   * @brief Delete frame buffer.
+   */
+  void DeleteFrameBuffer();
+
+  /**
+   * @brief Query whether frame buffer is created or not.
+   *
+   * @return True is frame buffer is created.
+   */
+  bool IsFrameBufferCreated();
+
+  /**
+   * @brief Setup render task.
+   *
+   * @param[in] source is captured.
+   * @param[in] clearColor background color
+   */
+  void SetupRenderTask( Dali::Actor source, const Dali::Vector4& clearColor );
+
+  /**
+   * @brief Unset render task.
+   */
+  void UnsetRenderTask();
+
+  /**
+   * @brief Query whether render task is setup or not.
+   *
+   * @return True is render task is setup.
+   */
+  bool IsRenderTaskSetup();
+
+  /**
+   * @brief Setup resources for capture.
+   *
+   * @param[in] size is surface size.
+   * @param[in] clearColor is clear color of surface.
+   * @param[in] source is captured.
+   */
+  void SetupResources( const Dali::Vector2& size, const Dali::Vector4& clearColor, Dali::Actor source );
+
+  /**
+   * @brief Unset resources for capture.
+   */
+  void UnsetResources();
+
+  /**
+   * @brief Callback when render is finished.
+   *
+   * @param[in] task is used for capture.
+   */
+  void OnRenderFinished( Dali::RenderTask& task );
+
+  /**
+   * @brief Callback when timer is finished.
+   *
+   * @return True is timer start again.
+   */
+  bool OnTimeOut();
+
+  /**
+   * @brief Save framebuffer.
+   *
+   * @return True is success to save, false is fail.
+   */
+  bool Save();
+
+private:
+
+  // Undefined
+  Capture( const Capture& );
+
+  // Undefined
+  Capture& operator=( const Capture& rhs );
+
+private:
+  Dali::Texture                               mNativeTexture;
+  Dali::FrameBuffer                           mFrameBuffer;
+  Dali::RenderTask                            mRenderTask;
+  Dali::Actor                                 mParent;
+  Dali::Actor                                 mSource;
+  Dali::CameraActor                           mCameraActor;
+  Dali::Timer                                 mTimer;           ///< For timeout.
+  Dali::Capture::CaptureFinishedSignalType    mFinishedSignal;
+  std::string                                 mPath;
+  Dali::NativeImageSourcePtr                  mNativeImageSourcePtr;  ///< pointer to surface image
+};
+
+}  // End of namespace Adaptor
+}  // End of namespace Internal
+
+// Helpers for public-api forwarding methods
+
+inline Internal::Adaptor::Capture& GetImpl( Dali::Capture& captureWorker)
+{
+  DALI_ASSERT_ALWAYS( captureWorker && "Capture handle is empty" );
+
+  BaseObject& handle = captureWorker.GetBaseObject();
+
+  return static_cast< Internal::Adaptor::Capture& >( handle );
+}
+
+inline const Internal::Adaptor::Capture& GetImpl( const Dali::Capture& captureWorker )
+{
+  DALI_ASSERT_ALWAYS( captureWorker && "Capture handle is empty" );
+
+  const BaseObject& handle = captureWorker.GetBaseObject();
+
+  return static_cast< const Internal::Adaptor::Capture& >( handle );
+}
+
+}  // End of namespace Dali
+
+#endif // DALI_INTERNAL_CAPTURE_H
index 3c5be55fb326e257f20aaa60afe6aeeebed99ae4..42bef31b56b9d6c4bd319435f1e1b7285d8f54d1 100644 (file)
@@ -2,6 +2,7 @@
 # module: system, backend: common
 SET( adaptor_system_common_src_files
     ${adaptor_system_dir}/common/abort-handler.cpp
+    ${adaptor_system_dir}/common/capture-impl.cpp
     ${adaptor_system_dir}/common/color-controller-impl.cpp
     ${adaptor_system_dir}/common/command-line-options.cpp
     ${adaptor_system_dir}/common/configuration-manager.cpp
@@ -50,16 +51,7 @@ SET( adaptor_system_tizen_wayland_src_files
 
 # module: system, backend: tizen-wearable
 SET( adaptor_system_tizen_wearable_src_files
-    ${adaptor_system_dir}/common/shared-file.cpp
-    ${adaptor_system_dir}/common/trigger-event.cpp
-    ${adaptor_system_dir}/common/trigger-event-factory.cpp
-    ${adaptor_system_dir}/tizen-wayland/logging-tizen.cpp
-    ${adaptor_system_dir}/tizen-wayland/tizen-wearable/capture.cpp
-    ${adaptor_system_dir}/tizen-wayland/tizen-wearable/capture-impl-tizen.cpp
     ${adaptor_system_dir}/tizen-wayland/tizen-wearable/watch-time.cpp
-    ${adaptor_system_dir}/tizen-wayland/system-settings-tizen.cpp
-    ${adaptor_system_dir}/tizen-wayland/widget-application-impl-tizen.cpp
-    ${adaptor_system_dir}/tizen-wayland/widget-controller-tizen.cpp
 )
 
 # module: system, backend: ubuntu-x11
diff --git a/dali/internal/system/tizen-wayland/tizen-wearable/capture-impl-tizen.cpp b/dali/internal/system/tizen-wayland/tizen-wearable/capture-impl-tizen.cpp
deleted file mode 100755 (executable)
index 0c9487e..0000000
+++ /dev/null
@@ -1,360 +0,0 @@
-/*
- * 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.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-// CLASS HEADER
-#include <dali/internal/system/tizen-wayland/tizen-wearable/capture-impl.h>
-
-// EXTERNAL INCLUDES
-#include <fstream>
-#include <string.h>
-#include <dali/public-api/common/stage.h>
-#include <dali/public-api/common/vector-wrapper.h>
-#include <dali/public-api/render-tasks/render-task-list.h>
-#include <dali/integration-api/debug.h>
-
-// INTERNAL INCLUDES
-#include <dali/integration-api/adaptor-framework/adaptor.h>
-
-namespace
-{
-unsigned int TIME_OUT_DURATION = 1000;
-}
-
-namespace Dali
-{
-
-namespace Internal
-{
-
-namespace Adaptor
-{
-
-Capture::Capture()
-: mTimer(),
-  mPath(),
-  mNativeImageSourcePtr( NULL ),
-  mTbmSurface( NULL )
-{
-}
-
-Capture::Capture( Dali::CameraActor cameraActor )
-: mCameraActor( cameraActor ),
-  mTimer(),
-  mPath(),
-  mNativeImageSourcePtr( NULL ),
-  mTbmSurface( NULL )
-{
-}
-
-Capture::~Capture()
-{
-}
-
-CapturePtr Capture::New()
-{
-  CapturePtr pWorker = new Capture();
-
-  return pWorker;
-}
-
-CapturePtr Capture::New( Dali::CameraActor cameraActor )
-{
-  CapturePtr pWorker = new Capture( cameraActor );
-
-  return pWorker;
-}
-
-void Capture::Start( Dali::Actor source, const Dali::Vector2& size, const std::string &path, const Dali::Vector4& clearColor )
-{
-  DALI_ASSERT_ALWAYS(path.size() > 4 && "Path is invalid.");
-
-  // Increase the reference count focely to avoid application mistake.
-  Reference();
-
-  mPath = path;
-
-  DALI_ASSERT_ALWAYS(source && "Source is NULL.");
-
-  UnsetResources();
-  SetupResources( size, clearColor, source );
-}
-
-Dali::Capture::CaptureFinishedSignalType& Capture::FinishedSignal()
-{
-  return mFinishedSignal;
-}
-
-void Capture::CreateSurface( const Vector2& size )
-{
-  DALI_ASSERT_ALWAYS(!mTbmSurface && "mTbmSurface is already created.");
-
-  mTbmSurface = tbm_surface_create( size.width, size.height, TBM_FORMAT_RGBA8888 );
-}
-
-void Capture::DeleteSurface()
-{
-  DALI_ASSERT_ALWAYS(mTbmSurface && "mTbmSurface is empty.");
-
-  tbm_surface_destroy( mTbmSurface );
-  mTbmSurface = NULL;
-}
-
-void Capture::ClearSurface( const Vector2& size )
-{
-  DALI_ASSERT_ALWAYS(mTbmSurface && "mTbmSurface is empty.");
-
-  tbm_surface_info_s surface_info;
-
-  if( tbm_surface_map( mTbmSurface, TBM_SURF_OPTION_WRITE, &surface_info ) == TBM_SURFACE_ERROR_NONE )
-  {
-    //DALI_ASSERT_ALWAYS(surface_info.bpp == 32 && "unsupported tbm format");
-
-    unsigned char* ptr = surface_info.planes[0].ptr;
-    memset( ptr, 0, surface_info.size ); // TODO: support color
-
-    if( tbm_surface_unmap( mTbmSurface ) != TBM_SURFACE_ERROR_NONE )
-    {
-      DALI_LOG_ERROR( "Fail to unmap tbm_surface\n" );
-    }
-  }
-  else
-  {
-     DALI_ASSERT_ALWAYS(0 && "tbm_surface_map failed");
-  }
-}
-
-bool Capture::IsSurfaceCreated()
-{
-  return mTbmSurface != 0;
-}
-
-void Capture::CreateNativeImageSource()
-{
-  Dali::Adaptor& adaptor = Dali::Adaptor::Get();
-
-  DALI_ASSERT_ALWAYS(adaptor.IsAvailable() && "Dali::Adaptor is not available.");
-
-  DALI_ASSERT_ALWAYS(mTbmSurface && "mTbmSurface is empty.");
-
-  DALI_ASSERT_ALWAYS(!mNativeImageSourcePtr && "NativeImageSource is already created.");
-
-  // create the NativeImageSource object with our surface
-  mNativeImageSourcePtr = Dali::NativeImageSource::New( mTbmSurface );
-}
-
-void Capture::DeleteNativeImageSource()
-{
-  DALI_ASSERT_ALWAYS(mNativeImageSourcePtr && "mNativeImageSource is NULL.");
-
-  mNativeImageSourcePtr.Reset();
-}
-
-bool Capture::IsNativeImageSourceCreated()
-{
-  return mNativeImageSourcePtr;
-}
-
-void Capture::CreateFrameBuffer()
-{
-  DALI_ASSERT_ALWAYS(mNativeImageSourcePtr && "NativeImageSource is NULL.");
-
-  DALI_ASSERT_ALWAYS(!mFrameBuffer && "FrameBuffer is already created.");
-
-  mNativeTexture = Dali::Texture::New( *mNativeImageSourcePtr );
-
-  // Create a FrameBuffer object with depth attachments.
-  mFrameBuffer = Dali::FrameBuffer::New( mNativeTexture.GetWidth(), mNativeTexture.GetHeight(), Dali::FrameBuffer::Attachment::DEPTH );
-  // Add a color attachment to the FrameBuffer object.
-  mFrameBuffer.AttachColorTexture( mNativeTexture );
-}
-
-void Capture::DeleteFrameBuffer()
-{
-  DALI_ASSERT_ALWAYS(mFrameBuffer && "FrameBuffer is NULL.");
-
-  mFrameBuffer.Reset();
-  mNativeTexture.Reset();
-}
-
-bool Capture::IsFrameBufferCreated()
-{
-  return mFrameBuffer;
-}
-
-void Capture::SetupRenderTask( Dali::Actor source, const Dali::Vector4& clearColor )
-{
-  DALI_ASSERT_ALWAYS(source && "Source is empty.");
-
-  mSource = source;
-
-  // Check the original parent about source.
-  mParent = mSource.GetParent();
-
-  Dali::Stage stage = Dali::Stage::GetCurrent();
-  Dali::Size stageSize = stage.GetSize();
-
-  // Add to stage for rendering the source. If source isn't on the stage then it never be rendered.
-  stage.Add( mSource );
-
-  if( !mCameraActor )
-  {
-    mCameraActor = Dali::CameraActor::New( stageSize );
-    mCameraActor.SetParentOrigin( ParentOrigin::CENTER );
-    mCameraActor.SetAnchorPoint( AnchorPoint::CENTER );
-  }
-
-  stage.Add( mCameraActor );
-
-  DALI_ASSERT_ALWAYS(mFrameBuffer && "Framebuffer is NULL.");
-
-  DALI_ASSERT_ALWAYS(!mRenderTask && "RenderTask is already created.");
-
-  Dali::RenderTaskList taskList = stage.GetRenderTaskList();
-  mRenderTask = taskList.CreateTask();
-  mRenderTask.SetRefreshRate( Dali::RenderTask::REFRESH_ONCE );
-  mRenderTask.SetSourceActor( source );
-  mRenderTask.SetCameraActor( mCameraActor );
-  mRenderTask.SetScreenToFrameBufferFunction( Dali::RenderTask::FULLSCREEN_FRAMEBUFFER_FUNCTION );
-  mRenderTask.SetFrameBuffer( mFrameBuffer );
-  mRenderTask.SetClearColor( clearColor );
-  mRenderTask.SetClearEnabled( true );
-  mRenderTask.SetProperty( Dali::RenderTask::Property::REQUIRES_SYNC, true );
-  mRenderTask.FinishedSignal().Connect( this, &Capture::OnRenderFinished );
-  mRenderTask.GetCameraActor().SetInvertYAxis( true );
-
-  mTimer = Dali::Timer::New( TIME_OUT_DURATION );
-  mTimer.TickSignal().Connect( this, &Capture::OnTimeOut );
-  mTimer.Start();
-}
-
-void Capture::UnsetRenderTask()
-{
-  DALI_ASSERT_ALWAYS(mCameraActor && "CameraActor is NULL.");
-
-  if( mParent )
-  {
-    // Restore the parent of source.
-    mParent.Add( mSource );
-    mParent.Reset();
-  }
-  else
-  {
-    mSource.Unparent();
-  }
-
-  mSource.Reset();
-
-  mTimer.Reset();
-
-  mCameraActor.Unparent();
-  mCameraActor.Reset();
-
-  DALI_ASSERT_ALWAYS( mRenderTask && "RenderTask is NULL." );
-
-  Dali::RenderTaskList taskList = Dali::Stage::GetCurrent().GetRenderTaskList();
-  taskList.RemoveTask( mRenderTask );
-  mRenderTask.Reset();
-}
-
-bool Capture::IsRenderTaskSetup()
-{
-  return mCameraActor && mRenderTask;
-}
-
-void Capture::SetupResources( const Dali::Vector2& size, const Dali::Vector4& clearColor, Dali::Actor source )
-{
-  CreateSurface( size );
-  ClearSurface( size );
-
-  CreateNativeImageSource();
-
-  CreateFrameBuffer();
-
-  SetupRenderTask( source, clearColor );
-}
-
-void Capture::UnsetResources()
-{
-  if( IsRenderTaskSetup() )
-  {
-    UnsetRenderTask();
-  }
-
-  if( IsFrameBufferCreated() )
-  {
-    DeleteFrameBuffer();
-  }
-
-  if( IsNativeImageSourceCreated() )
-  {
-    DeleteNativeImageSource();
-  }
-
-  if( IsSurfaceCreated() )
-  {
-    DeleteSurface();
-  }
-}
-
-void Capture::OnRenderFinished( Dali::RenderTask& task )
-{
-  Dali::Capture::FinishState state = Dali::Capture::FinishState::SUCCEEDED;
-
-  mTimer.Stop();
-
-  if( !Save() )
-  {
-    state = Dali::Capture::FinishState::FAILED;
-    DALI_LOG_ERROR("Fail to Capture mTbmSurface[%p] Path[%s]", mTbmSurface, mPath.c_str());
-  }
-
-  Dali::Capture handle( this );
-  mFinishedSignal.Emit( handle, state );
-
-  UnsetResources();
-
-  // Decrease the reference count forcely. It is increased at Start().
-  Unreference();
-}
-
-bool Capture::OnTimeOut()
-{
-  Dali::Capture::FinishState state = Dali::Capture::FinishState::FAILED;
-
-  Dali::Capture handle( this );
-  mFinishedSignal.Emit( handle, state );
-
-  UnsetResources();
-
-  // Decrease the reference count forcely. It is increased at Start().
-  Unreference();
-
-  return false;
-}
-
-bool Capture::Save()
-{
-  DALI_ASSERT_ALWAYS(mNativeImageSourcePtr && "mNativeImageSourcePtr is NULL");
-
-  return mNativeImageSourcePtr->EncodeToFile( mPath );
-}
-
-}  // End of namespace Adaptor
-
-}  // End of namespace Internal
-
-}  // End of namespace Dali
diff --git a/dali/internal/system/tizen-wayland/tizen-wearable/capture-impl.h b/dali/internal/system/tizen-wayland/tizen-wearable/capture-impl.h
deleted file mode 100755 (executable)
index 4eae7f6..0000000
+++ /dev/null
@@ -1,249 +0,0 @@
-#ifndef DALI_INTERNAL_CAPTURE_H
-#define DALI_INTERNAL_CAPTURE_H
-
-/*
- * Copyright (c) 2018 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.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-// EXTERNAL INCLUDES
-#include <string>
-#include <memory>
-#include <tbm_surface.h>
-#include <dali/public-api/object/ref-object.h>
-#include <dali/public-api/object/base-object.h>
-#include <dali/public-api/render-tasks/render-task.h>
-#include <dali/public-api/rendering/texture.h>
-#include <dali/public-api/rendering/frame-buffer.h>
-
-// INTERNAL INCLUDES
-#include <dali/public-api/dali-adaptor-common.h>
-#include <dali/public-api/capture/capture.h>
-#include <dali/public-api/adaptor-framework/native-image-source.h>
-#include <dali/public-api/adaptor-framework/timer.h>
-
-namespace Dali
-{
-
-namespace Internal
-{
-
-namespace Adaptor
-{
-
-class Capture;
-typedef IntrusivePtr<Capture> CapturePtr;
-
-class Capture : public BaseObject, public ConnectionTracker
-{
-public:
-  /**
-   * @brief Constructor.
-   */
-  Capture();
-
-  Capture( Dali::CameraActor cameraActor );
-
-  /**
-   * @copydoc Dali::Capture::New
-   */
-  static CapturePtr New();
-
-  /**
-   * @copydoc Dali::Capture::New
-   */
-  static CapturePtr New( Dali::CameraActor cameraActor );
-
-  /**
-   * @copydoc Dali::Capture::Start
-   */
-  void Start( Dali::Actor source, const Dali::Vector2& size, const std::string &path, const Dali::Vector4& clearColor );
-
-  /**
-   * @copydoc Dali::Capture::FinishedSignal
-   */
-  Dali::Capture::CaptureFinishedSignalType& FinishedSignal();
-
-protected:
-
-  /**
-   * @brief A reference counted object may only be deleted by calling Unreference()
-   */
-  virtual ~Capture();
-
-private:
-  /**
-   * @brief Create surface.
-   *
-   * @param[in] size of surface.
-   */
-  void CreateSurface( const Dali::Vector2& size );
-
-  /**
-   * @brief Delete surface.
-   */
-  void DeleteSurface();
-
-  /**
-   * @brief Clear surface with color.
-   *
-   * @param[in] size of clear aread.
-   */
-  void ClearSurface( const Dali::Vector2& size );
-
-  /**
-   * @brief Query whether surface is created or not.
-   *
-   * @return True is surface is created.
-   */
-  bool IsSurfaceCreated();
-
-  /**
-   * @brief Create native image source.
-   */
-  void CreateNativeImageSource();
-
-  /**
-   * @brief Delete native image source.
-   */
-  void DeleteNativeImageSource();
-
-  /**
-   * @brief Query whether native image source is created or not.
-   *
-   * @return True is native image source is created.
-   */
-  bool IsNativeImageSourceCreated();
-
-  /**
-   * @brief Create frame buffer.
-   */
-  void CreateFrameBuffer();
-
-  /**
-   * @brief Delete frame buffer.
-   */
-  void DeleteFrameBuffer();
-
-  /**
-   * @brief Query whether frame buffer is created or not.
-   *
-   * @return True is frame buffer is created.
-   */
-  bool IsFrameBufferCreated();
-
-  /**
-   * @brief Setup render task.
-   *
-   * @param[in] source is captured.
-   * @param[in] clearColor background color
-   */
-  void SetupRenderTask( Dali::Actor source, const Dali::Vector4& clearColor );
-
-  /**
-   * @brief Unset render task.
-   */
-  void UnsetRenderTask();
-
-  /**
-   * @brief Query whether render task is setup or not.
-   *
-   * @return True is render task is setup.
-   */
-  bool IsRenderTaskSetup();
-
-  /**
-   * @brief Setup resources for capture.
-   *
-   * @param[in] size is surface size.
-   * @param[in] clearColor is clear color of surface.
-   * @param[in] source is captured.
-   */
-  void SetupResources( const Dali::Vector2& size, const Dali::Vector4& clearColor, Dali::Actor source );
-
-  /**
-   * @brief Unset resources for capture.
-   */
-  void UnsetResources();
-
-  /**
-   * @brief Callback when render is finished.
-   *
-   * @param[in] task is used for capture.
-   */
-  void OnRenderFinished( Dali::RenderTask& task );
-
-  /**
-   * @brief Callback when timer is finished.
-   *
-   * @return True is timer start again.
-   */
-  bool OnTimeOut();
-
-  /**
-   * @brief Save framebuffer.
-   *
-   * @return True is success to save, false is fail.
-   */
-  bool Save();
-
-private:
-
-  // Undefined
-  Capture( const Capture& );
-
-  // Undefined
-  Capture& operator=( const Capture& rhs );
-
-private:
-  Dali::Texture                               mNativeTexture;
-  Dali::FrameBuffer                           mFrameBuffer;
-  Dali::RenderTask                            mRenderTask;
-  Dali::Actor                                 mParent;
-  Dali::Actor                                 mSource;
-  Dali::CameraActor                           mCameraActor;
-  Dali::Timer                                 mTimer;           ///< For timeout.
-  Dali::Capture::CaptureFinishedSignalType    mFinishedSignal;
-  std::string                                 mPath;
-  Dali::NativeImageSourcePtr                  mNativeImageSourcePtr;  ///< pointer to surface image
-  tbm_surface_h                               mTbmSurface;
-};
-
-}  // End of namespace Adaptor
-}  // End of namespace Internal
-
-// Helpers for public-api forwarding methods
-
-inline Internal::Adaptor::Capture& GetImpl( Dali::Capture& captureWorker)
-{
-  DALI_ASSERT_ALWAYS( captureWorker && "Capture handle is empty" );
-
-  BaseObject& handle = captureWorker.GetBaseObject();
-
-  return static_cast< Internal::Adaptor::Capture& >( handle );
-}
-
-inline const Internal::Adaptor::Capture& GetImpl( const Dali::Capture& captureWorker )
-{
-  DALI_ASSERT_ALWAYS( captureWorker && "Capture handle is empty" );
-
-  const BaseObject& handle = captureWorker.GetBaseObject();
-
-  return static_cast< const Internal::Adaptor::Capture& >( handle );
-}
-
-}  // End of namespace Dali
-
-#endif // DALI_INTERNAL_CAPTURE_H
diff --git a/dali/internal/system/tizen-wayland/tizen-wearable/capture.cpp b/dali/internal/system/tizen-wayland/tizen-wearable/capture.cpp
deleted file mode 100644 (file)
index 156b206..0000000
+++ /dev/null
@@ -1,85 +0,0 @@
-/*
- * Copyright (c) 2018 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.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-// CLASS HEADER
-#include <dali/public-api/capture/capture.h>
-
-// INTERNAL HEADER
-#include <dali/internal/system/tizen-wayland/tizen-wearable/capture-impl.h>
-
-namespace Dali
-{
-
-Capture::Capture()
-{
-}
-
-Capture Capture::New()
-{
-  Internal::Adaptor::CapturePtr internal = Internal::Adaptor::Capture::New();
-
-  return Capture( internal.Get() );
-}
-
-Capture Capture::New( Dali::CameraActor cameraActor )
-{
-  Internal::Adaptor::CapturePtr internal = Internal::Adaptor::Capture::New( cameraActor );
-
-  return Capture( internal.Get() );
-}
-
-Capture Capture::DownCast( BaseHandle handle )
-{
-  return Capture( dynamic_cast< Internal::Adaptor::Capture* >( handle.GetObjectPtr() ) );
-}
-
-Capture::~Capture()
-{
-}
-
-Capture::Capture( const Capture& copy )
-: BaseHandle(copy)
-{
-}
-
-Capture& Capture::operator=( const Capture& rhs )
-{
-  BaseHandle::operator=( rhs );
-  return *this;
-}
-
-void Capture::Start( Actor source, const Vector2& size, const std::string &path, const Vector4& clearColor )
-{
-  GetImpl( *this ).Start( source, size, path, clearColor );
-}
-
-void Capture::Start( Actor source, const Vector2& size, const std::string &path )
-{
-  GetImpl( *this ).Start( source, size, path, Dali::Color::TRANSPARENT );
-}
-
-Capture::CaptureFinishedSignalType& Capture::FinishedSignal()
-{
-  return GetImpl( *this ).FinishedSignal();
-}
-
-Capture::Capture( Internal::Adaptor::Capture* internal )
-: BaseHandle( internal )
-{
-}
-
-} // namespace Dali
diff --git a/dali/public-api/capture/capture.cpp b/dali/public-api/capture/capture.cpp
new file mode 100644 (file)
index 0000000..1cc768c
--- /dev/null
@@ -0,0 +1,85 @@
+/*
+ * Copyright (c) 2018 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.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+// CLASS HEADER
+#include <dali/public-api/capture/capture.h>
+
+// INTERNAL HEADER
+#include <dali/internal/system/common/capture-impl.h>
+
+namespace Dali
+{
+
+Capture::Capture()
+{
+}
+
+Capture Capture::New()
+{
+  Internal::Adaptor::CapturePtr internal = Internal::Adaptor::Capture::New();
+
+  return Capture( internal.Get() );
+}
+
+Capture Capture::New( Dali::CameraActor cameraActor )
+{
+  Internal::Adaptor::CapturePtr internal = Internal::Adaptor::Capture::New( cameraActor );
+
+  return Capture( internal.Get() );
+}
+
+Capture Capture::DownCast( BaseHandle handle )
+{
+  return Capture( dynamic_cast< Internal::Adaptor::Capture* >( handle.GetObjectPtr() ) );
+}
+
+Capture::~Capture()
+{
+}
+
+Capture::Capture( const Capture& copy )
+: BaseHandle(copy)
+{
+}
+
+Capture& Capture::operator=( const Capture& rhs )
+{
+  BaseHandle::operator=( rhs );
+  return *this;
+}
+
+void Capture::Start( Actor source, const Vector2& size, const std::string &path, const Vector4& clearColor )
+{
+  GetImpl( *this ).Start( source, size, path, clearColor );
+}
+
+void Capture::Start( Actor source, const Vector2& size, const std::string &path )
+{
+  GetImpl( *this ).Start( source, size, path, Dali::Color::TRANSPARENT );
+}
+
+Capture::CaptureFinishedSignalType& Capture::FinishedSignal()
+{
+  return GetImpl( *this ).FinishedSignal();
+}
+
+Capture::Capture( Internal::Adaptor::Capture* internal )
+: BaseHandle( internal )
+{
+}
+
+} // namespace Dali
index 51192033fa15cdb0fb0d794d5c2ee9f2fee875b4..c58dd1c1f66c0b987d410dd0478fc9be3dae8bf4 100755 (executable)
@@ -2,7 +2,7 @@
 #define DALI_CAPTURE_H
 
 /*
- * Copyright (c) 2018 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2020 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.
@@ -45,7 +45,7 @@ class Capture;
 /**
  * @brief Capture snapshots the current scene and save as a file.
  *
- * @SINCE_1_3_4
+ * @SINCE_1_3.4
  *
  * Applications should follow the example below to create capture :
  *
index 219b9c44d1cbdd14428188ee5478f108572f8568..71866f1b125f5ad80c1c0c18f92b00fe5ebbd038 100644 (file)
@@ -1,55 +1,57 @@
 
 
 SET( adaptor_public_api_src_files
-  ${adaptor_public_api_dir}/adaptor-framework/application.cpp 
-  ${adaptor_public_api_dir}/adaptor-framework/key.cpp 
-  ${adaptor_public_api_dir}/adaptor-framework/window.cpp 
-  ${adaptor_public_api_dir}/adaptor-framework/timer.cpp 
-  ${adaptor_public_api_dir}/adaptor-framework/tts-player.cpp 
-  ${adaptor_public_api_dir}/adaptor-framework/native-image-source.cpp 
-  ${adaptor_public_api_dir}/adaptor-framework/widget.cpp 
-  ${adaptor_public_api_dir}/adaptor-framework/widget-application.cpp 
-  ${adaptor_public_api_dir}/adaptor-framework/widget-impl.cpp 
+  ${adaptor_public_api_dir}/adaptor-framework/application.cpp
+  ${adaptor_public_api_dir}/adaptor-framework/key.cpp
+  ${adaptor_public_api_dir}/adaptor-framework/window.cpp
+  ${adaptor_public_api_dir}/adaptor-framework/timer.cpp
+  ${adaptor_public_api_dir}/adaptor-framework/tts-player.cpp
+  ${adaptor_public_api_dir}/adaptor-framework/native-image-source.cpp
+  ${adaptor_public_api_dir}/adaptor-framework/widget.cpp
+  ${adaptor_public_api_dir}/adaptor-framework/widget-application.cpp
+  ${adaptor_public_api_dir}/adaptor-framework/widget-impl.cpp
+  ${adaptor_public_api_dir}/capture/capture.cpp
   ${adaptor_public_api_dir}/dali-adaptor-version.cpp
 )
 
 
 SET( public_api_header_files
-  ${adaptor_public_api_dir}/dali-adaptor-version.h 
+  ${adaptor_public_api_dir}/dali-adaptor-version.h
   ${adaptor_public_api_dir}/dali-adaptor-common.h
 )
 
 
 SET( public_api_adaptor_framework_header_files
-  ${adaptor_public_api_dir}/adaptor-framework/application.h 
-  ${adaptor_public_api_dir}/adaptor-framework/application-configuration.h 
-  ${adaptor_public_api_dir}/adaptor-framework/device-status.h 
-  ${adaptor_public_api_dir}/adaptor-framework/input-method.h 
-  ${adaptor_public_api_dir}/adaptor-framework/key.h 
-  ${adaptor_public_api_dir}/adaptor-framework/key-grab.h 
-  ${adaptor_public_api_dir}/adaptor-framework/style-change.h 
-  ${adaptor_public_api_dir}/adaptor-framework/timer.h 
-  ${adaptor_public_api_dir}/adaptor-framework/tts-player.h 
-  ${adaptor_public_api_dir}/adaptor-framework/native-image-source.h 
-  ${adaptor_public_api_dir}/adaptor-framework/window.h 
-  ${adaptor_public_api_dir}/adaptor-framework/widget.h 
-  ${adaptor_public_api_dir}/adaptor-framework/widget-application.h 
+  ${adaptor_public_api_dir}/adaptor-framework/application.h
+  ${adaptor_public_api_dir}/adaptor-framework/application-configuration.h
+  ${adaptor_public_api_dir}/adaptor-framework/device-status.h
+  ${adaptor_public_api_dir}/adaptor-framework/input-method.h
+  ${adaptor_public_api_dir}/adaptor-framework/key.h
+  ${adaptor_public_api_dir}/adaptor-framework/key-grab.h
+  ${adaptor_public_api_dir}/adaptor-framework/style-change.h
+  ${adaptor_public_api_dir}/adaptor-framework/timer.h
+  ${adaptor_public_api_dir}/adaptor-framework/tts-player.h
+  ${adaptor_public_api_dir}/adaptor-framework/native-image-source.h
+  ${adaptor_public_api_dir}/adaptor-framework/window.h
+  ${adaptor_public_api_dir}/adaptor-framework/widget.h
+  ${adaptor_public_api_dir}/adaptor-framework/widget-application.h
   ${adaptor_public_api_dir}/adaptor-framework/widget-impl.h
 )
 
+
+SET( public_dali_capture_header_files
+  ${adaptor_public_api_dir}/capture/capture.h
+)
+
+
 # wearable and watch extra public headers
 SET( adaptor_dali_wearable_header_file
   ${adaptor_public_api_dir}/watch/dali-wearable.h
 )
 
+
 # wearable and watch extra public headers
 SET( public_dali_watch_header_files
-  ${adaptor_public_api_dir}/watch/watch-application.h 
+  ${adaptor_public_api_dir}/watch/watch-application.h
   ${adaptor_public_api_dir}/watch/watch-time.h
-)
-
-# wearable and watch extra public headers
-SET( public_dali_capture_header_files
-  ${adaptor_public_api_dir}/capture/capture.h
-)
-
+)
\ No newline at end of file