[dali_2.3.25] Merge branch 'devel/master'
[platform/core/uifw/dali-adaptor.git] / dali / devel-api / adaptor-framework / camera-player-plugin.h
1 #ifndef DALI_CAMERA_PLAYER_PLUGIN_H
2 #define DALI_CAMERA_PLAYER_PLUGIN_H
3
4 /*
5  * Copyright (c) 2021 Samsung Electronics Co., Ltd.
6  *
7  * Licensed under the Apache License, Version 2.0 (the "License");
8  * you may not use this file except in compliance with the License.
9  * You may obtain a copy of the License at
10  *
11  * http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing, software
14  * distributed under the License is distributed on an "AS IS" BASIS,
15  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16  * See the License for the specific language governing permissions and
17  * limitations under the License.
18  *
19  */
20
21 // INTERNAL INCLUDES
22 #include <dali/public-api/adaptor-framework/native-image-source.h>
23 #include <dali/public-api/adaptor-framework/window.h>
24
25 // EXTERNAL INCLUDES
26 #include <dali/public-api/math/rect.h>
27
28 namespace Dali
29 {
30 class Any;
31 using DisplayArea = Dali::Rect<int>;
32
33 /**
34  * @brief CameraPlayerPlugin is an abstract interface, used by dali-adaptor to access camera player plugin.
35  * A concrete implementation must be created for each platform and provided as dynamic library.
36  */
37 class CameraPlayerPlugin
38 {
39 public:
40   /**
41    * @brief Constructor.
42    */
43   CameraPlayerPlugin()
44   {
45   }
46
47   /**
48    * @brief Destructor.
49    */
50   virtual ~CameraPlayerPlugin()
51   {
52   }
53
54   /**
55    * @brief Sets camera rendering target for window
56    * @param[in] target The target for camera rendering, window surface
57    */
58   virtual void SetWindowRenderingTarget(Dali::Window target) = 0;
59
60   /**
61    * @brief Sets camera rendering target for native image
62    * @param[in] target The target for camera rendering, native image source
63    */
64   virtual void SetNativeImageRenderingTarget(Dali::NativeImageSourcePtr target) = 0;
65
66   /**
67    * @brief Sets the area of camera display.
68    * @param[in] area The left-top position and size of the camera display area
69    */
70   virtual void SetDisplayArea(DisplayArea area) = 0;
71
72   /**
73    * @brief Set the camera player handle.
74    * @param[in] handle The handle for camera player
75    */
76   virtual void SetCameraPlayer(Any handle) = 0;
77 };
78
79 } // namespace Dali
80
81 #endif // DALI_CAMERA_PLAYER_PLUGIN_H