projects
/
platform
/
core
/
multimedia
/
libmm-camcorder.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Support DPM popup
[platform/core/multimedia/libmm-camcorder.git]
/
src
/
mm_camcorder_internal.c
diff --git
a/src/mm_camcorder_internal.c
b/src/mm_camcorder_internal.c
index
3eb1590
..
6b07da4
100644
(file)
--- a/
src/mm_camcorder_internal.c
+++ b/
src/mm_camcorder_internal.c
@@
-1061,6
+1061,9
@@
int _mmcamcorder_realize(MMHandleType handle)
if (dpm_camera_state == DPM_DISALLOWED) {
_mmcam_dbg_err("CAMERA DISALLOWED by DPM");
ret = MM_ERROR_POLICY_RESTRICTED;
if (dpm_camera_state == DPM_DISALLOWED) {
_mmcam_dbg_err("CAMERA DISALLOWED by DPM");
ret = MM_ERROR_POLICY_RESTRICTED;
+
+ _mmcamcorder_request_dpm_popup(hcamcorder->gdbus_conn, "camera");
+
goto _ERR_CAMCORDER_CMD_PRECON_AFTER_LOCK;
}
} else {
goto _ERR_CAMCORDER_CMD_PRECON_AFTER_LOCK;
}
} else {
@@
-1749,6
+1752,9
@@
int _mmcamcorder_record(MMHandleType handle)
if (dpm_mic_state == DPM_DISALLOWED) {
_mmcam_dbg_err("MIC DISALLOWED by DPM");
ret = MM_ERROR_COMMON_INVALID_PERMISSION;
if (dpm_mic_state == DPM_DISALLOWED) {
_mmcam_dbg_err("MIC DISALLOWED by DPM");
ret = MM_ERROR_COMMON_INVALID_PERMISSION;
+
+ _mmcamcorder_request_dpm_popup(hcamcorder->gdbus_conn, "microphone");
+
goto _ERR_CAMCORDER_CMD_PRECON_AFTER_LOCK;
}
} else {
goto _ERR_CAMCORDER_CMD_PRECON_AFTER_LOCK;
}
} else {
@@
-3196,9
+3202,9
@@
GstBusSyncReply _mmcamcorder_encode_pipeline_bus_sync_callback(GstBus *bus, GstM
_mmcamcorder_send_message((MMHandleType)hcamcorder, &msg);
}
_mmcamcorder_send_message((MMHandleType)hcamcorder, &msg);
}
- }
- goto DROP_MESSAGE;
+ goto DROP_MESSAGE;
+ }
}
if (err) {
}
if (err) {
@@
-3423,6
+3429,8
@@
void _mmcamcorder_dpm_camera_policy_changed_cb(const char *name, const char *val
hcamcorder->state_change_by_system = _MMCAMCORDER_STATE_CHANGE_NORMAL;
_MMCAMCORDER_UNLOCK_ASM(hcamcorder);
hcamcorder->state_change_by_system = _MMCAMCORDER_STATE_CHANGE_NORMAL;
_MMCAMCORDER_UNLOCK_ASM(hcamcorder);
+
+ _mmcamcorder_request_dpm_popup(hcamcorder->gdbus_conn, "camera");
}
_mmcam_dbg_warn("done");
}
_mmcam_dbg_warn("done");
@@
-4019,6
+4027,8
@@
static gint __mmcamcorder_gst_handle_resource_error(MMHandleType handle, int cod
_MMCAMCORDER_UNLOCK_ASM(hcamcorder);
_MMCAMCORDER_UNLOCK_ASM(hcamcorder);
+ _mmcamcorder_request_dpm_popup(hcamcorder->gdbus_conn, "microphone");
+
return MM_ERROR_POLICY_RESTRICTED;
}
}
return MM_ERROR_POLICY_RESTRICTED;
}
}