#include <sys/time.h>
#include <sys/times.h>
#include <gst/video/cameracontrol.h>
-#include <mm_sound.h>
#include "mm_camcorder_internal.h"
#include "mm_camcorder_stillshot.h"
#include "mm_camcorder_exifinfo.h"
/* set sink element pointer to attribute */
mm_attrs_get_index((MMHandleType)attrs, MMCAM_DISPLAY_REUSE_ELEMENT, &attr_index);
attr_item = &attrs->items[attr_index];
- mmf_attribute_set_data(attr_item, (void *)sink_element, sizeof(sink_element));
+ mmf_attribute_set_data(attr_item, (void *)sink_element, sizeof(*sink_element));
mmf_attribute_commit(attr_item);
/* remove notify callback */
info->next_shot_time = 0;
info->multi_shot_stop = FALSE;
- /* sound init to pause other session */
+ /* sound init */
_mmcamcorder_sound_init(handle);
}
info->resolution_change = TRUE;
+ /* set frame stability count for capture */
+ _mmcamcorder_video_frame_stabilize(handle, _MMCamcorder_CMD_CAPTURE);
+
/* make pipeline state as PLAYING */
ret = _mmcamcorder_gst_set_state(handle, sc->element[_MMCAMCORDER_MAIN_PIPE].gst, GST_STATE_PLAYING);
if (ret != MM_ERROR_NONE) {
info->multi_shot_stop = TRUE;
info->capturing = FALSE;
- _mmcamcorder_vframe_stablize(handle);
-
current_state = _mmcamcorder_get_state(handle);
_mmcam_dbg_log("current state [%d]", current_state);
goto cmd_error;
}
+ /* set frame stability count for preview */
+ _mmcamcorder_video_frame_stabilize(handle, _MMCamcorder_CMD_PREVIEW_START);
+
ret = _mmcamcorder_gst_set_state(handle, pipeline, GST_STATE_PLAYING);
if (ret != MM_ERROR_NONE)
goto cmd_error;
MMCAMCORDER_G_OBJECT_SET(sc->element[_MMCAMCORDER_VIDEOSRC_QUE].gst, "empty-buffers", FALSE);
MMCAMCORDER_G_OBJECT_SET(sc->element[_MMCAMCORDER_VIDEOSINK_QUE].gst, "empty-buffers", FALSE);
+ /* set frame stability count for preview */
+ _mmcamcorder_video_frame_stabilize(handle, _MMCamcorder_CMD_PREVIEW_START);
+
traceBegin(TTRACE_TAG_CAMERA, "MMCAMCORDER:START:SET_PLAYING_TO_PIPELINE");
ret = _mmcamcorder_gst_set_state(handle, pipeline, GST_STATE_PLAYING);
/* check capture state */
if (info->type == _MMCamcorder_MULTI_SHOT && info->capture_send_count > 0)
- mm_camcorder_get_attributes((MMHandleType)hcamcorder, NULL, "capture-break-cont-shot", &stop_cont_shot, NULL);
+ mm_camcorder_get_attributes((MMHandleType)hcamcorder, NULL,
+ MMCAM_CAPTURE_BREAK_CONTINUOUS_SHOT, &stop_cont_shot,
+ NULL);
if (!info->capturing || stop_cont_shot) {
_mmcam_dbg_warn("stop command[%d] or not capturing state[%d]. skip this...", stop_cont_shot, info->capturing);
/* encode thumbnail */
if (encode_src.data) {
+ size_t thumb_length = 0;
unsigned int thumb_width = 0;
unsigned int thumb_height = 0;
- unsigned int thumb_length = 0;
unsigned char *thumb_raw_data = NULL;
/* encode image */
if (ret != MM_ERROR_NONE)
EXIF_SET_ERR(ret, EXIF_TAG_MAKE);
} else {
- ret = MM_ERROR_CAMCORDER_LOW_MEMORY;
- EXIF_SET_ERR(ret, EXIF_TAG_MAKE);
+ _mmcam_dbg_err("strdup failed [%s]", MM_MAKER_NAME);
}
exit: