X-Git-Url: http://review.tizen.org/git/?p=platform%2Fcore%2Fmultimedia%2Flibmm-camcorder.git;a=blobdiff_plain;f=src%2Fmm_camcorder_resource.c;h=c95918e253224993359bb14feb2a2a19425f3b4b;hp=b54c46b75b70db3299212b6b2a0672ab7f239916;hb=f7daa8787a7673238759a71e3978e78d18c77a55;hpb=2a71be3d5bb4650869d5b8cf7eeeec3f4363f12f diff --git a/src/mm_camcorder_resource.c b/src/mm_camcorder_resource.c index b54c46b..c95918e 100644 --- a/src/mm_camcorder_resource.c +++ b/src/mm_camcorder_resource.c @@ -129,14 +129,8 @@ static void __mmcamcorder_resource_state_callback(mrp_res_context_t *context, mr _MMCAMCORDER_LOCK_ASM(camcorder); - /* set value to inform a status is changed by resource manaer */ - camcorder->state_change_by_system = _MMCAMCORDER_STATE_CHANGE_BY_RM; - /* Stop the camera */ - __mmcamcorder_force_stop(camcorder); - - /* restore value */ - camcorder->state_change_by_system = _MMCAMCORDER_STATE_CHANGE_NORMAL; + __mmcamcorder_force_stop(camcorder, _MMCAMCORDER_STATE_CHANGE_BY_RM); _MMCAMCORDER_UNLOCK_ASM(camcorder); @@ -264,14 +258,8 @@ static void __mmcamcorder_resource_release_cb(mrp_res_context_t *cx, const mrp_r _MMCAMCORDER_LOCK_ASM(camcorder); - /* set value to inform a status is changed by resource manager */ - camcorder->state_change_by_system = _MMCAMCORDER_STATE_CHANGE_BY_RM; - /* Stop the camera */ - __mmcamcorder_force_stop(camcorder); - - /* restore value */ - camcorder->state_change_by_system = _MMCAMCORDER_STATE_CHANGE_NORMAL; + __mmcamcorder_force_stop(camcorder, _MMCAMCORDER_STATE_CHANGE_BY_RM); _MMCAMCORDER_UNLOCK_ASM(camcorder);