-
-CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
+CMAKE_MINIMUM_REQUIRED(VERSION 2.6...2.8.12)
SET(MUSE_CORE "muse-core")
PROJECT(${MUSE_CORE})
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DMUSE_USE_LWIPC")
ENDIF(${MUSE_LWIPC_ENABLE})
+IF(${MUSE_LW})
+SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DMUSE_ONDEMAND -DMUSE_LITE")
+ENDIF(${MUSE_LW})
+
IF(${MUSE_TTRACE_ENABLE})
SET(dependents ${dependents} " ttrace")
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DMUSE_TTRACE_LOG")
-
-CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
+CMAKE_MINIMUM_REQUIRED(VERSION 2.6...2.8.12)
SET(MUSE_CLIENT "muse-client")
PROJECT(${MUSE_CLIENT})
int fd = -1;
ms_boost_t bst = { 0 };
+#ifndef MUSE_ONDEMAND
if (!muse_server_is_ready()) {
LOGE("muse server is not ready");
return MM_ERROR_UNKNOWN;
}
+#endif
if (channel == MUSE_CHANNEL_MSG)
_mc_table_new();
typedef enum {
MUSE_PLAYER,
+#ifndef MUSE_LITE
MUSE_CAMERA,
MUSE_RECORDER,
+#endif
MUSE_DRM_SVC,
MUSE_EPPLAYER,
MUSE_MODULE_MAX
-CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
+CMAKE_MINIMUM_REQUIRED(VERSION 2.6...2.8.12)
PROJECT(ISU C)
INSTALL(FILES isu.cfg DESTINATION /etc/isu/muse-server/ PERMISSIONS OWNER_WRITE OWNER_READ)
--- /dev/null
+[Unit]
+Description=muse server of vd product (tv)
+DefaultDependencies=no
+Requires=sysinit.target
+After=sysinit.target
+
+[Service]
+Type=simple
+User=multimedia_fw
+Group=multimedia_fw
+SmackProcessLabel=System
+ExecStart=/usr/bin/boostShell -a -r 5 -t 5000 -p /usr/bin/muse-server
+ExecStopPost=/usr/bin/ewaiter -r "/run/mused/muse_server_ready"
+MemoryLimit=300M
+EnvironmentFile=/run/tizen-system-env
+EnvironmentFile=/run/xdg-root-env
+SupplementaryGroups=priv_mediastorage priv_camera priv_recorder
+Capabilities=cap_dac_override=i
+SecureBits=keep-caps
--- /dev/null
+[Socket]
+SocketUser=multimedia_fw
+SocketGroup=multimedia_fw
+ListenStream=/run/mused/muse_server_msg.socket
+Service=muse-server.service
+SocketMode=0777
+
+[Install]
+WantedBy=sockets.target
Source2: gtest.input
Source4: muse-server-vd_product_tv.service
Source5: muse-server-vd_product_audio.service
+Source6: muse-server.socket
Source7: muse-server.path
+Source8: muse-server-vd_product_ltv.service
BuildRequires: cmake
BuildRequires: pkgconfig(libsystemd)
BuildRequires: pkgconfig(capi-system-info)
export LDFLAGS+=" -lgcov "
%endif
+%if ("%{sec_buildconf_optimized_memory}" == "1")
+%cmake . -DCMAKE_INSTALL_PREFIX=/usr -DFULLVER=%{version} -DMAJORVER=${MAJORVER} -DLIBDIR=%{_libdir} -DTZ_SYS_DATA=%TZ_SYS_DATA -DMUSE_REGISTER_VIP=1 -DMUSE_TTRACE_ENABLE=1 -DMUSE_LWIPC_ENABLE=1 -DMUSE_BOOST_ENABLE=1 -DMUSE_LW=1
+%else
%if ("%{_vd_cfg_product_type}" == "AUDIO") || ("%{_vd_cfg_product_type}" == "TV") || ("%{_vd_cfg_product_type}" == "LFD") || ("%{_vd_cfg_product_type}" == "HTV") || ("%{_vd_cfg_product_type}" == "AV") || ("%{_vd_cfg_product_type}" == "IWB") || ("%{_vd_cfg_product_type}" == "WALL")
%cmake . -DCMAKE_INSTALL_PREFIX=/usr -DFULLVER=%{version} -DMAJORVER=${MAJORVER} -DLIBDIR=%{_libdir} -DTZ_SYS_DATA=%TZ_SYS_DATA -DMUSE_REGISTER_VIP=1 -DMUSE_TTRACE_ENABLE=1 -DMUSE_LWIPC_ENABLE=1 -DMUSE_BOOST_ENABLE=1
%else
export CFLAGS+=" -DMUSE_USE_POWER_OFF_STATE_CHANGE -DMUSE_USE_WATCHDOG"
%cmake . -DCMAKE_INSTALL_PREFIX=/usr -DFULLVER=%{version} -DMAJORVER=${MAJORVER} -DLIBDIR=%{_libdir} -DTZ_SYS_DATA=%TZ_SYS_DATA -DMUSE_GTESTS_BUILD=%{?gtests:1}%{!?gtests:0} -DMUSE_STORAGE_ENABLE=1
%endif
+%endif
make %{?jobs:-j%jobs}
%make_install
+%if ("%{sec_buildconf_optimized_memory}" == "1")
+mkdir -p %{buildroot}%{_unitdir}/sockets.target.wants
+install -m 0644 %SOURCE6 %{buildroot}%{_unitdir}/muse-server.socket
+%install_service sockets.target.wants muse-server.socket
+install -m 0644 %SOURCE8 %{buildroot}%{_unitdir}/muse-server.service
+%else
%if ("%{_vd_cfg_product_type}" == "AUDIO")
mkdir -p %{buildroot}%{_unitdir}/stater.target.wants
install -m 0644 %SOURCE5 %{buildroot}%{_unitdir}/muse-server.service
%endif
%endif
+%endif
mkdir -p %{buildroot}/var/log/%{name}
mkdir -p %{buildroot}%{TZ_SYS_DATA}/%{name}
%{_libdir}/libmuse-*.so.*
%license LICENSE.APLv2
%{_unitdir}/muse-server.service
+%if ("%{sec_buildconf_optimized_memory}" == "1")
+%{_unitdir}/muse-server.socket
+%{_unitdir}/sockets.target.wants/muse-server.socket
+%else
%if ("%{_vd_cfg_product_type}" == "AUDIO")
%{_unitdir}/starter.target.wants/muse-server.service
%else
%{_unitdir}/muse-server.path
%endif
%endif
+%endif
+
%{TZ_SYS_DATA}/%{name}
/var/log/%{name}
%{_bindir}/*
-
-CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
+CMAKE_MINIMUM_REQUIRED(VERSION 2.6...2.8.12)
SET(MUSE_SERVER "muse-server")
PROJECT(${MUSE_SERVER})
#define DEFAULT_WATCHDOG_DISABLED_API_INDEX -1 /* Watchdog is applied to all dispatcher functions */
#define DEFAULT_MAX_INSTANCE -1 /* Unlimited */
#define DEFAULT_CAUTION_INSTANCE -1
-#define DEFAULT_ON_DEMAND_MAX_IDLE_TIME 600 /* 10 minute */
+#define DEFAULT_ON_DEMAND_MAX_IDLE_TIME 300 /* 5 minute */
#define DEFAULT_ON_DEMAND_MAX_IDLE_MEMORY 30000 /* 30MB */
#define DEFAULT_IDLE_STATE_WAIT_TIME 10 /* seconds */
int ms_connection_register(muse_module_h m)
{
- int caution_instance;
+ int caution_instance, idx;
GQueue *queue;
ms_connection_t *connection = NULL;
g_autoptr(GMutexLocker) locker = NULL;
caution_instance = ms_config_get_caution_instance(m->idx);
if (caution_instance != DEFAULT_CAUTION_INSTANCE && connection->instance_count[m->idx] > caution_instance) {
- LOGI("[MUSE_MODULE_COMMAND_CREATE_CAUTION] player # %d | camera # %d | recorder # %d > %d",
- connection->instance_count[MUSE_PLAYER], connection->instance_count[MUSE_CAMERA],
- connection->instance_count[MUSE_RECORDER], caution_instance);
+ for (idx = MUSE_PLAYER; idx < MUSE_MODULE_MAX; idx++) {
+ LOGI("[MUSE_MODULE_COMMAND_CREATE_CAUTION] %s # %d > %d",
+ ms_config_get_host_name(idx), connection->instance_count[idx], caution_instance);
+ }
ms_cmd_dispatch(m, MUSE_MODULE_COMMAND_CREATE_CAUTION);
}
-
-CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
+CMAKE_MINIMUM_REQUIRED(VERSION 2.6...2.8.12)
LINK_DIRECTORIES(${CMAKE_BINARY_DIR})
INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/server/include)
INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/client/include)