Previously, recorder handle for video could be destroyed while recording.
Then, there is no way to stop recording, so the handle should not be destroyed while recording.
[Version] 0.3.8
[Profile] Common
[Issue Type] Bug fix
[Dependency module] N/A
[Test] [M(T) - Boot=(OK), sdb=(OK), Home=(OK), Touch=(OK), Version=tizen-4.0-unified_20171018.2]
Change-Id: Idc3aa460673363e828a6c90e0c6cdd08a58fb469
Signed-off-by: Jeongmo Yang <jm80.yang@samsung.com>
handle = (recorder_s *)recorder;
if (handle->type == _RECORDER_TYPE_VIDEO) {
+ MMCamcorderStateType mm_state = MM_CAMCORDER_STATE_NONE;
+
+ /* check state */
+ ret = mm_camcorder_get_state(handle->mm_handle, &mm_state);
+ if (ret != MM_ERROR_NONE) {
+ LOGE("get state failed 0x%x", ret);
+ return __convert_recorder_error_code(__func__, ret);
+ }
+
+ if (mm_state >= MM_CAMCORDER_STATE_RECORDING) {
+ LOGE("NOW RECORDING[%d], should not destroy", mm_state);
+ return RECORDER_ERROR_INVALID_STATE;
+ }
+
/* set to unsed */
legacy_camera_lock(handle->mm_source.camera, true);
Name: mmsvc-recorder
Summary: A Recorder module for muse server
-Version: 0.3.7
+Version: 0.3.8
Release: 0
Group: Multimedia/Libraries
License: Apache-2.0