[dali_2.3.25] Merge branch 'devel/master'
[platform/core/uifw/dali-adaptor.git] / dali / devel-api / adaptor-framework / camera-player.h
1 #ifndef DALI_CAMERA_PLAYER_H
2 #define DALI_CAMERA_PLAYER_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 // EXTERNAL INCLUDES
22 #include <dali/public-api/object/base-handle.h>
23
24 //INTERNAL INCLUDES
25 #include <dali/devel-api/adaptor-framework/camera-player-plugin.h>
26 #include <dali/public-api/dali-adaptor-common.h>
27
28 namespace Dali
29 {
30 class Any;
31
32 namespace Internal
33 {
34 namespace Adaptor
35 {
36 class CameraPlayer;
37 } // namespace Adaptor
38
39 } // namespace Internal
40
41 /**
42  * @brief CameraPlayer class is used for camera playback.
43  */
44 class DALI_ADAPTOR_API CameraPlayer : public BaseHandle
45 {
46 public:
47   /**
48    * @brief Constructor.
49    */
50   CameraPlayer();
51
52   /**
53    * @brief Destructor.
54    */
55   ~CameraPlayer();
56
57   /**
58    * @brief Creates a new instance of a CameraPlayer.
59    */
60   static CameraPlayer New();
61
62   /**
63    * @brief Copy constructor.
64    *
65    * @param[in] player CameraPlayer to copy. The copied player will point at the same implementation
66    */
67   CameraPlayer(const CameraPlayer& player);
68
69   /**
70    * @brief Assignment operator.
71    *
72    * @param[in] player The CameraPlayer to assign from.
73    * @return The updated CameraPlayer.
74    */
75   CameraPlayer& operator=(const CameraPlayer& player);
76
77   /**
78    * @brief Downcast a handle to CameraPlayer handle.
79    *
80    * If handle points to a CameraPlayer the downcast produces valid
81    * handle. If not the returned handle is left uninitialized.
82    *
83    * @param[in] handle Handle to an object
84    * @return Handle to a CameraPlayer or an uninitialized handle
85    */
86   static CameraPlayer DownCast(BaseHandle handle);
87
88   /**
89    * @brief Sets camera rendering target.
90    * @param[in] target The target for camera rendering, window surface
91    */
92   void SetWindowRenderingTarget(Dali::Window target);
93
94   /**
95    * @brief Sets camera rendering target.
96    * @param[in] target The target for camera rendering, native image source
97    */
98   void SetNativeImageRenderingTarget(Dali::NativeImageSourcePtr target);
99
100   /**
101    * @brief Sets the area of camera display.
102    * @param[in] area The left-top position and size of the camera display area
103    */
104   void SetDisplayArea(DisplayArea area);
105
106   /**
107    * @brief Sets the camera player handle
108    * @param[in] handle The handle for camera player
109    */
110   void SetCameraPlayer(Any handle);
111
112 private: // Not intended for application developers
113   /**
114    * @brief Internal constructor
115    */
116   explicit DALI_INTERNAL CameraPlayer(Internal::Adaptor::CameraPlayer* internal);
117 };
118
119 } // namespace Dali
120
121 #endif // DALI_CAMERA_PLAYER_H