am 384fc2db: libcamera2: update to match new libqcamera.so
Merge commit '384fc2db5ad3ec835b72dd84240a2552f84e2a52' * commit '384fc2db5ad3ec835b72dd84240a2552f84e2a52': libcamera2: update to match new libqcamera.so
This commit is contained in:
		
				
					committed by
					
						 The Android Open Source Project
						The Android Open Source Project
					
				
			
			
				
	
			
			
			
					commit
					261e53ebec
				
			| @@ -24,7 +24,7 @@ LOCAL_SHARED_LIBRARIES:= libutils libui liblog | ||||
|  | ||||
| LOCAL_SHARED_LIBRARIES+= libbinder | ||||
| ifneq ($(DLOPEN_LIBMMCAMERA),1) | ||||
| LOCAL_SHARED_LIBRARIES+= libmmcamera | ||||
| LOCAL_SHARED_LIBRARIES+= libqcamera | ||||
| else | ||||
| LOCAL_SHARED_LIBRARIES+= libdl | ||||
| endif | ||||
|   | ||||
| @@ -84,7 +84,8 @@ bool  (*LINK_jpeg_encoder_init)(); | ||||
| void  (*LINK_jpeg_encoder_join)(); | ||||
| bool  (*LINK_jpeg_encoder_encode)(const cam_ctrl_dimension_t *dimen, | ||||
|                                   const uint8_t *thumbnailbuf, int thumbnailfd, | ||||
|                                   const uint8_t *snapshotbuf, int snapshotfd); | ||||
|                                   const uint8_t *snapshotbuf, int snapshotfd, | ||||
|                                   common_crop_t *scaling_parms); | ||||
| int  (*LINK_camframe_terminate)(void); | ||||
| int8_t (*LINK_jpeg_encoder_setMainImageQuality)(uint32_t quality); | ||||
| int8_t (*LINK_jpeg_encoder_setThumbnailQuality)(uint32_t quality); | ||||
| @@ -802,9 +803,11 @@ bool QualcommCameraHardware::native_jpeg_encode ( | ||||
|         } | ||||
|     } | ||||
|  | ||||
|     static common_crop_t scale; // no scaling | ||||
|     if (!LINK_jpeg_encoder_encode(&mDimension, | ||||
|                                   thumbnail_buf, thumb_fd, | ||||
|                                   main_img_buf, snap_fd)) { | ||||
|                                   main_img_buf, snap_fd, | ||||
|                                   &scale)) { | ||||
|         LOGE("native_jpeg_encode: jpeg_encoder_encode failed."); | ||||
|         return false; | ||||
|     } | ||||
| @@ -1089,10 +1092,14 @@ void QualcommCameraHardware::release() | ||||
|     LOGV("release E"); | ||||
|     Mutex::Autolock l(&mLock); | ||||
|  | ||||
| #if DLOPEN_LIBMMCAMERA | ||||
|     if (libmmcamera == NULL) { | ||||
|         LOGE("ERROR: multiple release!"); | ||||
|         return; | ||||
|     } | ||||
| #else | ||||
| #warning "Cannot detect multiple release when not dlopen()ing libqcamera!" | ||||
| #endif | ||||
|  | ||||
|     int cnt, rc; | ||||
|     struct msm_ctrl_cmd ctrlCmd; | ||||
|   | ||||
		Reference in New Issue
	
	Block a user