author | sky.zhou <sky.zhou@amlogic.com> | 2012-03-21 06:55:32 (GMT) |
---|---|---|
committer | sky.zhou <sky.zhou@amlogic.com> | 2012-03-21 06:55:32 (GMT) |
commit | 7a03e324b77cb8548b06b0d1b0ca29d19a03c6a2 (patch) | |
tree | dc6d911896cfec7e31cf0132de57f9ee52823f8a | |
parent | 2194a4c8f2bf210f6042d3646fb50372175922e5 (diff) | |
download | camera-7a03e324b77cb8548b06b0d1b0ca29d19a03c6a2.zip camera-7a03e324b77cb8548b06b0d1b0ca29d19a03c6a2.tar.gz camera-7a03e324b77cb8548b06b0d1b0ca29d19a03c6a2.tar.bz2 |
add a macro for video snapshot, default is disabled
-rwxr-xr-x | Android.mk | 6 | ||||
-rwxr-xr-x | V4LCameraAdapter/V4LCameraAdapter.cpp | 7 |
2 files changed, 11 insertions, 2 deletions
@@ -82,6 +82,12 @@ else endif endif +ifeq ($(BOARD_ENABLE_VIDEO_SNAPSHOT),true) + LOCAL_CFLAGS += -DAMLOGIC_ENABLE_VIDEO_SNAPSHOT +endif + + + LOCAL_MODULE_PATH := $(TARGET_OUT_SHARED_LIBRARIES)/hw LOCAL_MODULE:= camera.amlogic LOCAL_MODULE_TAGS:= optional diff --git a/V4LCameraAdapter/V4LCameraAdapter.cpp b/V4LCameraAdapter/V4LCameraAdapter.cpp index 0d9eca5..b2e186f 100755 --- a/V4LCameraAdapter/V4LCameraAdapter.cpp +++ b/V4LCameraAdapter/V4LCameraAdapter.cpp @@ -1435,7 +1435,6 @@ extern "C" void loadCaps(int camera_id, CameraProperties::Properties* params) { const char DEFAULT_MAX_NUM_METERING_AREAS[] = "0"; const char DEFAULT_LOCK_SUPPORTED[] = "true"; const char DEFAULT_LOCK_UNSUPPORTED[] = "false"; - const char DEFAULT_VIDEO_SNAPSHOT_SUPPORTED[] = "true"; const char DEFAULT_VIDEO_SIZE[] = "640x480"; const char DEFAULT_PREFERRED_PREVIEW_SIZE_FOR_VIDEO[] = "640x480"; @@ -1701,7 +1700,11 @@ extern "C" void loadCaps(int camera_id, CameraProperties::Properties* params) { params->set(CameraProperties::MAX_FD_SW_FACES, DEFAULT_MAX_FD_SW_FACES); params->set(CameraProperties::REQUIRED_PREVIEW_BUFS, DEFAULT_NUM_PREV_BUFS); params->set(CameraProperties::REQUIRED_IMAGE_BUFS, DEFAULT_NUM_PIC_BUFS); - params->set(CameraProperties::VIDEO_SNAPSHOT_SUPPORTED, DEFAULT_VIDEO_SNAPSHOT_SUPPORTED); +#ifdef AMLOGIC_ENABLE_VIDEO_SNAPSHOT + params->set(CameraProperties::VIDEO_SNAPSHOT_SUPPORTED, "true"); +#else + params->set(CameraProperties::VIDEO_SNAPSHOT_SUPPORTED, "false"); +#endif #ifdef AMLOGIC_USB_CAMERA_SUPPORT params->set(CameraProperties::VIDEO_SIZE,params->get(CameraProperties::PREVIEW_SIZE)); params->set(CameraProperties::PREFERRED_PREVIEW_SIZE_FOR_VIDEO,params->get(CameraProperties::PREVIEW_SIZE)); |