SET(submodule "streamrecorder")
# for package file
-SET(dependents "dlog mm-streamrecorder capi-media-audio-io capi-media-tool")
-SET(pc_dependents "capi-base-common capi-media-audio-io capi-media-tool")
+SET(dependents "dlog mm-streamrecorder capi-media-tool")
+SET(pc_dependents "capi-base-common capi-media-tool")
SET(fw_name "${project_prefix}-${service}-${submodule}")
Name: capi-media-streamrecorder
Summary: A Streamrecorder library in Tizen Native API
-Version: 0.0.14
+Version: 0.0.15
Release: 0
Group: Multimedia/Other
License: Apache-2.0
Buildrequires: pkgconfig(mm-streamrecorder)
BuildRequires: pkgconfig(capi-base-common)
BuildRequires: pkgconfig(capi-media-tool)
-BuildRequires: pkgconfig(capi-media-audio-io)
BuildRequires: pkgconfig(libtbm)
Requires(post): /sbin/ldconfig
Requires(postun): /sbin/ldconfig
int _streamrecorder_cancel(streamrecorder_h recorder)
{
+ int ret = MM_ERROR_NONE;
streamrecorder_s *handle = (streamrecorder_s *)recorder;
+ streamrecorder_state_e state = STREAMRECORDER_STATE_NONE;
if (recorder == NULL) {
LOGE("NULL pointer handle");
return STREAMRECORDER_ERROR_INVALID_PARAMETER;
}
+ ret = streamrecorder_get_state(recorder, &state);
+ if (ret != MM_ERROR_NONE) {
+ return __convert_streamrecorder_error_code(__func__, ret);
+ }
+
+ if (!(state == STREAMRECORDER_STATE_RECORDING || state == STREAMRECORDER_STATE_PAUSED)) {
+ LOGE("STREAMRECORDER_ERROR_INVALID_STATE (state:%d)", state);
+ return STREAMRECORDER_ERROR_INVALID_STATE;
+ }
+
return __convert_streamrecorder_error_code(__func__, mm_streamrecorder_cancel(handle->mm_handle));
}