X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=src%2Fmm_camcorder_attribute.c;h=c92fcc8313e4dd995979316f074872654fe8fcc2;hb=68d860d642b2e84b9d07ca1c11169bac4bf5a864;hp=4e8000451840e8861732211de237f56a5397baee;hpb=1feba48951f569c00e2e69cb1a27ba5e20cc9e1f;p=platform%2Fcore%2Fmultimedia%2Flibmm-camcorder.git diff --git a/src/mm_camcorder_attribute.c b/src/mm_camcorder_attribute.c index 4e80004..c92fcc8 100644 --- a/src/mm_camcorder_attribute.c +++ b/src/mm_camcorder_attribute.c @@ -1747,7 +1747,7 @@ _mmcamcorder_set_attributes(MMHandleType handle, char **err_attr_name, const cha if (attrs) { ret = __mmcamcorder_check_valid_pair(handle, err_attr_name, attribute_name, var_args); } else { - _mmcam_dbg_err("handle 0x%x, attrs is NULL, attr name [%s]", handle, attribute_name); + _mmcam_dbg_err("handle %p, attrs is NULL, attr name [%s]", handle, attribute_name); ret = MM_ERROR_CAMCORDER_NOT_INITIALIZED; } @@ -2575,9 +2575,7 @@ bool _mmcamcorder_commit_camera_ptz_type(MMHandleType handle, int attr_idx, cons } } - if (item == NULL) { - _mmcam_dbg_warn("failed to find tilt control channel"); - } + _mmcam_dbg_warn("failed to find tilt control channel"); } return FALSE; @@ -2642,9 +2640,7 @@ bool _mmcamcorder_commit_camera_pan(MMHandleType handle, int attr_idx, const mmf } } - if (item == NULL) { - _mmcam_dbg_warn("failed to find pan control channel"); - } + _mmcam_dbg_warn("failed to find pan control channel"); } return FALSE; @@ -2709,9 +2705,7 @@ bool _mmcamcorder_commit_camera_tilt(MMHandleType handle, int attr_idx, const mm } } - if (item == NULL) { - _mmcam_dbg_warn("failed to find tilt control channel"); - } + _mmcam_dbg_warn("failed to find tilt control channel"); } return FALSE; @@ -4552,6 +4546,17 @@ bool _mmcamcorder_commit_pid_for_sound_focus(MMHandleType handle, int attr_idx, hcamcorder->sound_focus_register = FALSE; _mmcam_dbg_warn("no need to use sound focus internally"); } else { + /* check my session type : allow only media & call series here */ + if ((hcamcorder->session_type != MM_SESSION_TYPE_MEDIA) && + (hcamcorder->session_type != MM_SESSION_TYPE_MEDIA_RECORD) && + (hcamcorder->session_type != MM_SESSION_TYPE_CALL) && + (hcamcorder->session_type != MM_SESSION_TYPE_VIDEOCALL) && + (hcamcorder->session_type != MM_SESSION_TYPE_VOIP)) { + _mmcam_dbg_err("Blocked by session policy, my session_type[%s]", hcamcorder->session_type); + hcamcorder->error_code = MM_ERROR_POLICY_BLOCKED; + return FALSE; + } + ret = mm_sound_focus_get_id(&hcamcorder->sound_focus_id); if (ret != MM_ERROR_NONE) { _mmcam_dbg_err("mm_sound_focus_get_id failed");