4 * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
6 * Contact: Jeongmo Yang <jm80.yang@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_GSTCOMMON_H__
23 #define __MM_CAMCORDER_GSTCOMMON_H__
25 /*=======================================================================================
27 ========================================================================================*/
29 #include "mm_camcorder_configure.h"
35 /*=======================================================================================
36 | GLOBAL DEFINITIONS AND DECLARATIONS FOR CAMCORDER |
37 ========================================================================================*/
39 /*=======================================================================================
41 ========================================================================================*/
43 /*=======================================================================================
45 ========================================================================================*/
47 * Enumerations for AMR bitrate
49 typedef enum MMCamcorderAMRBitRate {
50 MM_CAMCORDER_MR475, /**< MR475 : 4.75 kbit/s */
51 MM_CAMCORDER_MR515, /**< MR515 : 5.15 kbit/s */
52 MM_CAMCORDER_MR59, /**< MR59 : 5.90 kbit/s */
53 MM_CAMCORDER_MR67, /**< MR67 : 6.70 kbit/s */
54 MM_CAMCORDER_MR74, /**< MR74 : 7.40 kbit/s */
55 MM_CAMCORDER_MR795, /**< MR795 : 7.95 kbit/s */
56 MM_CAMCORDER_MR102, /**< MR102 : 10.20 kbit/s */
57 MM_CAMCORDER_MR122, /**< MR122 : 12.20 kbit/s */
58 MM_CAMCORDER_MRDTX /**< MRDTX */
59 } MMCamcorderAMRBitRate;
61 /*=======================================================================================
62 | STRUCTURE DEFINITIONS |
63 ========================================================================================*/
66 * @note if name is NULL, not supported.
69 unsigned int prof_id; /**< id of mmcamcorder_profile_attrs_id */
70 unsigned int id; /**< id of value id */
71 char *name; /**< gstreamer element name*/
72 } _MMCamcorderElementName;
74 /*=======================================================================================
75 | CONSTANT DEFINITIONS |
76 ========================================================================================*/
78 /*=======================================================================================
80 ========================================================================================*/
82 /*=======================================================================================
83 | EXTERN GLOBAL VARIABLE |
84 ========================================================================================*/
86 /*=======================================================================================
87 | GLOBAL FUNCTION PROTOTYPES |
88 ========================================================================================*/
91 * This function creates bin of video source.
92 * Basically, main pipeline of camcorder is composed of several bin(a bundle
93 * of elements). Each bin operates its own function. This bin has a roll
94 * inputting video data from camera.
96 * @param[in] handle Handle of camcorder context.
97 * @return This function returns MM_ERROR_NONE on success, or the other values on error.
99 * @see __mmcamcorder_create_preview_pipeline()
101 int _mmcamcorder_create_videosrc_bin(MMHandleType handle);
104 * This function creates bin of audio source.
105 * Basically, main pipeline of camcorder is composed of several bin(a bundle
106 * of elements). Each bin operates its own function. This bin has a roll
107 * inputting audio data from audio source(such as mike).
109 * @param[in] handle Handle of camcorder context.
110 * @return This function returns MM_ERROR_NONE on success, or the other values on error.
112 * @see __mmcamcorder_create_preview_pipeline()
114 int _mmcamcorder_create_audiosrc_bin(MMHandleType handle);
117 * This function creates bin of video sink.
118 * Basically, main pipeline of camcorder is composed of several bin(a bundle
119 * of elements). Each bin operates its own function. This bin has a roll
120 * transferring video data to frame buffer.
122 * @param[in] handle Handle of camcorder context.
123 * @return This function returns MM_ERROR_NONE on success, or the other values on error.
125 * @see __mmcamcorder_create_preview_pipeline()
127 int _mmcamcorder_create_videosink_bin(MMHandleType handle);
130 * This function creates outputsink bin.
132 * @param[in] handle Handle of camcorder context.
133 * @return This function returns MM_ERROR_NONE on success, or the other values on error.
135 * @see __mmcamcorder_create_preview_pipeline()
137 int _mmcamcorder_create_encodesink_bin(MMHandleType handle);
140 * This function creates bin of still shot sink.
141 * Basically, main pipeline of camcorder is composed of several bin(a bundle
142 * of elements). Each bin operates its own function. This bin has a roll
143 * writting image file with video stream.
145 * @param[in] handle Handle of camcorder context.
146 * @return This function returns MM_ERROR_NONE on success, or the other values on error.
148 * @see __mmcamcorder_create_preview_pipeline()
150 int _mmcamcorder_create_stillshotsink_bin(MMHandleType handle);
153 * This function creates main pipeline of camcorder.
154 * Basically, main pipeline of camcorder is composed of several bin(a bundle
155 * of elements). And if the appilcation wants to make pipeline working, the
156 * application assemble bin that is proper to that task.
157 * When this function is called, bins that is needed for preview will be composed.
159 * @param[in] handle Handle of camcorder context.
160 * @return This function returns MM_ERROR_NONE on success, or the other values on error.
162 * @see _mmcamcorder_create_pipeline()
164 int _mmcamcorder_create_preview_pipeline(MMHandleType handle);
166 /* plug-in related */
167 void _mmcamcorder_negosig_handler(GstElement *videosrc, MMHandleType handle);
168 bool _mmcamcorder_set_display_rotation(MMHandleType handle, int display_rotate);
169 bool _mmcamcorder_set_videosrc_rotation(MMHandleType handle, int videosrc_rotate);
172 int _mmcamcorder_videosink_window_set(MMHandleType handle, type_element *VideosinkElement);
173 int _mmcamcorder_vframe_stablize(MMHandleType handle);
174 gboolean _mmcamcorder_get_device_info(MMHandleType handle);
175 int _mmcamcorder_get_eos_message(MMHandleType handle);
176 void _mmcamcorder_remove_element_handle(MMHandleType handle, int first_elem, int last_elem);
177 int _mmcamcorder_check_audiocodec_fileformat_compatibility(MMHandleType handle);
178 int _mmcamcorder_check_videocodec_fileformat_compatibility(MMHandleType handle);
183 #endif /* __MM_CAMCORDER_GSTCOMMON_H__ */