From: Jeongmo Yang Date: Wed, 28 Oct 2015 08:31:45 +0000 (+0900) Subject: Release version 0.2.9 X-Git-Tag: accepted/tizen/mobile/20151029.041248^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F85%2F50385%2F1;p=platform%2Fcore%2Fapi%2Frecorder.git Release version 0.2.9 1. Set client's pid for sound focus Change-Id: I0e4e8ba419349073d977f04233274c471b487859 Signed-off-by: Jeongmo Yang --- diff --git a/packaging/capi-media-recorder.spec b/packaging/capi-media-recorder.spec index 4ff3272..0259a96 100644 --- a/packaging/capi-media-recorder.spec +++ b/packaging/capi-media-recorder.spec @@ -1,6 +1,6 @@ Name: capi-media-recorder Summary: A Recorder library in Tizen Native API -Version: 0.2.8 +Version: 0.2.9 Release: 0 Group: Multimedia/API License: Apache-2.0 diff --git a/src/recorder.c b/src/recorder.c index 4078b75..934912a 100644 --- a/src/recorder.c +++ b/src/recorder.c @@ -419,30 +419,38 @@ ErrorExit: int recorder_create_audiorecorder(recorder_h *recorder) { - if (recorder == NULL) { - LOGE("NULL pointer handle"); - return RECORDER_ERROR_INVALID_PARAMETER; - } - int sock_fd = -1; + int pid = 0; char *sndMsg; int ret = RECORDER_ERROR_NONE; recorder_cli_s *pc = NULL; - muse_recorder_api_e api = MUSE_RECORDER_API_CREATE; muse_core_api_module_e muse_module = MUSE_RECORDER; int recorder_type = MUSE_RECORDER_TYPE_AUDIO; LOGW("Enter"); + if (recorder == NULL) { + LOGE("NULL pointer handle"); + return RECORDER_ERROR_INVALID_PARAMETER; + } + sock_fd = muse_core_client_new(); + if (sock_fd < 0) { + LOGE("muse_core_client_new failed - returned fd %d", sock_fd); + return RECORDER_ERROR_INVALID_OPERATION; + } + + pid = getpid(); sndMsg = muse_core_msg_json_factory_new(api, - MUSE_TYPE_INT, "module", muse_module, - MUSE_TYPE_INT, PARAM_RECORDER_TYPE, recorder_type, - 0); + MUSE_TYPE_INT, "module", muse_module, + MUSE_TYPE_INT, PARAM_RECORDER_TYPE, recorder_type, + MUSE_TYPE_INT, "pid", pid, + 0); - muse_core_ipc_send_msg(sock_fd, sndMsg); LOGD("sock_fd : %d, msg : %s", sock_fd, sndMsg); + + muse_core_ipc_send_msg(sock_fd, sndMsg); muse_core_msg_json_factory_free(sndMsg); pc = g_new0(recorder_cli_s, 1);