diff options
-rw-r--r-- | configure.ac | 4 | ||||
-rw-r--r-- | packaging/libmm-camcorder.spec | 3 | ||||
-rw-r--r-- | src/Makefile.am | 2 | ||||
-rw-r--r-- | src/mm_camcorder_internal.c | 10 |
4 files changed, 18 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac index 0746944..fcba8ee 100644 --- a/configure.ac +++ b/configure.ac @@ -89,6 +89,10 @@ PKG_CHECK_MODULES(VCONF, vconf) AC_SUBST(VCONF_CFLAGS) AC_SUBST(VCONF_LIBS) +PKG_CHECK_MODULES(PMAPI, pmapi) +AC_SUBST(PMAPI_CFLAGS) +AC_SUBST(PMAPI_LIBS) + # Checks for header files. AC_HEADER_STDC AC_CHECK_HEADERS([fcntl.h memory.h stdlib.h string.h sys/time.h unistd.h]) diff --git a/packaging/libmm-camcorder.spec b/packaging/libmm-camcorder.spec index 5b17098..bd1eb48 100644 --- a/packaging/libmm-camcorder.spec +++ b/packaging/libmm-camcorder.spec @@ -1,7 +1,7 @@ Name: libmm-camcorder Summary: Camera and recorder library Version: 0.6.13 -Release: 0 +Release: 1 Group: libs License: Apache-2.0 Source0: %{name}-%{version}.tar.gz @@ -22,6 +22,7 @@ BuildRequires: pkgconfig(audio-session-mgr) BuildRequires: pkgconfig(camsrcjpegenc) BuildRequires: pkgconfig(libpulse) BuildRequires: pkgconfig(vconf) +BuildRequires: pkgconfig(pmapi) BuildRequires: gst-plugins-base-devel %description diff --git a/src/Makefile.am b/src/Makefile.am index 6631a03..abcaccb 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -45,6 +45,7 @@ libmmfcamcorder_la_CFLAGS = -I$(srcdir)/include \ $(SNDFILE_CFLAGS) \ $(CAMSRCJPEGENC_CFLAGS) \ $(VCONF_CFLAGS) \ + $(PMAPI_CFLAGS) \ $(AUDIOSESSIONMGR_CFLAGS) libmmfcamcorder_la_LIBADD = \ @@ -60,6 +61,7 @@ libmmfcamcorder_la_LIBADD = \ $(SNDFILE_LIBS) \ $(CAMSRCJPEGENC_LIBS) \ $(VCONF_LIBS) \ + $(PMAPI_LIBS) \ $(AUDIOSESSIONMGR_LIBS) libmmfcamcorder_la_CFLAGS += $(MMLOGSVR_CFLAGS) -DMMF_LOG_OWNER=0x010 -DMMF_DEBUG_PREFIX=\"MMF-CAMCORDER\" -D_INTERNAL_SESSION_MANAGER_ diff --git a/src/mm_camcorder_internal.c b/src/mm_camcorder_internal.c index 6300f8b..1cf1f61 100644 --- a/src/mm_camcorder_internal.c +++ b/src/mm_camcorder_internal.c @@ -40,6 +40,8 @@ #include <mm_session_private.h> #include <audio-session-manager.h> +#include <pmapi.h> + /*--------------------------------------------------------------------------------------- | GLOBAL VARIABLE DEFINITIONS for internal | ---------------------------------------------------------------------------------------*/ @@ -626,6 +628,10 @@ int _mmcamcorder_realize(MMHandleType handle) _mmcam_dbg_log("VCONFKEY_CAMERA_STATE prev %d -> cur %d", vconf_camera_state, VCONFKEY_CAMERA_STATE_OPEN); + + /* LOCK PM control */ + pm_lock_state(LCD_NORMAL, GOTO_STATE_NOW | HOLD_KEY_BLOCK, 0); + _mmcam_dbg_log("LOCK PM State"); } /* Set async state */ @@ -894,6 +900,10 @@ int _mmcamcorder_unrealize(MMHandleType handle) _mmcam_dbg_log("VCONFKEY_CAMERA_STATE prev %d -> cur %d", vconf_camera_state, VCONFKEY_CAMERA_STATE_NULL); + + /* UNLOCK PM State */ + pm_unlock_state(LCD_NORMAL, PM_RESET_TIMER); + _mmcam_dbg_log("UNLOCK PM State"); } _MMCAMCORDER_UNLOCK_CMD(hcamcorder); |