1 #ifndef DALI_CAMERA_PLAYER_H
2 #define DALI_CAMERA_PLAYER_H
5 * Copyright (c) 2021 Samsung Electronics Co., Ltd.
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
11 * http://www.apache.org/licenses/LICENSE-2.0
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.
22 #include <dali/public-api/object/base-handle.h>
25 #include <dali/devel-api/adaptor-framework/camera-player-plugin.h>
26 #include <dali/public-api/dali-adaptor-common.h>
37 } // namespace Adaptor
39 } // namespace Internal
42 * @brief CameraPlayer class is used for camera playback.
44 class DALI_ADAPTOR_API CameraPlayer : public BaseHandle
58 * @brief Creates a new instance of a CameraPlayer.
60 static CameraPlayer New();
63 * @brief Copy constructor.
65 * @param[in] player CameraPlayer to copy. The copied player will point at the same implementation
67 CameraPlayer(const CameraPlayer& player);
70 * @brief Assignment operator.
72 * @param[in] player The CameraPlayer to assign from.
73 * @return The updated CameraPlayer.
75 CameraPlayer& operator=(const CameraPlayer& player);
78 * @brief Downcast a handle to CameraPlayer handle.
80 * If handle points to a CameraPlayer the downcast produces valid
81 * handle. If not the returned handle is left uninitialized.
83 * @param[in] handle Handle to an object
84 * @return Handle to a CameraPlayer or an uninitialized handle
86 static CameraPlayer DownCast(BaseHandle handle);
89 * @brief Sets camera rendering target.
90 * @param[in] target The target for camera rendering, window surface
92 void SetWindowRenderingTarget(Dali::Window target);
95 * @brief Sets camera rendering target.
96 * @param[in] target The target for camera rendering, native image source
98 void SetNativeImageRenderingTarget(Dali::NativeImageSourcePtr target);
101 * @brief Sets the area of camera display.
102 * @param[in] area The left-top position and size of the camera display area
104 void SetDisplayArea(DisplayArea area);
107 * @brief Sets the camera player handle
108 * @param[in] handle The handle for camera player
110 void SetCameraPlayer(Any handle);
112 private: // Not intended for application developers
114 * @brief Internal constructor
116 explicit DALI_INTERNAL CameraPlayer(Internal::Adaptor::CameraPlayer* internal);
121 #endif // DALI_CAMERA_PLAYER_H