/****************************************************************************** * Function: usbCamSetParameters * Description: This function parses the parameter string and stores the * parameters in the camera HAL handle * * Input parameters: * camHal - camera HAL handle * params - pointer to parameter string * * Return values: * 0 Success * -1 Error * Notes: none *****************************************************************************/ int usbCamSetParameters(camera_hardware_t *camHal, const char *params) { int rc = 0; String8 str = String8(params); QCameraParameters qParam; ALOGD("%s: E", __func__); if(params) PRINT_PARAM_STR(params); qParam.unflatten(str); if(usbCamSetPrvwSize(camHal, qParam)) rc = -1; if(usbCamSetPictSize(camHal, qParam)) rc = -1; if(usbCamSetThumbnailSize(camHal, qParam)) rc = -1; if(usbCamSetJpegQlty(camHal, qParam)) rc = -1; ALOGD("%s: X", __func__); return rc; } /* usbCamSetParameters */
int set_parameters(struct camera_device * device, const char *parms) { ALOGV("Q%s: E", __func__); int rc = -1; QualcommCameraHardware * hardware = util_get_Hal_obj(device); if(hardware != NULL && parms){ // = util_get_HAL_parameter(device); g_str = String8(parms); g_param.unflatten(g_str); rc = hardware->setParameters( g_param ); } return rc; }