4 * Copyright (c) 2000 - 2015 Samsung Electronics Co., Ltd. All rights reserved.
6 * Contact: Sejong Park <sejong123.park@samsung.com>
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
12 * http://www.apache.org/licenses/LICENSE-2.0
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.
22 #ifndef __MM_CAMCORDER_MUSED_H__
23 #define __MM_CAMCORDER_MUSED_H__
32 * Camcorder Client's attribute enumeration.
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;
60 * Camcorder Client Pipeline's Element name.
61 * @note index of element.
64 _MMCAMCORDER_CLIENT_NONE = (-1),
66 /* Main Pipeline Element */
67 _MMCAMCORDER_CLIENT_MAIN_PIPE = 0x00,
69 /* Pipeline element of Video input */
70 _MMCAMCORDER_CLIENT_VIDEOSRC_SRC,
72 /* Pipeline elements of Video Capsfilter */
73 _MMCAMCORDER_CLIENT_VIDEOSRC_FILT,
75 /* Pipeline element of Video Sink Queue */
76 _MMCAMCORDER_CLIENT_VIDEOSINK_QUE,
78 /* Pipeline element of Video Sink CLS */
79 _MMCAMCORDER_CLIENT_VIDEOSINK_CLS,
81 /* Pipeline element of Video output */
82 _MMCAMCORDER_CLIENT_VIDEOSINK_SINK,
84 /* Client pipeline Max number */
85 _MMCAMCORDER_CLIENT_PIPELINE_ELEMENT_NUM
86 } _MMCAMCORDER_PREVIEW_CLIENT_PIPELINE_ELELMENT;
89 * This function creates resources at the client process.
91 * @param[in] handle Handle of camcorder context.
92 * @return This function returns MM_ERROR_NONE on success, or the other values on error.
94 int mm_camcorder_client_create(MMHandleType *handle);
97 * This function destroys resources from the client process.
99 * @param[in] handle Handle of camcorder context.
102 void mm_camcorder_client_destroy(MMHandleType handle);
105 * This function prepares for the state running.
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.
111 int mm_camcorder_client_realize(MMHandleType handle, char *caps);
114 * This function unprepare for the state null.
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.
120 int mm_camcorder_client_unrealize(MMHandleType handle);
123 * This function get string of raw video caps.
124 * To be used by server.
126 * @param handle [in] Handle of camera.
127 * @param caps [out] String of caps. Should be freed after used.
129 * @return This function returns zero on success, or negative value with error
134 int mm_camcorder_client_get_video_caps(MMHandleType handle, char **caps);
137 * This function set "socket-path" element property of ipc sink/src.
138 * To be used by both server and client.
140 * @param handle [in] Handle of camera.
141 * @param path [in] Local file path.
143 * @return This function returns zero on success, or negative value with error
148 int mm_camcorder_client_set_socket_path(MMHandleType handle, const char *path);
151 * This function get root directory of current process.
153 * @param root_directory [out] Root directory.
154 * @return This function returns zero on success, or negative value with error code.
156 int mm_camcorder_client_get_root_directory(char **root_directory);
162 #endif /* __MM_CAMCORDER_MUSED_H__ */