summaryrefslogtreecommitdiff
path: root/include/camera_internal.h
blob: 18740ef93c4ce2f198950112a26a6867439ea455 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
/*
 * Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved
 *
 * 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.
 */

#ifndef __TIZEN_MULTIMEDIA_CAMERA_INTERNAL_H__
#define __TIZEN_MULTIMEDIA_CAMERA_INTERNAL_H__

#include <camera.h>

#ifdef __cplusplus
extern "C" {
#endif

/**
 * @file camera_internal.h
 * @brief This file contains the internal Camera API, related structures and enumerations.
 * @since_tizen 3.0
 */

/**
 * @addtogroup CAPI_MEDIA_CAMERA_INTERNAL_MODULE
 * @{
 */

/**
 * @brief Start the evas rendering.
 *
 * @since_tizen 3.0
 * @param[in] camera The handle to the camera
 * @return @c 0 on success, otherwise a negative error value
 * @retval #CAMERA_ERROR_NONE Successful
 * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
 * @retval #CAMERA_ERROR_INVALID_STATE Invalid state
 * @retval #CAMERA_ERROR_INVALID_OPERATION Invalid operation
 * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
 */
int camera_start_evas_rendering(camera_h camera);

/**
 * @brief Stop the evas rendering.
 *
 * @since_tizen 3.0
 * @param[in] camera The handle to the camera
 * @param[in] keep_screen If @c true keep last frame on display, otherwise @c false
 * @return @c 0 on success, otherwise a negative error value
 * @retval #CAMERA_ERROR_NONE Successful
 * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
 * @retval #CAMERA_ERROR_INVALID_STATE Invalid state
 * @retval #CAMERA_ERROR_INVALID_OPERATION Invalid operation
 * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
 */
int camera_stop_evas_rendering(camera_h camera, bool keep_screen);

/**
 * @brief Sets the ecore wayland video display.
 * @since_tizen 6.0
 * @remarks This function must be called in main thread of the application.
 *          Otherwise, it will return #CAMERA_ERROR_INVALID_OPERATION by internal restriction.
 *          To avoid #CAMERA_ERROR_INVALID_OPERATION in sub thread, ecore_thread_main_loop_begin() and
 *          ecore_thread_main_loop_end() can be used, but deadlock can occur if the main thread is busy.
 *          So, it's not recommended to use them.
 * @param[in] camera The handle to the camera
 * @param[in] ecore_wl_window The ecore wayland window handle
 * @return @c 0 on success,
 *         otherwise a negative error value
 * @retval #CAMERA_ERROR_NONE Successful
 * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
 * @retval #CAMERA_ERROR_INVALID_STATE Invalid state
 * @retval #CAMERA_ERROR_INVALID_OPERATION Invalid operation
 * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
 * @pre The camera state must be set to #CAMERA_STATE_CREATED.
 * @see camera_start_preview()
 * @see ecore_thread_main_loop_begin()
 * @see ecore_thread_main_loop_end()
 */
int camera_set_ecore_wl_display(camera_h camera, void *ecore_wl_window);

/**
 * @}
 */
#ifdef __cplusplus
}
#endif

#endif /* __TIZEN_MULTIMEDIA_CAMERA_INTERNAL_H__ */