summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
fa4e61b)
[Version] 0.10.120
[Profile] Common
[Issue Type] Update
[Dependency module] N/A
[Test] [M(T) - Boot=(OK), sdb=(OK), Home=(OK), Touch=(OK), Version=tizen-unified_20170502.4]
Change-Id: I819d004faafe0a2d2b0f3bd72db7b938549f3db9
Signed-off-by: Jeongmo Yang <jm80.yang@samsung.com>
Name: libmm-camcorder
Summary: Camera and recorder library
Name: libmm-camcorder
Summary: Camera and recorder library
Release: 0
Group: Multimedia/Libraries
License: Apache-2.0
Release: 0
Group: Multimedia/Libraries
License: Apache-2.0
{
int ret = MM_ERROR_NONE;
int state = MM_CAMCORDER_STATE_NONE;
{
int ret = MM_ERROR_NONE;
int state = MM_CAMCORDER_STATE_NONE;
+ int audio_disable = FALSE;
int dpm_mic_state = DPM_ALLOWED;
mmf_camcorder_t *hcamcorder = MMF_CAMCORDER(handle);
int dpm_mic_state = DPM_ALLOWED;
mmf_camcorder_t *hcamcorder = MMF_CAMCORDER(handle);
+ _MMCamcorderSubContext *sc = NULL;
+ if (!hcamcorder || !MMF_CAMCORDER_SUBCONTEXT(hcamcorder)) {
_mmcam_dbg_err("Not initialized");
ret = MM_ERROR_CAMCORDER_NOT_INITIALIZED;
return ret;
}
_mmcam_dbg_err("Not initialized");
ret = MM_ERROR_CAMCORDER_NOT_INITIALIZED;
return ret;
}
+ sc = MMF_CAMCORDER_SUBCONTEXT(handle);
+
if (!_MMCAMCORDER_TRYLOCK_CMD(hcamcorder)) {
_mmcam_dbg_err("Another command is running.");
ret = MM_ERROR_CAMCORDER_CMD_IS_RUNNING;
if (!_MMCAMCORDER_TRYLOCK_CMD(hcamcorder)) {
_mmcam_dbg_err("Another command is running.");
ret = MM_ERROR_CAMCORDER_CMD_IS_RUNNING;
/* initialize error code */
hcamcorder->error_code = MM_ERROR_NONE;
/* initialize error code */
hcamcorder->error_code = MM_ERROR_NONE;
+ /* get audio disable */
+ mm_camcorder_get_attributes(handle, NULL,
+ MMCAM_AUDIO_DISABLE, &sc->audio_disable,
+ NULL);
+
+ sc->audio_disable |= sc->is_modified_rate;
+
/* check mic policy from DPM */
/* check mic policy from DPM */
- if (hcamcorder->dpm_handle) {
+ if (hcamcorder->dpm_handle && sc->audio_disable == FALSE) {
if (dpm_restriction_get_microphone_state(hcamcorder->dpm_handle, &dpm_mic_state) == DPM_ERROR_NONE) {
_mmcam_dbg_log("DPM mic state %d", dpm_mic_state);
if (dpm_mic_state == DPM_DISALLOWED) {
if (dpm_restriction_get_microphone_state(hcamcorder->dpm_handle, &dpm_mic_state) == DPM_ERROR_NONE) {
_mmcam_dbg_log("DPM mic state %d", dpm_mic_state);
if (dpm_mic_state == DPM_DISALLOWED) {
_mmcam_dbg_err("get DPM mic state failed, keep going...");
}
} else {
_mmcam_dbg_err("get DPM mic state failed, keep going...");
}
} else {
- _mmcam_dbg_warn("NULL dpm_handle");
+ _mmcam_dbg_warn("skip dpm check - handle %p, audio disable %d",
+ hcamcorder->dpm_handle, sc->audio_disable);
}
ret = hcamcorder->command((MMHandleType)hcamcorder, _MMCamcorder_CMD_RECORD);
}
ret = hcamcorder->command((MMHandleType)hcamcorder, _MMCamcorder_CMD_RECORD);
{
int i = 0;
int err = MM_ERROR_NONE;
{
int i = 0;
int err = MM_ERROR_NONE;
- int audio_disable = FALSE;
const char* gst_element_rsink_name = NULL;
GstBus *bus = NULL;
const char* gst_element_rsink_name = NULL;
GstBus *bus = NULL;
/* get audio disable */
mm_camcorder_get_attributes(handle, NULL,
/* get audio disable */
mm_camcorder_get_attributes(handle, NULL,
- MMCAM_AUDIO_DISABLE, &audio_disable,
+ MMCAM_AUDIO_DISABLE, &sc->audio_disable,
- if (sc->is_modified_rate || audio_disable)
- sc->audio_disable = TRUE;
- else
- sc->audio_disable = FALSE;
+ _mmcam_dbg_log("MMCAM_AUDIO_DISABLE %d, is_modified_rate %d",
+ sc->audio_disable, sc->is_modified_rate);
- _mmcam_dbg_log("AUDIO DISABLE : %d (is_modified_rate %d, audio_disable %d)",
- sc->audio_disable, sc->is_modified_rate, audio_disable);
+ sc->audio_disable |= sc->is_modified_rate;
if (sc->audio_disable == FALSE) {
/* create audiosrc bin */
if (sc->audio_disable == FALSE) {
/* create audiosrc bin */