Merge commit 'goog/master' into merge_master
This commit is contained in:
		@@ -123,6 +123,7 @@ static preview_size_type preview_sizes[] = {
 | 
			
		||||
    { 800, 480 }, // WVGA
 | 
			
		||||
    { 640, 480 }, // VGA
 | 
			
		||||
    { 480, 320 }, // HVGA
 | 
			
		||||
    { 384, 288 },
 | 
			
		||||
    { 352, 288 }, // CIF
 | 
			
		||||
    { 320, 240 }, // QVGA
 | 
			
		||||
    { 240, 160 }, // SQVGA
 | 
			
		||||
@@ -677,7 +678,7 @@ void QualcommCameraHardware::runFrameThread(void *data)
 | 
			
		||||
    // lifetime of this object.  We do not want to dlclose() libqcamera while
 | 
			
		||||
    // LINK_cam_frame is still running.
 | 
			
		||||
    void *libhandle = ::dlopen("libqcamera.so", RTLD_NOW);
 | 
			
		||||
    LOGV("loading libqcamera at %p", libhandle);
 | 
			
		||||
    LOGV("FRAME: loading libqcamera at %p", libhandle);
 | 
			
		||||
    if (!libhandle) {
 | 
			
		||||
        LOGE("FATAL ERROR: could not dlopen libqcamera.so: %s", dlerror());
 | 
			
		||||
    }
 | 
			
		||||
@@ -1096,6 +1097,23 @@ void QualcommCameraHardware::runAutoFocus()
 | 
			
		||||
        return;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
#if DLOPEN_LIBMMCAMERA
 | 
			
		||||
    // We need to maintain a reference to libqcamera.so for the duration of the
 | 
			
		||||
    // AF thread, because we do not know when it will exit relative to the
 | 
			
		||||
    // lifetime of this object.  We do not want to dlclose() libqcamera while
 | 
			
		||||
    // LINK_cam_frame is still running.
 | 
			
		||||
    void *libhandle = ::dlopen("libqcamera.so", RTLD_NOW);
 | 
			
		||||
    LOGV("AF: loading libqcamera at %p", libhandle);
 | 
			
		||||
    if (!libhandle) {
 | 
			
		||||
        LOGE("FATAL ERROR: could not dlopen libqcamera.so: %s", dlerror());
 | 
			
		||||
        close(mAutoFocusFd);
 | 
			
		||||
        mAutoFocusFd = -1;
 | 
			
		||||
        mAutoFocusThreadRunning = false;
 | 
			
		||||
        mAutoFocusThreadLock.unlock();
 | 
			
		||||
        return;
 | 
			
		||||
    }
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
    /* This will block until either AF completes or is cancelled. */
 | 
			
		||||
    LOGV("af start (fd %d)", mAutoFocusFd);
 | 
			
		||||
    bool status = native_set_afmode(mAutoFocusFd, AF_MODE_AUTO);
 | 
			
		||||
@@ -1116,6 +1134,13 @@ void QualcommCameraHardware::runAutoFocus()
 | 
			
		||||
    mAutoFocusCallback = NULL;
 | 
			
		||||
    mAutoFocusCallbackCookie = NULL;
 | 
			
		||||
    mCallbackLock.unlock();
 | 
			
		||||
 | 
			
		||||
#if DLOPEN_LIBMMCAMERA
 | 
			
		||||
    if (libhandle) {
 | 
			
		||||
        ::dlclose(libhandle);
 | 
			
		||||
        LOGV("AF: dlclose(libqcamera)");
 | 
			
		||||
    }
 | 
			
		||||
#endif
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void QualcommCameraHardware::cancelAutoFocus()
 | 
			
		||||
 
 | 
			
		||||
@@ -16,6 +16,8 @@
 | 
			
		||||
LOCAL_PATH:= $(call my-dir)
 | 
			
		||||
# HAL module implemenation, not prelinked and stored in
 | 
			
		||||
# hw/<COPYPIX_HARDWARE_MODULE_ID>.<ro.board.platform>.so
 | 
			
		||||
 | 
			
		||||
ifeq ($(TARGET_BOARD_PLATFORM),msm7k)
 | 
			
		||||
include $(CLEAR_VARS)
 | 
			
		||||
LOCAL_PRELINK_MODULE := false
 | 
			
		||||
LOCAL_MODULE_PATH := $(TARGET_OUT_SHARED_LIBRARIES)/hw
 | 
			
		||||
@@ -24,3 +26,14 @@ LOCAL_SRC_FILES := copybit.cpp
 | 
			
		||||
LOCAL_MODULE := copybit.msm7k
 | 
			
		||||
LOCAL_C_INCLUDES += hardware/libhardware/modules/gralloc
 | 
			
		||||
include $(BUILD_SHARED_LIBRARY)
 | 
			
		||||
endif
 | 
			
		||||
 | 
			
		||||
ifeq ($(TARGET_BOARD_PLATFORM),qsd8k)
 | 
			
		||||
include $(CLEAR_VARS)
 | 
			
		||||
LOCAL_PRELINK_MODULE := false
 | 
			
		||||
LOCAL_MODULE_PATH := $(TARGET_OUT_SHARED_LIBRARIES)/hw
 | 
			
		||||
LOCAL_SHARED_LIBRARIES := liblog
 | 
			
		||||
LOCAL_SRC_FILES := copybit.c
 | 
			
		||||
LOCAL_MODULE := copybit.qsd8k
 | 
			
		||||
include $(BUILD_SHARED_LIBRARY)
 | 
			
		||||
endif
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user