AC_SUBST(MM_COMMON_CFLAGS)
AC_SUBST(MM_COMMON_LIBS)
+AC_ARG_ENABLE(murphy, AC_HELP_STRING([--enable-murphy], [enable murphy]),
+[
+ case "${enableval}" in
+ yes) MURPHY_SUPPORT=yes ;;
+ no) MURPHY_SUPPORT=no ;;
+ *) AC_MSG_ERROR(bad value ${enableval} for --enable-murphy) ;;
+ esac
+],[MURPHY_SUPPORT=no])
+if test "x$MURPHY_SUPPORT" = "xyes"; then
PKG_CHECK_MODULES(MURPHY_RESOURCE, murphy-resource)
AC_SUBST(MURPHY_RESOURCE_CFLAGS)
AC_SUBST(MURPHY_RESOURCE_LIBS)
-
PKG_CHECK_MODULES(MURPHY_GLIB, murphy-glib)
AC_SUBST(MURPHY_GLIB_CFLAGS)
AC_SUBST(MURPHY_GLIB_LIBS)
+fi
+AM_CONDITIONAL([MURPHY_SUPPORT], [test "x$MURPHY_SUPPORT" = "xyes"])
PKG_CHECK_MODULES(MM_SOUND, mm-sound)
AC_SUBST(MM_SOUND_CFLAGS)
mm_camcorder_configure.c \
mm_camcorder_util.c \
mm_camcorder_exifinfo.c \
- mm_camcorder_sound.c \
- mm_camcorder_resource.c
+ mm_camcorder_sound.c
libmmfcamcorder_la_CFLAGS = -I$(srcdir)/include \
$(GST_CFLAGS) \
$(MMUTIL_JPEG_CFLAGS) \
$(TBM_CFLAGS) \
$(STORAGE_CFLAGS) \
- $(MURPHY_RESOURCE_CFLAGS) \
- $(MURPHY_GLIB_CFLAGS) \
$(TTRACE_CFLAGS) \
$(DPM_CFLAGS) \
$(SYSTEMINFO_CFLAGS)
$(MMUTIL_IMGP_LIBS) \
$(MMUTIL_JPEG_LIBS) \
$(TBM_LIBS) \
- $(MURPHY_RESOURCE_LIBS) \
- $(MURPHY_GLIB_LIBS) \
$(TTRACE_LIBS) \
$(DPM_LIBS) \
$(STORAGE_LIBS)
libmmfcamcorder_la_LIBADD += $(GST_WAYLAND_LIBS)
endif
+if MURPHY_SUPPORT
+libmmfcamcorder_la_SOURCES += mm_camcorder_resource.c
+libmmfcamcorder_la_CFLAGS += $(MURPHY_RESOURCE_CFLAGS) $(MURPHY_GLIB_CFLAGS) -D_MMCAMCORDER_MURPHY_SUPPORT
+libmmfcamcorder_la_LIBADD += $(MURPHY_RESOURCE_LIBS) $(MURPHY_GLIB_LIBS)
+endif
+
install-exec-hook:
mkdir -p $(DESTDIR)$(prefix)/share/sounds/mm-camcorder && \
cp $(srcdir)/../sounds/* $(DESTDIR)$(prefix)/share/sounds/mm-camcorder/
#include "mm_camcorder.h"
#include "mm_debug.h"
+
+#ifdef _MMCAMCORDER_MURPHY_SUPPORT
#include "mm_camcorder_resource.h"
+#endif /* _MMCAMCORDER_MURPHY_SUPPORT */
/* camcorder sub module */
#include "mm_camcorder_attribute.h"
GCond task_thread_cond; /**< cond for task thread */
_MMCamcorderTaskThreadState task_thread_state; /**< state of task thread */
+#ifdef _MMCAMCORDER_MURPHY_SUPPORT
/* resource manager for H/W resources */
MMCamcorderResourceManager resource_manager;
+#endif /* _MMCAMCORDER_MURPHY_SUPPORT */
/* gdbus */
GDBusConnection *gdbus_conn; /**< gdbus connection */
#include <mm_session.h>
#include <mm_session_private.h>
+#ifdef _MMCAMCORDER_MURPHY_SUPPORT
#include <murphy/common/glib-glue.h>
+#endif /* _MMCAMCORDER_MURPHY_SUPPORT */
/*---------------------------------------------------------------------------------------
}
}
+#ifdef _MMCAMCORDER_MURPHY_SUPPORT
/* initialize resource manager */
ret = _mmcamcorder_resource_manager_init(&hcamcorder->resource_manager, (void *)hcamcorder);
if (ret != MM_ERROR_NONE) {
ret = MM_ERROR_CAMCORDER_INTERNAL;
goto _ERR_DEFAULT_VALUE_INIT;
}
+#endif /* _MMCAMCORDER_MURPHY_SUPPORT */
traceBegin(TTRACE_TAG_CAMERA, "MMCAMCORDER:CREATE:INIT_GSTREAMER");
return MM_ERROR_NONE;
_ERR_DEFAULT_VALUE_INIT:
+#ifdef _MMCAMCORDER_MURPHY_SUPPORT
/* de-initialize resource manager */
_mmcamcorder_resource_manager_deinit(&hcamcorder->resource_manager);
+#endif /* _MMCAMCORDER_MURPHY_SUPPORT */
/* unregister sound focus */
if (hcamcorder->sound_focus_register && hcamcorder->sound_focus_id > 0) {
hcamcorder->sub_context = NULL;
}
+#ifdef _MMCAMCORDER_MURPHY_SUPPORT
/* de-initialize resource manager */
ret = _mmcamcorder_resource_manager_deinit(&hcamcorder->resource_manager);
if (ret != MM_ERROR_NONE) {
_mmcam_dbg_err("failed to de-initialize resource manager 0x%x", ret);
}
+#endif /* _MMCAMCORDER_MURPHY_SUPPORT */
/* Remove idle function which is not called yet */
if (hcamcorder->setting_event_id) {
{
int ret = MM_ERROR_NONE;
int ret_sound = MM_ERROR_NONE;
- int ret_resource = MM_ERROR_NONE;
int state = MM_CAMCORDER_STATE_NONE;
int state_FROM = MM_CAMCORDER_STATE_NULL;
int state_TO = MM_CAMCORDER_STATE_READY;
} else {
_mmcam_dbg_warn("NULL dpm_policy");
}
-
+#ifdef _MMCAMCORDER_MURPHY_SUPPORT
/* prepare resource manager for camera */
ret = _mmcamcorder_resource_manager_prepare(&hcamcorder->resource_manager, MM_CAMCORDER_RESOURCE_TYPE_CAMERA);
if (ret != MM_ERROR_NONE) {
_mmcamcorder_resource_manager_unprepare(&hcamcorder->resource_manager);
goto _ERR_CAMCORDER_CMD_PRECON_AFTER_LOCK;
}
+#endif /* _MMCAMCORDER_MURPHY_SUPPORT */
}
/* create pipeline */
return MM_ERROR_NONE;
_ERR_CAMCORDER_CMD:
+#ifdef _MMCAMCORDER_MURPHY_SUPPORT
/* release hw resources */
if (hcamcorder->type == MM_CAMCORDER_MODE_VIDEO_CAPTURE) {
- ret_resource = _mmcamcorder_resource_manager_release(&hcamcorder->resource_manager);
+ int ret_resource = _mmcamcorder_resource_manager_release(&hcamcorder->resource_manager);
if (ret_resource == MM_ERROR_RESOURCE_INVALID_STATE) {
_mmcam_dbg_warn("it could be in the middle of resource callback or there's no acquired resource");
}
_mmcam_dbg_err("failed to unprepare resource manager, ret_resource(0x%x)", ret_resource);
}
}
+#endif /* _MMCAMCORDER_MURPHY_SUPPORT */
_ERR_CAMCORDER_CMD_PRECON_AFTER_LOCK:
_MMCAMCORDER_UNLOCK_CMD(hcamcorder);
hcamcorder->sub_context = NULL;
}
+#ifdef _MMCAMCORDER_MURPHY_SUPPORT
if (hcamcorder->type == MM_CAMCORDER_MODE_VIDEO_CAPTURE) {
/* release resource */
ret = _mmcamcorder_resource_manager_release(&hcamcorder->resource_manager);
_mmcam_dbg_err("failed to unprepare resource manager, ret(0x%x)", ret);
}
}
+#endif /* _MMCAMCORDER_MURPHY_SUPPORT */
/* Deinitialize main context member */
hcamcorder->command = NULL;