int legacy_recorder_attr_get_orientation_tag(recorder_h recorder, recorder_rotation_e *orientation);
/**
+ * @brief Sets the root directory to check available space.
+ * @details This function sets root directory to recorder, and it's used to check available space to write recording file.
+ * @since_tizen 3.0
+ * @param[in] recorder The handle to the media recorder
+ * @param[in] root_directory The root directory of the client process
+ * @return @c 0 on success, otherwise a negative error value
+ * @retval #RECORDER_ERROR_NONE Successful
+ * @retval #RECORDER_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #RECORDER_ERROR_INVALID_STATE Invalid state
+ * @retval #RECORDER_ERROR_PERMISSION_DENIED The access to the resources can not be granted
+ * @retval #RECORDER_ERROR_NOT_SUPPORTED The feature is not supported
+ * @pre The recorder state must be #RECORDER_STATE_CREATED or #RECORDER_STATE_READY.
+ */
+int legacy_recorder_attr_set_root_directory(recorder_h recorder, const char *root_directory);
+
+/**
* @}
*/
return __convert_recorder_error_code(__func__, ret);
}
+
+
+int legacy_recorder_attr_set_root_directory(recorder_h recorder, const char *root_directory)
+{
+ int ret = MM_ERROR_NONE;
+ recorder_s *handle = (recorder_s *)recorder;
+ MMCamcorderStateType mmstate = MM_CAMCORDER_STATE_NONE;
+
+ if (recorder == NULL) {
+ LOGE("handle is NULL");
+ return RECORDER_ERROR_INVALID_PARAMETER;
+ }
+
+ if (root_directory == NULL) {
+ LOGE("filename is NULL");
+ return RECORDER_ERROR_INVALID_PARAMETER;
+ }
+
+ mm_camcorder_get_state(handle->mm_handle, &mmstate);
+ if (mmstate >= MM_CAMCORDER_STATE_RECORDING) {
+ LOGE("invalid state %d", mmstate);
+ return RECORDER_ERROR_INVALID_STATE;
+ }
+
+ ret = mm_camcorder_set_attributes(handle->mm_handle, NULL,
+ MMCAM_ROOT_DIRECTORY, root_directory, strlen(root_directory),
+ NULL);
+
+ return __convert_recorder_error_code(__func__, ret);
+}
MUSE_RECORDER_API_ATTR_GET_AUDIO_CHANNEL,
MUSE_RECORDER_API_ATTR_SET_ORIENTATION_TAG,
MUSE_RECORDER_API_ATTR_GET_ORIENTATION_TAG, //55
- MUSE_RECORDER_API_MAX //56
+ MUSE_RECORDER_API_ATTR_SET_ROOT_DIRECTORY,
+ MUSE_RECORDER_API_MAX
} muse_recorder_api_e;
/**
return MUSE_RECORDER_ERROR_NONE;
}
+int recorder_dispatcher_attr_set_root_directory(muse_module_h module)
+{
+ int ret = RECORDER_ERROR_NONE;
+ intptr_t handle;
+ char root_directory[MUSE_RECORDER_MSG_MAX_LENGTH] = {0,};
+ muse_recorder_api_e api = MUSE_RECORDER_API_ATTR_SET_ROOT_DIRECTORY;
+
+ handle = muse_core_ipc_get_handle(module);
+
+ muse_recorder_msg_get_string(root_directory, muse_core_client_get_msg(module));
+
+ ret = legacy_recorder_attr_set_root_directory((recorder_h)handle, root_directory);
+
+ LOGD("handle : 0x%x, root_directory : %s", handle, root_directory);
+
+ muse_recorder_msg_return(api, ret, module);
+
+ return MUSE_RECORDER_ERROR_NONE;
+}
+
int (*dispatcher[MUSE_RECORDER_API_MAX]) (muse_module_h module) = {
recorder_dispatcher_create, /* MUSE_RECORDER_API_CREATE, */
recorder_dispatcher_destroy, /* MUSE_RECORDER_API_DESTROY, */
recorder_dispatcher_attr_get_audio_channel, /* MUSE_RECORDER_API_ATTR_GET_AUDIO_CHANNEL, */
recorder_dispatcher_attr_set_orientation_tag, /* MUSE_RECORDER_API_ATTR_SET_ORIENTATION_TAG, */
recorder_dispatcher_attr_get_orientation_tag, /* MUSE_RECORDER_API_ATTR_GET_ORIENTATION_TAG, */
+ recorder_dispatcher_attr_set_root_directory, /* MUSE_RECORDER_API_ATTR_SET_ROOT_DIRECTORY, */
};
Name: mmsvc-recorder
Summary: A Recorder module for muse server
-Version: 0.2.4
+Version: 0.2.5
Release: 0
Group: Multimedia/Libraries
License: Apache-2.0