Name: mused
Summary: A Multimedia Daemon in Tizen Native API
-Version: 0.1.18
+Version: 0.1.19
Release: 0
Group: System/Libraries
License: Apache-2.0
%make_install
%if "%{?profile}" == "tv"
+export CFLAGS+=" -DMUSE_TV_PROFILE"
%if ("%{VD_PRODUCT_TYPE}" == "AUDIO")
mkdir -p %{buildroot}%{_unitdir}/stater.target.wants
install -m 0644 %SOURCE5 %{buildroot}%{_unitdir}/muse-server.service
{
g_return_if_fail(module != NULL);
+#ifndef MUSE_TV_PROFILE
muse_core_log_get_instance()->flush_msg();
+#endif
g_queue_free(module->ch[MUSE_CHANNEL_DATA].queue);
module->ch[MUSE_CHANNEL_DATA].queue = NULL;
api_module = 0;
module->msg_offset = 0;
+#ifndef MUSE_TV_PROFILE
muse_core_log_get_instance()->log(module->recvMsg);
+#endif
while (module->msg_offset < len) {
if (muse_core_msg_json_deserialize(MUSE_API, module->recvMsg + module->msg_offset, &parse_len, &cmd, &err, MUSE_TYPE_INT)) {
char err_msg[MAX_ERROR_MSG_LEN] = {'\0',};
g_return_val_if_fail(buf != NULL, MM_ERROR_INVALID_ARGUMENT);
+
+#ifndef MUSE_TV_PROFILE
muse_core_log_get_instance()->log((char*)buf);
+#endif
memset(&iov, 0, sizeof(iov));
iov.iov_base = (void*)buf;
static void _muse_core_log_monitor(char *msg)
{
+#ifndef MUSE_TV_PROFILE
g_return_if_fail(msg != NULL);
g_return_if_fail(g_muse_core_log != NULL);
_muse_core_log_write_buffer(msg, strlen(msg));
}
}
+#endif
}
static void _muse_core_log_fatal(char *msg)
static void _muse_core_log_set_msg(char *msg)
{
+#ifndef MUSE_TV_PROFILE
g_return_if_fail(g_muse_core_log != NULL);
g_return_if_fail(msg != NULL);
memcpy(g_muse_core_log->buf, msg, size);
memcpy(g_muse_core_log->buf + size, "\0", 1);
+#endif
}
static char *_muse_core_log_get_msg(void)
static void _muse_core_log_flush_msg(void)
{
+#ifndef MUSE_TV_PROFILE
if (write(g_muse_core_log->log_fd, g_muse_core_log->cache, strlen(g_muse_core_log->cache)) != (int)strlen(g_muse_core_log->cache))
LOGE("There was an error writing to logfile");
+#endif
}
muse_core_log_t *muse_core_log_get_instance(void)
void muse_core_log_init(void)
{
+#ifndef MUSE_TV_PROFILE
LOGD("Enter");
if (g_muse_core_log == NULL)
_muse_core_log_init_signals();
LOGD("Leave");
+#endif
}
jsonMsg = json_object_to_json_string(jobj);
sndMsg = g_strdup(jsonMsg);
+
+#ifndef MUSE_TV_PROFILE
muse_core_log_get_instance()->set_msg(sndMsg);
+#endif
json_object_put(jobj);
exit(0);
}
+#ifndef MUSE_TV_PROFILE
/* create new session */
muse_core_log_get_instance()->pid = setsid();
if (muse_core_log_get_instance()->pid < 0) {
LOGE("SID : %d, PID CLOSE!!", muse_core_log_get_instance()->pid);
exit(0);
}
+#endif
/* Change the file mode mask */
umask(0);