2 * Copyright (c) 2013 Samsung Electronics Co., Ltd All Rights Reserved
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
17 #ifndef __TIZEN_MULTIMEDIA_CAMERA_INTERNAL_H__
18 #define __TIZEN_MULTIMEDIA_CAMERA_INTERNAL_H__
26 * @file camera_internal.h
27 * @brief This file contains the Camera Product-internal API for framework, related structures and enumerations.
32 * @addtogroup CAPI_MEDIA_CAMERA_X11_DISPLAY_MODULE
37 * @ingroup CAPI_MEDIA_CAMERA_X11_DISPLAY_MODULE
38 * @brief Called when the media camera needs updated xid.
39 * @remarks If current display type is not #CAMERA_DISPLAY_TYPE_OVERLAY, no operation is performed.
40 * @param[in] user_data The user data passed from the callback registration function
41 * @return The updated xid
42 * @pre It will be invoked when camera needs updated xid and if this callback is registered using camera_set_x11_display_pixmap().
43 * @see camera_set_x11_display_pixmap()
45 typedef unsigned int (*camera_x11_pixmap_updated_cb)(void *user_data);
48 * @ingroup CAPI_MEDIA_CAMERA_X11_DISPLAY_MODULE
49 * @brief Sets the display rotation.
53 * @privilege %http://tizen.org/privilege/camera
54 * @remarks This function should be called before previewing (see camera_start_preview())\n
55 * This function is valid only for #CAMERA_DISPLAY_TYPE_OVERLAY.
56 * @param[in] camera The handle to the camera
57 * @param[in] rotation The display rotation
58 * @return @c 0 on success, otherwise a negative error value
59 * @retval #CAMERA_ERROR_NONE Successful
60 * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
61 * @retval #CAMERA_ERROR_INVALID_STATE Invalid state
62 * @retval #CAMERA_ERROR_INVALID_OPERATION Display type is not X11
63 * @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
64 * @see camera_start_preview()
65 * @see camera_get_x11_display_rotation()
67 int camera_set_x11_display_rotation(camera_h camera, camera_rotation_e rotation);
70 * @ingroup CAPI_MEDIA_CAMERA_X11_DISPLAY_MODULE
71 * @brief Gets the display rotation.
75 * @privilege %http://tizen.org/privilege/camera
76 * @remarks This function is valid only for #CAMERA_DISPLAY_TYPE_OVERLAY.
77 * @param[in] camera The handle to the camera
78 * @param[out] rotation The display rotation
79 * @return @c 0 on success, otherwise a negative error value
80 * @retval #CAMERA_ERROR_NONE Successful
81 * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
82 * @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
83 * @see camera_set_x11_display_rotation()
85 int camera_get_x11_display_rotation(camera_h camera, camera_rotation_e *rotation);
88 * @ingroup CAPI_MEDIA_CAMERA_X11_DISPLAY_MODULE
89 * @brief Sets the display flip.
93 * @privilege %http://tizen.org/privilege/camera
94 * @remarks This function is valid only for #CAMERA_DISPLAY_TYPE_OVERLAY.
95 * @param[in] camera The handle to the camera
96 * @param[in] flip The display flip
97 * @return @c 0 on success, otherwise a negative error value
98 * @retval #CAMERA_ERROR_NONE Successful
99 * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
100 * @retval #CAMERA_ERROR_INVALID_STATE Invalid state
101 * @retval #CAMERA_ERROR_INVALID_OPERATION Display type is not X11
102 * @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
103 * @see camera_get_x11_display_flip()
105 int camera_set_x11_display_flip(camera_h camera, camera_flip_e flip);
108 * @ingroup CAPI_MEDIA_CAMERA_X11_DISPLAY_MODULE
109 * @brief Gets the display flip.
112 * @privlevel platform
113 * @privilege %http://tizen.org/privilege/camera
114 * @remarks This function is valid only for #CAMERA_DISPLAY_TYPE_OVERLAY.
115 * @param[in] camera The handle to the camera
116 * @param[out] flip The display flip
117 * @return @c 0 on success, otherwise a negative error value
118 * @retval #CAMERA_ERROR_NONE Successful
119 * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
120 * @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
121 * @see camera_set_x11_display_flip()
123 int camera_get_x11_display_flip(camera_h camera, camera_flip_e *flip);
126 * @ingroup CAPI_MEDIA_CAMERA_X11_DISPLAY_MODULE
127 * @brief Sets the visible property for X11 display.
130 * @privlevel platform
131 * @privilege %http://tizen.org/privilege/camera
132 * @remarks This function is valid only for #CAMERA_DISPLAY_TYPE_OVERLAY.
133 * @param[in] camera The handle to the camera
134 * @param[in] visible The display visibility property
136 * @return @c 0 on success, otherwise a negative error value
137 * @retval #CAMERA_ERROR_NONE Successful
138 * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
139 * @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
140 * @see camera_is_x11_display_visible()
142 int camera_set_x11_display_visible(camera_h camera, bool visible);
145 * @ingroup CAPI_MEDIA_CAMERA_X11_DISPLAY_MODULE
146 * @brief Gets the visible property of X11 display.
149 * @privlevel platform
150 * @privilege %http://tizen.org/privilege/camera
151 * @remarks This function is valid only for #CAMERA_DISPLAY_TYPE_OVERLAY.
152 * @param[in] camera The handle to the camera
153 * @param[out] visible If @c true the camera display is visible, otherwise @c false
155 * @return @c 0 on success, otherwise a negative error value
156 * @retval #CAMERA_ERROR_NONE Successful
157 * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
158 * @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
159 * @see camera_set_x11_display_visible()
161 int camera_is_x11_display_visible(camera_h camera, bool *visible);
164 * @ingroup CAPI_MEDIA_CAMERA_X11_DISPLAY_MODULE
165 * @brief Sets the X11 display mode.
168 * @privlevel platform
169 * @privilege %http://tizen.org/privilege/camera
170 * @remarks This function is valid only for #CAMERA_DISPLAY_TYPE_OVERLAY.
171 * @param[in] camera The handle to the camera
172 * @param[in] mode The display mode
174 * @return @c 0 on success, otherwise a negative error value
175 * @retval #CAMERA_ERROR_NONE Successful
176 * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
177 * @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
178 * @see camera_get_x11_display_mode()
180 int camera_set_x11_display_mode(camera_h camera , camera_display_mode_e mode);
183 * @ingroup CAPI_MEDIA_CAMERA_X11_DISPLAY_MODULE
184 * @brief Gets the X11 display mode.
187 * @privlevel platform
188 * @privilege %http://tizen.org/privilege/camera
189 * @remarks This function is valid only for #CAMERA_DISPLAY_TYPE_OVERLAY.
190 * @param[in] camera The handle to the camera
191 * @param[out] mode The display mode
193 * @return @c 0 on success, otherwise a negative error value
194 * @retval #CAMERA_ERROR_NONE Successful
195 * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
196 * @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
197 * @see camera_set_x11_display_mode()
199 int camera_get_x11_display_mode(camera_h camera, camera_display_mode_e *mode);
202 * @brief Registers a callback function to be invoked when camera needs updated xid.
203 * @ingroup CAPI_MEDIA_CAMERA_X11_DISPLAY_MODULE
204 * @remarks This function is valid only for #CAMERA_DISPLAY_TYPE_OVERLAY.
205 * @param[in] camera The handle to the camera
206 * @param[in] callback The callback function to register
207 * @param[in] user_data The user data to be passed to the callback function
209 * @return @c 0 on success, otherwise a negative error value
210 * @retval #CAMERA_ERROR_NONE Successful
211 * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
212 * @retval #CAMERA_ERROR_INVALID_OPERATION Invalid operation
213 * @retval #CAMERA_ERROR_INVALID_STATE Invalid state
214 * @pre The camera state must be #CAMERA_STATE_CREATED by camera_create().
215 * @post camera_set_x11_display_pixmap() will be invoked.
217 * @see camera_set_x11_display_pixmap()
219 int camera_set_x11_display_pixmap(camera_h camera, camera_x11_pixmap_updated_cb callback, void *user_data);
222 * @brief Registers a callback function to be invoked when camera needs updated xid.
223 * @ingroup CAPI_MEDIA_CAMERA_MUSED_MODULE
224 * @remarks This function is valid only for #CAMERA_DISPLAY_TYPE_OVERLAY.
225 * @param[in] camera The handle to the camera
226 * @param[in] type The type of the display
227 * @param[in] display_handle The handle of the created display
229 * @return @c 0 on success, otherwise a negative error value
230 * @retval #CAMERA_ERROR_NONE Successful
231 * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
232 * @retval #CAMERA_ERROR_INVALID_OPERATION Invalid operation
233 * @retval #CAMERA_ERROR_INVALID_STATE Invalid state
234 * @pre The camera state must be #CAMERA_STATE_CREATED by camera_create().
235 * @post camera_set_mused_display() will be invoked.
237 * @see camera_set_mused_display()
239 int camera_set_mused_display(camera_h camera, camera_display_type_e type, void *display_handle);
242 * @brief Registers a callback function to be invoked when camera needs updated xid.
243 * @ingroup CAPI_MEDIA_CAMERA_MUSED_MODULE
244 * @remarks This function is valid only for #CAMERA_DISPLAY_TYPE_OVERLAY.
245 * @param[in] camera The handle to the camera
246 * @param[in] caps The caps information of the server's video element
248 * @return @c 0 on success, otherwise a negative error value
249 * @retval #CAMERA_ERROR_NONE Successful
250 * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
251 * @retval #CAMERA_ERROR_INVALID_OPERATION Invalid operation
252 * @retval #CAMERA_ERROR_INVALID_STATE Invalid state
253 * @pre The camera state must be #CAMERA_STATE_CREATED by camera_create().
254 * @post camera_get_video_caps() will be invoked.
256 * @see camera_get_video_caps()
258 int camera_get_video_caps(camera_h camera, char **caps);
261 * @brief Registers a callback function to be invoked when camera needs updated xid.
262 * @ingroup CAPI_MEDIA_CAMERA_MUSED_MODULE
263 * @remarks This function is valid only for #CAMERA_DISPLAY_TYPE_OVERLAY.
264 * @param[in] camera The handle to the camera
265 * @param[in] socket_path The socket file path for the display data ipc
267 * @return @c 0 on success, otherwise a negative error value
268 * @retval #CAMERA_ERROR_NONE Successful
269 * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
270 * @retval #CAMERA_ERROR_INVALID_OPERATION Invalid operation
271 * @retval #CAMERA_ERROR_INVALID_STATE Invalid state
272 * @pre The camera state must be #CAMERA_STATE_CREATED by camera_create().
273 * @post camera_set_shm_socket_path_for_mused() will be invoked.
275 * @see camera_set_shm_socket_path_for_mused()
277 int camera_set_shm_socket_path_for_mused(camera_h camera, char *socket_path);
287 #endif //__TIZEN_MULTIMEDIA_CAMERA_INTERNAL_H__