int device_type = 0;
int is_network = 0;
int preview_format = CAMERA_PIXEL_FORMAT_INVALID;
- int user_buffer_supported = 0;
int pid = 0;
+ bool user_buffer_supported = false;
bool camera_feature_supported = false;
char *send_msg = NULL;
void *gdbus_connection = NULL;
int camera_dispatcher_is_supported_continuous_capture(muse_module_h module)
{
- int ret = CAMERA_ERROR_NONE;
+ bool supported = false;
muse_camera_handle_s *muse_camera = NULL;
muse_camera_api_e api = MUSE_CAMERA_API_SUPPORT_CONTINUOUS_CAPTURE;
muse_camera_api_class_e class = MUSE_CAMERA_API_CLASS_IMMEDIATE;
CAM_LOG_INFO("handle[%p]", muse_camera);
- ret = legacy_camera_is_supported_continuous_capture(muse_camera->camera_handle);
+ supported = legacy_camera_is_supported_continuous_capture(muse_camera->camera_handle);
- CAM_LOG_INFO("is supported ret[%d]", ret);
+ CAM_LOG_INFO("supported[%d]", supported);
- muse_camera_msg_return(api, class, ret, module);
+ muse_camera_msg_return(api, class, (int)supported, module);
return MUSE_CAMERA_ERROR_NONE;
}
int camera_dispatcher_is_supported_face_detection(muse_module_h module)
{
- int ret = CAMERA_ERROR_NONE;
+ bool supported = false;
muse_camera_handle_s *muse_camera = NULL;
muse_camera_api_e api = MUSE_CAMERA_API_SUPPORT_FACE_DETECTION;
muse_camera_api_class_e class = MUSE_CAMERA_API_CLASS_IMMEDIATE;
CAM_LOG_INFO("handle[%p]", muse_camera);
- ret = legacy_camera_is_supported_face_detection(muse_camera->camera_handle);
+ supported = legacy_camera_is_supported_face_detection(muse_camera->camera_handle);
- CAM_LOG_INFO("is supported ret[%d]", ret);
+ CAM_LOG_INFO("supported[%d]", supported);
- muse_camera_msg_return(api, class, ret, module);
+ muse_camera_msg_return(api, class, (int)supported, module);
return MUSE_CAMERA_ERROR_NONE;
}
int camera_dispatcher_is_supported_zero_shutter_lag(muse_module_h module)
{
- int ret = CAMERA_ERROR_NONE;
+ bool supported = false;
muse_camera_handle_s *muse_camera = NULL;
muse_camera_api_e api = MUSE_CAMERA_API_SUPPORT_ZERO_SHUTTER_LAG;
muse_camera_api_class_e class = MUSE_CAMERA_API_CLASS_IMMEDIATE;
CAM_LOG_INFO("handle[%p]", muse_camera);
- ret = legacy_camera_is_supported_zero_shutter_lag(muse_camera->camera_handle);
+ supported = legacy_camera_is_supported_zero_shutter_lag(muse_camera->camera_handle);
- CAM_LOG_INFO("is supported ret[%d]", ret);
+ CAM_LOG_INFO("supported[%d]", supported);
- muse_camera_msg_return(api, class, ret, module);
+ muse_camera_msg_return(api, class, (int)supported, module);
return MUSE_CAMERA_ERROR_NONE;
}
int camera_dispatcher_is_supported_media_packet_preview_cb(muse_module_h module)
{
- int ret = CAMERA_ERROR_NONE;
+ bool supported = false;
muse_camera_handle_s *muse_camera = NULL;
muse_camera_api_e api = MUSE_CAMERA_API_SUPPORT_MEDIA_PACKET_PREVIEW_CB;
muse_camera_api_class_e class = MUSE_CAMERA_API_CLASS_IMMEDIATE;
CAM_LOG_INFO("handle[%p]", muse_camera);
- ret = legacy_camera_is_supported_media_packet_preview_cb(muse_camera->camera_handle);
+ supported = legacy_camera_is_supported_media_packet_preview_cb(muse_camera->camera_handle);
- CAM_LOG_INFO("is supported ret[%d]", ret);
+ CAM_LOG_INFO("supported[%d]", supported);
- muse_camera_msg_return(api, class, ret, module);
+ muse_camera_msg_return(api, class, (int)supported, module);
+
+ return MUSE_CAMERA_ERROR_NONE;
+}
+
+int camera_dispatcher_is_supported_extra_preview(muse_module_h module)
+{
+ bool supported = false;
+ muse_camera_handle_s *muse_camera = NULL;
+ muse_camera_api_e api = MUSE_CAMERA_API_SUPPORT_EXTRA_PREVIEW;
+ muse_camera_api_class_e class = MUSE_CAMERA_API_CLASS_IMMEDIATE;
+
+ muse_camera = (muse_camera_handle_s *)muse_server_ipc_get_handle(module);
+
+ CAM_LOG_INFO("handle[%p]", muse_camera);
+
+ supported = legacy_camera_is_supported_extra_preview(muse_camera->camera_handle);
+
+ CAM_LOG_INFO("supported[%d]", supported);
+
+ muse_camera_msg_return(api, class, (int)supported, module);
return MUSE_CAMERA_ERROR_NONE;
}
int camera_dispatcher_attr_is_supported_hdr_capture(muse_module_h module)
{
- int ret = CAMERA_ERROR_NONE;
+ bool supported = false;
muse_camera_handle_s *muse_camera = NULL;
muse_camera_api_e api = MUSE_CAMERA_API_ATTR_IS_SUPPORTED_HDR_CAPTURE;
muse_camera_api_class_e class = MUSE_CAMERA_API_CLASS_IMMEDIATE;
CAM_LOG_INFO("handle[%p]", muse_camera);
- ret = legacy_camera_attr_is_supported_hdr_capture(muse_camera->camera_handle);
+ supported = legacy_camera_attr_is_supported_hdr_capture(muse_camera->camera_handle);
- CAM_LOG_INFO("ret[0x%x]", ret);
+ CAM_LOG_INFO("supported[%d]", supported);
- muse_camera_msg_return(api, class, ret, module);
+ muse_camera_msg_return(api, class, (int)supported, module);
return MUSE_CAMERA_ERROR_NONE;
}
int camera_dispatcher_attr_is_supported_anti_shake(muse_module_h module)
{
- int ret = CAMERA_ERROR_NONE;
+ bool supported = false;
muse_camera_handle_s *muse_camera = NULL;
muse_camera_api_e api = MUSE_CAMERA_API_ATTR_IS_SUPPORTED_ANTI_SHAKE;
muse_camera_api_class_e class = MUSE_CAMERA_API_CLASS_IMMEDIATE;
CAM_LOG_INFO("handle[%p]", muse_camera);
- ret = legacy_camera_attr_is_supported_anti_shake(muse_camera->camera_handle);
+ supported = legacy_camera_attr_is_supported_anti_shake(muse_camera->camera_handle);
- CAM_LOG_INFO("ret[0x%x]", ret);
+ CAM_LOG_INFO("supported[%d]", supported);
- muse_camera_msg_return(api, class, ret, module);
+ muse_camera_msg_return(api, class, (int)supported, module);
return MUSE_CAMERA_ERROR_NONE;
}
int camera_dispatcher_attr_is_supported_video_stabilization(muse_module_h module)
{
- int ret = CAMERA_ERROR_NONE;
+ bool supported = false;
muse_camera_handle_s *muse_camera = NULL;
muse_camera_api_e api = MUSE_CAMERA_API_ATTR_IS_SUPPORTED_VIDEO_STABILIZATION;
muse_camera_api_class_e class = MUSE_CAMERA_API_CLASS_IMMEDIATE;
CAM_LOG_INFO("handle[%p]", muse_camera);
- ret = legacy_camera_attr_is_supported_video_stabilization(muse_camera->camera_handle);
+ supported = legacy_camera_attr_is_supported_video_stabilization(muse_camera->camera_handle);
- CAM_LOG_INFO("ret[0x%x]", ret);
+ CAM_LOG_INFO("supported[%d]", supported);
- muse_camera_msg_return(api, class, ret, module);
+ muse_camera_msg_return(api, class, (int)supported, module);
return MUSE_CAMERA_ERROR_NONE;
}
int camera_dispatcher_attr_is_supported_auto_contrast(muse_module_h module)
{
- int ret = CAMERA_ERROR_NONE;
+ bool supported = false;
muse_camera_handle_s *muse_camera = NULL;
muse_camera_api_e api = MUSE_CAMERA_API_ATTR_IS_SUPPORTED_AUTO_CONTRAST;
muse_camera_api_class_e class = MUSE_CAMERA_API_CLASS_IMMEDIATE;
CAM_LOG_INFO("handle[%p]", muse_camera);
- ret = legacy_camera_attr_is_supported_auto_contrast(muse_camera->camera_handle);
+ supported = legacy_camera_attr_is_supported_auto_contrast(muse_camera->camera_handle);
- CAM_LOG_INFO("ret[0x%x]", ret);
+ CAM_LOG_INFO("supported[%d]", supported);
- muse_camera_msg_return(api, class, ret, module);
+ muse_camera_msg_return(api, class, (int)supported, module);
return MUSE_CAMERA_ERROR_NONE;
}
camera_dispatcher_attr_set_extra_preview_bitrate, /* MUSE_CAMERA_API_ATTR_SET_EXTRA_PREVIEW_BITRATE */
camera_dispatcher_attr_get_extra_preview_bitrate, /* MUSE_CAMERA_API_ATTR_GET_EXTRA_PREVIEW_BITRATE */
camera_dispatcher_attr_set_extra_preview_gop_interval, /* MUSE_CAMERA_API_ATTR_SET_EXTRA_PREVIEW_GOP_INTERVAL */
- camera_dispatcher_attr_get_extra_preview_gop_interval /* MUSE_CAMERA_API_ATTR_GET_EXTRA_PREVIEW_GOP_INTERVAL */
+ camera_dispatcher_attr_get_extra_preview_gop_interval, /* MUSE_CAMERA_API_ATTR_GET_EXTRA_PREVIEW_GOP_INTERVAL */
+ camera_dispatcher_is_supported_extra_preview /* MUSE_CAMERA_API_SUPPORT_EXTRA_PREVIEW, */
};