[Release version 0.10.34] Change display routine for Overlay type
[platform/core/multimedia/libmm-camcorder.git] / src / include / mm_camcorder_client.h
1 /*
2  * libmm-camcorder
3  *
4  * Copyright (c) 2000 - 2015 Samsung Electronics Co., Ltd. All rights reserved.
5  *
6  * Contact: Sejong Park <sejong123.park@samsung.com>
7  *
8  * Licensed under the Apache License, Version 2.0 (the "License");
9  * you may not use this file except in compliance with the License.
10  * You may obtain a copy of the License at
11  *
12  * http://www.apache.org/licenses/LICENSE-2.0
13  *
14  * Unless required by applicable law or agreed to in writing, software
15  * distributed under the License is distributed on an "AS IS" BASIS,
16  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17  * See the License for the specific language governing permissions and
18  * limitations under the License.
19  *
20  */
21
22 #ifndef __MM_CAMCORDER_MUSED_H__
23 #define __MM_CAMCORDER_MUSED_H__
24
25 #include "mm_types.h"
26
27 #ifdef __cplusplus
28         extern "C" {
29 #endif
30
31 /**
32  * Camcorder Client's attribute enumeration.
33  */
34 typedef enum
35 {
36         MM_CAM_CLIENT_DISPLAY_SOCKET_PATH,
37         MM_CAM_CLIENT_DISPLAY_HANDLE,
38         MM_CAM_CLIENT_DISPLAY_DEVICE,
39         MM_CAM_CLIENT_DISPLAY_SURFACE,
40         MM_CAM_CLIENT_DISPLAY_RECT_X,
41         MM_CAM_CLIENT_DISPLAY_RECT_Y,
42         MM_CAM_CLIENT_DISPLAY_RECT_WIDTH,
43         MM_CAM_CLIENT_DISPLAY_RECT_HEIGHT,
44         MM_CAM_CLIENT_DISPLAY_SOURCE_X,
45         MM_CAM_CLIENT_DISPLAY_SOURCE_Y,
46         MM_CAM_CLIENT_DISPLAY_SOURCE_WIDTH,
47         MM_CAM_CLIENT_DISPLAY_SOURCE_HEIGHT,
48         MM_CAM_CLIENT_DISPLAY_ROTATION,
49         MM_CAM_CLIENT_DISPLAY_VISIBLE,
50         MM_CAM_CLIENT_DISPLAY_SCALE,
51         MM_CAM_CLIENT_DISPLAY_GEOMETRY_METHOD,
52         MM_CAM_CLIENT_DISPLAY_MODE,
53         MM_CAM_CLIENT_DISPLAY_EVAS_SURFACE_SINK,
54         MM_CAM_CLIENT_DISPLAY_EVAS_DO_SCALING,
55         MM_CAM_CLIENT_DISPLAY_FLIP,
56         MM_CAM_CLIENT_ATTRIBUTE_NUM
57 }MMCamcorderClientAttrsID;
58
59 /**
60  * Camcorder Client Pipeline's Element name.
61  * @note index of element.
62  */
63 typedef enum {
64         _MMCAMCORDER_CLIENT_NONE = (-1),
65
66         /* Main Pipeline Element */
67         _MMCAMCORDER_CLIENT_MAIN_PIPE = 0x00,
68
69         /* Pipeline element of Video input */
70         _MMCAMCORDER_CLIENT_VIDEOSRC_SRC,
71
72         /* Pipeline elements of Video Capsfilter */
73         _MMCAMCORDER_CLIENT_VIDEOSRC_FILT,
74
75         /* Pipeline element of Video Sink Queue */
76         _MMCAMCORDER_CLIENT_VIDEOSINK_QUE,
77
78         /* Pipeline element of Video Sink CLS */
79         _MMCAMCORDER_CLIENT_VIDEOSINK_CLS,
80
81         /* Pipeline element of Video output */
82         _MMCAMCORDER_CLIENT_VIDEOSINK_SINK,
83
84         /* Client pipeline Max number */
85         _MMCAMCORDER_CLIENT_PIPELINE_ELEMENT_NUM
86 } _MMCAMCORDER_PREVIEW_CLIENT_PIPELINE_ELELMENT;
87
88 /**
89  * This function creates resources at the client process.
90  *
91  * @param[in]   handle          Handle of camcorder context.
92  * @return      This function returns MM_ERROR_NONE on success, or the other values on error.
93  */
94 int mm_camcorder_client_create(MMHandleType *handle);
95
96 /**
97  * This function destroys resources from the client process.
98  *
99  * @param[in]   handle          Handle of camcorder context.
100  * @return      void
101  */
102 void mm_camcorder_client_destroy(MMHandleType handle);
103
104 /**
105  * This function prepares for the state running.
106  *
107  * @param[in]   handle          Handle of camcorder context.
108  * @return      This function returns MM_ERROR_NONE on success, or the other values on error.
109  * @see         _mmcamcorder_client_realize function.
110  */
111 int mm_camcorder_client_realize(MMHandleType handle, char *caps);
112
113 /**
114  * This function unprepare for the state null.
115  *
116  * @param[in]   handle          Handle of camcorder context.
117  * @return      This function returns MM_ERROR_NONE on success, or the other values on error.
118  * @see         _mmcamcorder_client_unrealize function.
119  */
120 int mm_camcorder_client_unrealize(MMHandleType handle);
121
122 /**
123  * This function get string of raw video caps.
124  * To be used by server.
125  *
126  * @param       handle  [in] Handle of camera.
127  * @param       caps    [out] String of caps. Should be freed after used.
128  *
129  * @return      This function returns zero on success, or negative value with error
130  *                      code.
131  * @see
132  * @since
133  */
134 int mm_camcorder_client_get_video_caps(MMHandleType handle, char **caps);
135
136 /**
137  * This function set "socket-path" element property of ipc sink/src.
138  * To be used by both server and client.
139  *
140  * @param       handle  [in] Handle of camera.
141  * @param       path    [in] Local file path.
142  *
143  * @return      This function returns zero on success, or negative value with error
144  *                      code.
145  * @see
146  * @since
147  */
148 int mm_camcorder_client_set_socket_path(MMHandleType handle, const char *path);
149
150 /**
151  * This function get root directory of current process.
152  *
153  * @param       root_directory    [out] Root directory.
154  * @return      This function returns zero on success, or negative value with error code.
155  */
156 int mm_camcorder_client_get_root_directory(char **root_directory);
157
158 #ifdef __cplusplus
159         }
160 #endif
161
162 #endif /* __MM_CAMCORDER_MUSED_H__ */