From 046a3417d96bacfd5babfb57cb42b291e6cb3c64 Mon Sep 17 00:00:00 2001 From: Sangchul Lee Date: Tue, 18 Oct 2016 17:16:26 +0900 Subject: [PATCH 1/1] Use value of hcamcorder->sound_focus_id instead of 0 when acquiring or releasing a focus for session backward compatibility Previously, value 0 is used for the first parameter(id) of mm_sound_acquire_focus()/mm_sound_release_focus(). As a result, it caused misbehavior of session backward compatibility. Now it is fixed corretly. [Version] 0.10.82 [Profile] Common [Issue Type] Bug fix [Dependency module] N/A [Dependency commit] N/A [Test] [M(T) - Boot=(OK), sdb=(OK), Home=(OK), Touch=(OK), Version=tizen-mobile_20161016.2] Change-Id: I0db7fdeb122764f377a835c505f776568d01b557 Signed-off-by: Sangchul Lee --- packaging/libmm-camcorder.spec | 2 +- src/mm_camcorder_internal.c | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/packaging/libmm-camcorder.spec b/packaging/libmm-camcorder.spec index b8ddac1..dabdf82 100644 --- a/packaging/libmm-camcorder.spec +++ b/packaging/libmm-camcorder.spec @@ -1,6 +1,6 @@ Name: libmm-camcorder Summary: Camera and recorder library -Version: 0.10.81 +Version: 0.10.82 Release: 0 Group: Multimedia/Libraries License: Apache-2.0 diff --git a/src/mm_camcorder_internal.c b/src/mm_camcorder_internal.c index 0b46d7c..7a25950 100644 --- a/src/mm_camcorder_internal.c +++ b/src/mm_camcorder_internal.c @@ -905,7 +905,7 @@ int _mmcamcorder_realize(MMHandleType handle) /* acquire sound focus */ _mmcam_dbg_log("PAUSE_OTHERS - acquire sound focus"); - ret_sound = mm_sound_acquire_focus(0, FOCUS_FOR_BOTH, NULL); + ret_sound = mm_sound_acquire_focus(hcamcorder->sound_focus_id, FOCUS_FOR_BOTH, NULL); if (ret_sound != MM_ERROR_NONE) { _mmcam_dbg_err("mm_sound_acquire_focus failed [0x%x]", ret_sound); @@ -1256,7 +1256,7 @@ _ERR_CAMCORDER_CMD_PRECON_AFTER_LOCK: } if (hcamcorder->acquired_focus > 0) { - mm_sound_release_focus(0, hcamcorder->acquired_focus, NULL); + mm_sound_release_focus(hcamcorder->sound_focus_id, hcamcorder->acquired_focus, NULL); _mmcam_dbg_warn("release sound focus [focus %d] done", hcamcorder->acquired_focus); hcamcorder->acquired_focus = 0; } @@ -1399,7 +1399,7 @@ int _mmcamcorder_unrealize(MMHandleType handle) } if (hcamcorder->acquired_focus > 0) { - mm_sound_release_focus(0, hcamcorder->acquired_focus, NULL); + mm_sound_release_focus(hcamcorder->sound_focus_id, hcamcorder->acquired_focus, NULL); _mmcam_dbg_warn("release sound focus [focus %d] done", hcamcorder->acquired_focus); hcamcorder->acquired_focus = 0; } -- 2.7.4