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_STILLSHOT_H__
23 #define __MM_CAMCORDER_STILLSHOT_H__
25 /*=======================================================================================
27 ========================================================================================*/
36 /*=======================================================================================
37 | GLOBAL DEFINITIONS AND DECLARATIONS FOR CAMCORDER |
38 ========================================================================================*/
40 /*=======================================================================================
42 ========================================================================================*/
43 #define _MMCAMCORDER_CAPTURE_STOP_CHECK_INTERVAL (50*1000)
44 #define _MMCAMCORDER_CAPTURE_STOP_CHECK_COUNT 60
46 #define _MNOTE_VALUE_NONE 0
47 #define _SOUND_STATUS_INIT -1
49 /*=======================================================================================
51 ========================================================================================*/
54 /*=======================================================================================
55 | STRUCTURE DEFINITIONS |
56 ========================================================================================*/
58 * MMCamcorder information for image(preview/capture) mode
61 int type; /**< Still-shot/Multi-shot */
62 int count; /**< Multi-shot capture count */
63 int capture_cur_count; /**< Multi-shot capture current count */
64 int capture_send_count; /**< Multi-shot capture send count */
65 unsigned long long next_shot_time; /**< next still capture time */
66 gboolean multi_shot_stop; /**< Multi-shot stop flag */
67 gboolean capturing; /**< whether MSL is on capturing */
68 gboolean resolution_change; /**< whether on resolution changing for capturing. After changing to capture resolution, it sets to FALSE again. */
69 int width; /**< Width of capture image */
70 int height; /**< Height of capture image */
71 int interval; /**< Capture interval */
72 int preview_format; /**< Preview format */
73 int hdr_capture_mode; /**< HDR Capture mode */
74 gboolean sound_status; /**< sound status of system */
75 gboolean played_capture_sound; /**< whether play capture sound when capture starts */
76 } _MMCamcorderImageInfo;
78 /*=======================================================================================
79 | CONSTANT DEFINITIONS |
80 ========================================================================================*/
82 /*=======================================================================================
84 ========================================================================================*/
86 /*=======================================================================================
87 | EXTERN GLOBAL VARIABLE |
88 ========================================================================================*/
90 /*=======================================================================================
91 | GLOBAL FUNCTION PROTOTYPES |
92 ========================================================================================*/
94 * This function add still shot bin to main pipeline.
95 * When application creates initial pipeline, there are only bins for preview.
96 * If application wants to add stil shot function, bins for stillshot should be added.
98 * @param[in] handle Handle of camcorder context.
99 * @return This function returns MM_ERROR_NONE on success, or the other values on error.
101 * @see __mmcamcorder_create_preview_pipeline()
103 int _mmcamcorder_create_stillshot_pipeline(MMHandleType handle);
106 * This function remove still shot bin from main pipeline.
108 * @param[in] handle Handle of camcorder context.
109 * @return This function returns MM_ERROR_NONE on success, or the other values on error.
111 * @see __mmcamcorder_create_preview_pipeline(), __mmcamcorder_add_stillshot_pipeline()
113 int _mmcamcorder_remove_stillshot_pipeline(MMHandleType handle);
116 * This function connects capture signal.
118 * @param[in] handle Handle of camcorder context.
119 * @return This function returns MM_ERROR_NONE on success, or the other values on error.
122 int _mmcamcorder_connect_capture_signal(MMHandleType handle);
125 * This function destroy image pipeline.
127 * @param[in] handle Handle of camcorder context.
130 * @see _mmcamcorder_destroy_pipeline()
133 void _mmcamcorder_destroy_video_capture_pipeline(MMHandleType handle);
134 int _mmcamcorder_video_capture_command(MMHandleType handle, int command);
136 /* Function for capture */
137 int __mmcamcorder_set_exif_basic_info(MMHandleType handle, int image_width, int image_height);
138 int __mmcamcorder_update_exif_info(MMHandleType handle,void* imagedata, int imgln);
139 void __mmcamcorder_init_stillshot_info(MMHandleType handle);
140 void __mmcamcorder_get_capture_data_from_buffer(MMCamcorderCaptureDataType *capture_data, int pixtype, GstSample *sample);
141 void __mmcamcorder_release_jpeg_data(MMHandleType handle, MMCamcorderCaptureDataType *dest, int tag_enable, int provide_exif);
142 int __mmcamcorder_capture_save_exifinfo(MMHandleType handle, MMCamcorderCaptureDataType *original, MMCamcorderCaptureDataType *thumbnail, int provide_exif);
143 int __mmcamcorder_set_jpeg_data(MMHandleType handle, MMCamcorderCaptureDataType *dest, MMCamcorderCaptureDataType *thumbnail, int provide_exif);
144 gboolean __mmcamcorder_handoff_callback(GstElement *fakesink, GstBuffer *buffer, GstPad *pad, gpointer u_data);
150 #endif /* __MM_CAMCORDER_STILLSHOT_H__ */