summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeongmo Yang <jm80.yang@samsung.com>2017-03-13 11:18:25 +0900
committerJeongmo Yang <jm80.yang@samsung.com>2017-03-13 11:20:30 +0900
commit8e881fd57084b100ff0b504a83a9aadfd4571522 (patch)
treeb95c2f3a54bccf08984e33bacc5f4f9c086ef119
parent854a757a7a224e4cc2987cadc5996df72381f598 (diff)
downloadmmsvc-recorder-8e881fd57084b100ff0b504a83a9aadfd4571522.tar.gz
mmsvc-recorder-8e881fd57084b100ff0b504a83a9aadfd4571522.tar.bz2
mmsvc-recorder-8e881fd57084b100ff0b504a83a9aadfd4571522.zip
Avoid unnecessary preview format setting
[Version] 0.2.33 [Profile] Common [Issue Type] Update [Dependency module] N/A [Test] [M(T) - Boot=(OK), sdb=(OK), Home=(OK), Touch=(OK), Version=tizen-3.0-mobile_20170302.1] Change-Id: I1d651ef043669a648a036c97e21f2c3120d9fdf1 Signed-off-by: Jeongmo Yang <jm80.yang@samsung.com>
-rw-r--r--legacy/src/legacy_recorder.c13
-rw-r--r--packaging/mmsvc-recorder.spec2
2 files changed, 10 insertions, 5 deletions
diff --git a/legacy/src/legacy_recorder.c b/legacy/src/legacy_recorder.c
index f0a7d1e..8578bda 100644
--- a/legacy/src/legacy_recorder.c
+++ b/legacy/src/legacy_recorder.c
@@ -547,9 +547,8 @@ int legacy_recorder_create_videorecorder(camera_h camera, recorder_h *recorder)
legacy_recorder_get_state((recorder_h)handle, (recorder_state_e*)&handle->state);
mm_camcorder_get_attributes(handle->mm_handle, NULL,
- MMCAM_CAMERA_FORMAT, &preview_format,
+ MMCAM_CAMERA_FORMAT, &handle->origin_preview_format,
NULL);
- handle->origin_preview_format = preview_format;
mm_camcorder_get_attributes(handle->mm_handle, NULL,
MMCAM_RECOMMEND_PREVIEW_FORMAT_FOR_RECORDING, &preview_format,
@@ -575,13 +574,17 @@ int legacy_recorder_create_videorecorder(camera_h camera, recorder_h *recorder)
}
_camera_set_use(camera, true);
- if (handle->state == RECORDER_STATE_CREATED) {
+
+ if (handle->state == RECORDER_STATE_CREATED &&
+ preview_format != handle->origin_preview_format) {
ret = mm_camcorder_set_attributes(handle->mm_handle, NULL,
MMCAM_CAMERA_FORMAT, preview_format,
NULL);
+
if (ret == MM_ERROR_NONE)
handle->changed_preview_format = preview_format;
}
+
*recorder = (recorder_h)handle;
return RECORDER_ERROR_NONE;
@@ -702,7 +705,9 @@ int legacy_recorder_destroy(recorder_h recorder)
NULL);
/* preview format was changed? */
- if (ret == MM_ERROR_NONE && preview_format == handle->changed_preview_format) {
+ if (ret == MM_ERROR_NONE &&
+ preview_format == handle->changed_preview_format &&
+ preview_format != handle->origin_preview_format) {
ret = mm_camcorder_set_attributes(handle->mm_handle, NULL,
MMCAM_CAMERA_FORMAT, handle->origin_preview_format,
NULL);
diff --git a/packaging/mmsvc-recorder.spec b/packaging/mmsvc-recorder.spec
index adf75d0..a34331b 100644
--- a/packaging/mmsvc-recorder.spec
+++ b/packaging/mmsvc-recorder.spec
@@ -1,6 +1,6 @@
Name: mmsvc-recorder
Summary: A Recorder module for muse server
-Version: 0.2.32
+Version: 0.2.33
Release: 0
Group: Multimedia/Libraries
License: Apache-2.0