#include <string.h>
#include <mm_error.h>
-#include <mm_attrs_private.h>
#include "mm_camcorder.h"
#include "mm_camcorder_internal.h"
mmf_return_val_if_fail((void *)camcorder, MM_ERROR_CAMCORDER_INVALID_ARGUMENT);
mmf_return_val_if_fail((void *)info, MM_ERROR_CAMCORDER_INVALID_ARGUMENT);
- _mmcam_dbg_err("");
+ MMCAM_LOG_ERROR("");
traceBegin(TTRACE_TAG_CAMERA, "MMCAMCORDER:CREATE");
traceEnd(TTRACE_TAG_CAMERA);
- _mmcam_dbg_err("END");
+ MMCAM_LOG_ERROR("END");
return error;
}
mmf_return_val_if_fail((void *)camcorder, MM_ERROR_CAMCORDER_INVALID_ARGUMENT);
- _mmcam_dbg_err("");
+ MMCAM_LOG_ERROR("");
traceBegin(TTRACE_TAG_CAMERA, "MMCAMCORDER:DESTROY");
traceEnd(TTRACE_TAG_CAMERA);
- _mmcam_dbg_err("END!!!");
+ MMCAM_LOG_ERROR("END!!!");
return error;
}
mmf_return_val_if_fail((void *)camcorder, MM_ERROR_CAMCORDER_INVALID_ARGUMENT);
- _mmcam_dbg_err("");
+ MMCAM_LOG_ERROR("");
- _MMCAMCORDER_LOCK_ASM(camcorder);
+ _MMCAMCORDER_LOCK_INTERRUPT(camcorder);
traceBegin(TTRACE_TAG_CAMERA, "MMCAMCORDER:REALIZE");
traceEnd(TTRACE_TAG_CAMERA);
- _MMCAMCORDER_UNLOCK_ASM(camcorder);
+ _MMCAMCORDER_UNLOCK_INTERRUPT(camcorder);
- _mmcam_dbg_err("END");
+ MMCAM_LOG_ERROR("END");
return error;
}
mmf_return_val_if_fail((void *)camcorder, MM_ERROR_CAMCORDER_INVALID_ARGUMENT);
- _mmcam_dbg_err("");
+ MMCAM_LOG_ERROR("");
- _MMCAMCORDER_LOCK_ASM(camcorder);
+ _MMCAMCORDER_LOCK_INTERRUPT(camcorder);
traceBegin(TTRACE_TAG_CAMERA, "MMCAMCORDER:UNREALIZE");
traceEnd(TTRACE_TAG_CAMERA);
- _MMCAMCORDER_UNLOCK_ASM(camcorder);
+ _MMCAMCORDER_UNLOCK_INTERRUPT(camcorder);
- _mmcam_dbg_err("END");
+ MMCAM_LOG_ERROR("END");
return error;
}
mmf_return_val_if_fail((void *)camcorder, MM_ERROR_CAMCORDER_INVALID_ARGUMENT);
- _mmcam_dbg_err("");
+ MMCAM_LOG_ERROR("");
- _MMCAMCORDER_LOCK_ASM(camcorder);
+ _MMCAMCORDER_LOCK_INTERRUPT(camcorder);
traceBegin(TTRACE_TAG_CAMERA, "MMCAMCORDER:START");
traceEnd(TTRACE_TAG_CAMERA);
- _MMCAMCORDER_UNLOCK_ASM(camcorder);
+ _MMCAMCORDER_UNLOCK_INTERRUPT(camcorder);
- _mmcam_dbg_err("END");
+ MMCAM_LOG_ERROR("END");
return error;
}
mmf_return_val_if_fail((void *)camcorder, MM_ERROR_CAMCORDER_INVALID_ARGUMENT);
- _mmcam_dbg_err("");
+ MMCAM_LOG_ERROR("");
- _MMCAMCORDER_LOCK_ASM(camcorder);
+ _MMCAMCORDER_LOCK_INTERRUPT(camcorder);
traceBegin(TTRACE_TAG_CAMERA, "MMCAMCORDER:STOP");
traceEnd(TTRACE_TAG_CAMERA);
- _MMCAMCORDER_UNLOCK_ASM(camcorder);
+ _MMCAMCORDER_UNLOCK_INTERRUPT(camcorder);
- _mmcam_dbg_err("END");
+ MMCAM_LOG_ERROR("END");
return error;
}
mmf_return_val_if_fail((void *)camcorder, MM_ERROR_CAMCORDER_INVALID_ARGUMENT);
- _mmcam_dbg_err("");
+ MMCAM_LOG_ERROR("");
- _MMCAMCORDER_LOCK_ASM(camcorder);
+ _MMCAMCORDER_LOCK_INTERRUPT(camcorder);
error = _mmcamcorder_capture_start(camcorder);
- _MMCAMCORDER_UNLOCK_ASM(camcorder);
+ _MMCAMCORDER_UNLOCK_INTERRUPT(camcorder);
- _mmcam_dbg_err("END");
+ MMCAM_LOG_ERROR("END");
return error;
}
mmf_return_val_if_fail((void *)camcorder, MM_ERROR_CAMCORDER_INVALID_ARGUMENT);
- _mmcam_dbg_err("");
+ MMCAM_LOG_ERROR("");
- _MMCAMCORDER_LOCK_ASM(camcorder);
+ _MMCAMCORDER_LOCK_INTERRUPT(camcorder);
error = _mmcamcorder_capture_stop(camcorder);
- _MMCAMCORDER_UNLOCK_ASM(camcorder);
+ _MMCAMCORDER_UNLOCK_INTERRUPT(camcorder);
- _mmcam_dbg_err("END");
+ MMCAM_LOG_ERROR("END");
return error;
}
mmf_return_val_if_fail((void*)camcorder, MM_ERROR_CAMCORDER_INVALID_ARGUMENT);
- _mmcam_dbg_err("");
+ MMCAM_LOG_ERROR("");
- _MMCAMCORDER_LOCK_ASM(camcorder);
+ _MMCAMCORDER_LOCK_INTERRUPT(camcorder);
error = _mmcamcorder_record(camcorder);
- _MMCAMCORDER_UNLOCK_ASM(camcorder);
+ _MMCAMCORDER_UNLOCK_INTERRUPT(camcorder);
- _mmcam_dbg_err("END");
+ MMCAM_LOG_ERROR("END");
return error;
}
mmf_return_val_if_fail((void *)camcorder, MM_ERROR_CAMCORDER_INVALID_ARGUMENT);
- _mmcam_dbg_err("");
+ MMCAM_LOG_ERROR("");
- _MMCAMCORDER_LOCK_ASM(camcorder);
+ _MMCAMCORDER_LOCK_INTERRUPT(camcorder);
error = _mmcamcorder_pause(camcorder);
- _MMCAMCORDER_UNLOCK_ASM(camcorder);
+ _MMCAMCORDER_UNLOCK_INTERRUPT(camcorder);
- _mmcam_dbg_err("END");
+ MMCAM_LOG_ERROR("END");
return error;
}
mmf_return_val_if_fail((void *)camcorder, MM_ERROR_CAMCORDER_INVALID_ARGUMENT);
- _mmcam_dbg_err("");
+ MMCAM_LOG_ERROR("");
- _MMCAMCORDER_LOCK_ASM(camcorder);
+ _MMCAMCORDER_LOCK_INTERRUPT(camcorder);
error = _mmcamcorder_commit(camcorder);
- _MMCAMCORDER_UNLOCK_ASM(camcorder);
+ _MMCAMCORDER_UNLOCK_INTERRUPT(camcorder);
- _mmcam_dbg_err("END");
+ MMCAM_LOG_ERROR("END");
return error;
}
mmf_return_val_if_fail((void *)camcorder, MM_ERROR_CAMCORDER_INVALID_ARGUMENT);
- _mmcam_dbg_err("");
+ MMCAM_LOG_ERROR("");
- _MMCAMCORDER_LOCK_ASM(camcorder);
+ _MMCAMCORDER_LOCK_INTERRUPT(camcorder);
error = _mmcamcorder_cancel(camcorder);
- _MMCAMCORDER_UNLOCK_ASM(camcorder);
+ _MMCAMCORDER_UNLOCK_INTERRUPT(camcorder);
- _mmcam_dbg_err("END");
+ MMCAM_LOG_ERROR("END");
return error;
}
}
+int mm_camcorder_set_muxed_stream_callback(MMHandleType camcorder, mm_camcorder_muxed_stream_callback callback, void *user_data)
+{
+ mmf_return_val_if_fail((void *)camcorder, MM_ERROR_CAMCORDER_INVALID_ARGUMENT);
+
+ return _mmcamcorder_set_muxed_stream_callback(camcorder, callback, user_data);
+}
+
+
int mm_camcorder_set_video_capture_callback(MMHandleType camcorder, mm_camcorder_video_capture_callback callback, void* user_data)
{
mmf_return_val_if_fail((void *)camcorder, MM_ERROR_CAMCORDER_INVALID_ARGUMENT);
}
-int mm_camcorder_get_state(MMHandleType camcorder, MMCamcorderStateType *status)
+int mm_camcorder_set_video_encode_decision_callback(MMHandleType camcorder, mm_camcorder_video_encode_decision_callback callback, void* user_data)
+{
+ mmf_return_val_if_fail((void *)camcorder, MM_ERROR_CAMCORDER_INVALID_ARGUMENT);
+
+ return _mmcamcorder_set_video_encode_decision_callback(camcorder, callback, user_data);
+}
+
+
+int mm_camcorder_get_state(MMHandleType camcorder, MMCamcorderStateType *state)
{
int ret = MM_ERROR_NONE;
if (!camcorder) {
- _mmcam_dbg_warn("Empty handle.");
+ MMCAM_LOG_WARNING("Empty handle.");
return MM_ERROR_CAMCORDER_INVALID_ARGUMENT;
}
- *status = _mmcamcorder_get_state(camcorder);
+ *state = _mmcamcorder_get_state(camcorder);
return ret;
+}
+
+int mm_camcorder_get_state2(MMHandleType camcorder, MMCamcorderStateType *state, MMCamcorderStateType *old_state)
+{
+ if (!camcorder) {
+ MMCAM_LOG_WARNING("Empty handle.");
+ return MM_ERROR_CAMCORDER_INVALID_ARGUMENT;
+ }
+
+ return _mmcamcorder_get_state2(camcorder, (int *)state, (int *)old_state);
}
va_list var_args;
int ret = MM_ERROR_NONE;
- return_val_if_fail(attribute_name, MM_ERROR_COMMON_INVALID_ARGUMENT);
+ mmf_return_val_if_fail(attribute_name, MM_ERROR_COMMON_INVALID_ARGUMENT);
va_start(var_args, attribute_name);
ret = _mmcamcorder_get_attributes(camcorder, err_attr_name, attribute_name, var_args);
va_list var_args;
int ret = MM_ERROR_NONE;
- return_val_if_fail(attribute_name, MM_ERROR_COMMON_INVALID_ARGUMENT);
+ mmf_return_val_if_fail(attribute_name, MM_ERROR_COMMON_INVALID_ARGUMENT);
va_start(var_args, attribute_name);
ret = _mmcamcorder_set_attributes(camcorder, err_attr_name, attribute_name, var_args);
{
mmf_return_if_fail((void *)camcorder);
- _mmcamcorder_emit_signal(camcorder,object_name, interface_name, signal_name, value);
+ _mmcamcorder_emit_signal(camcorder, object_name, interface_name, signal_name, value);
return;
}
return _mmcamcorder_check_codec_fileformat_compatibility(codec_type, codec, file_format);
}
+
+int mm_camcorder_manage_external_storage_state(MMHandleType camcorder, int storage_state)
+{
+ mmf_return_val_if_fail((void *)camcorder, MM_ERROR_CAMCORDER_INVALID_ARGUMENT);
+
+ return _mmcamcorder_manage_external_storage_state(camcorder, storage_state);
+}
+
+int mm_camcorder_get_exposure(MMHandleType camcorder, int *exposure)
+{
+ mmf_return_val_if_fail((void *)camcorder, MM_ERROR_CAMCORDER_INVALID_ARGUMENT);
+
+ return _mmcamcorder_get_exposure(camcorder, exposure);
+}
+
+int mm_camcorder_get_log_level(void)
+{
+ return _mmcamcorder_get_log_level();
+}
+
+int mm_camcorder_set_extra_preview_device_type(MMHandleType camcorder, int stream_id, int device_type)
+{
+ return _mmcamcorder_set_extra_preview_device_type(camcorder, stream_id, device_type);
+}
+
+int mm_camcorder_set_extra_preview_stream_format(MMHandleType camcorder, int stream_id, int pixel_format, int width, int height, int fps)
+{
+ return _mmcamcorder_set_extra_preview_stream_format(camcorder, stream_id, pixel_format, width, height, fps);
+}
+
+int mm_camcorder_get_extra_preview_stream_format(MMHandleType camcorder, int stream_id, int *pixel_format, int *width, int *height, int *fps)
+{
+ return _mmcamcorder_get_extra_preview_stream_format(camcorder, stream_id, pixel_format, width, height, fps);
+}
+
+int mm_camcorder_set_extra_preview_bitrate(MMHandleType camcorder, int stream_id, int bitrate)
+{
+ return _mmcamcorder_set_extra_preview_bitrate(camcorder, stream_id, bitrate);
+}
+
+int mm_camcorder_get_extra_preview_bitrate(MMHandleType camcorder, int stream_id, int *bitrate)
+{
+ return _mmcamcorder_get_extra_preview_bitrate(camcorder, stream_id, bitrate);
+}
+
+int mm_camcorder_set_extra_preview_gop_interval(MMHandleType camcorder, int stream_id, int interval)
+{
+ return _mmcamcorder_set_extra_preview_gop_interval(camcorder, stream_id, interval);
+}
+
+int mm_camcorder_get_extra_preview_gop_interval(MMHandleType camcorder, int stream_id, int *interval)
+{
+ return _mmcamcorder_get_extra_preview_gop_interval(camcorder, stream_id, interval);
+}