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_SHM_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 element of Video Sink Queue */
73 _MMCAMCORDER_CLIENT_VIDEOSINK_QUE,
75 /* Pipeline element of Video Sink CLS */
76 _MMCAMCORDER_CLIENT_VIDEOSINK_CLS,
78 /* Pipeline element of Video output */
79 _MMCAMCORDER_CLIENT_VIDEOSINK_SINK,
81 /* Client pipeline Max number */
82 _MMCAMCORDER_CLIENT_PIPELINE_ELEMENT_NUM
83 } _MMCAMCORDER_PREVIEW_CLIENT_PIPELINE_ELELMENT;
86 * This function creates resources at the client process.
88 * @param[in] handle Handle of camcorder context.
89 * @return This function returns MM_ERROR_NONE on success, or the other values on error.
91 int mm_camcorder_client_create(MMHandleType *handle);
94 * This function destroys resources from the client process.
96 * @param[in] handle Handle of camcorder context.
99 void mm_camcorder_client_destroy(MMHandleType handle);
102 * This function prepares for the state running.
104 * @param[in] handle Handle of camcorder context.
105 * @return This function returns MM_ERROR_NONE on success, or the other values on error.
106 * @see _mmcamcorder_client_realize function.
108 int mm_camcorder_client_realize(MMHandleType handle, char *caps);
111 * This function unprepare for the state null.
113 * @param[in] handle Handle of camcorder context.
114 * @return This function returns MM_ERROR_NONE on success, or the other values on error.
115 * @see _mmcamcorder_client_unrealize function.
117 int mm_camcorder_client_unrealize(MMHandleType handle);
120 * This function get string of raw video caps.
121 * To be used by server.
123 * @param handle [in] Handle of camera.
124 * @param caps [out] String of caps. Should be freed after used.
126 * @return This function returns zero on success, or negative value with error
131 int mm_camcorder_client_get_video_caps(MMHandleType handle, char **caps);
134 * This function set "socket-path" element property of shmsink/src.
135 * To be used by both server and client.
137 * @param handle [in] Handle of camera.
138 * @param path [in] Local file path.
140 * @return This function returns zero on success, or negative value with error
145 int mm_camcorder_client_set_shm_socket_path(MMHandleType handle, const char *path);
148 * This function get root directory of current process.
150 * @param root_directory [out] Root directory.
151 * @return This function returns zero on success, or negative value with error code.
153 int mm_camcorder_client_get_root_directory(char **root_directory);
159 #endif /* __MM_CAMCORDER_MUSED_H__ */