Lines Matching refs:rc
123 int rc = NO_ERROR;
133 rc = hw->processAPI(QCAMERA_SM_EVT_SET_PREVIEW_WINDOW, (void *)window);
134 if (rc == NO_ERROR) {
136 rc = apiResult.status;
140 return rc;
181 int32_t rc = hw->processAPI(QCAMERA_SM_EVT_SET_CALLBACKS, (void *)&payload);
182 if (rc == NO_ERROR) {
209 int32_t rc = hw->processAPI(QCAMERA_SM_EVT_ENABLE_MSG_TYPE, (void *)msg_type);
210 if (rc == NO_ERROR) {
237 int32_t rc = hw->processAPI(QCAMERA_SM_EVT_DISABLE_MSG_TYPE, (void *)msg_type);
238 if (rc == NO_ERROR) {
798 int32_t rc = hw->processAPI(QCAMERA_SM_EVT_GET_PARAMS, NULL);
799 if (rc == NO_ERROR) {
1129 int rc = NO_ERROR;
1136 rc = openCamera();
1137 if (rc == NO_ERROR){
1145 return rc;
1196 int32_t rc = m_postprocessor.init(jpegEvtHandle, this);
1197 if (rc != 0) {
1237 int rc = NO_ERROR;
1283 rc = mCameraHandle->ops->close_camera(mCameraHandle->camera_handle);
1286 return rc;
1305 int rc = NO_ERROR;
1310 rc = capabilityHeap->allocate(1, sizeof(cam_capability_t), NON_SECURE);
1311 if(rc != OK) {
1318 rc = cameraHandle->ops->map_buf(cameraHandle->camera_handle,
1322 if(rc < 0) {
1328 rc = cameraHandle->ops->query_capability(cameraHandle->camera_handle);
1329 if(rc < 0) {
1341 rc = NO_ERROR;
1350 return rc;
1369 int rc = NO_ERROR;
1377 return rc;
1394 int rc = NO_ERROR;
1399 rc = addChannel(QCAMERA_CH_TYPE_PREVIEW);
1402 return rc;
1622 int rc = NO_ERROR;
1707 rc = mem->allocate(bufferCnt, size, SECURE);
1709 rc = mem->allocate(bufferCnt, size, NON_SECURE);
1711 if (rc < 0) {
1739 int rc = NO_ERROR;
1742 rc = mem_obj->allocateMore(bufferCnt, size);
1745 return rc;
1762 int rc = NO_ERROR;
1773 rc = streamInfoBuf->allocate(1, sizeof(cam_stream_info_t), NON_SECURE);
1774 if (rc < 0) {
1783 rc = mParameters.getStreamFormat(stream_type, streamInfo->fmt);
1784 rc = mParameters.getStreamDimension(stream_type, streamInfo->dim);
1785 rc = mParameters.getStreamRotation(stream_type, streamInfo->pp_config, streamInfo->dim);
2023 int32_t rc = NO_ERROR;
2027 rc = startChannel(QCAMERA_CH_TYPE_ZSL);
2029 rc = startChannel(QCAMERA_CH_TYPE_PREVIEW);
2032 return rc;
2093 int32_t rc = NO_ERROR;
2101 rc = preparePreview();
2102 if (rc == NO_ERROR) {
2103 rc = startChannel(QCAMERA_CH_TYPE_PREVIEW);
2107 if (rc == NO_ERROR) {
2108 rc = startChannel(QCAMERA_CH_TYPE_VIDEO);
2112 if (rc == NO_ERROR) {
2121 return rc;
2137 int rc = stopChannel(QCAMERA_CH_TYPE_VIDEO);
2147 return rc;
2164 int32_t rc = UNKNOWN_ERROR;
2169 rc = pChannel->releaseFrame(opaque, mStoreMetaDataInFrame > 0);
2171 return rc;
2187 int rc = NO_ERROR;
2195 rc = mCameraHandle->ops->do_auto_focus(mCameraHandle->camera_handle);
2202 rc = sendEvtNotify(CAMERA_MSG_FOCUS, true, 0);
2205 return rc;
2221 int rc = NO_ERROR;
2229 rc = mCameraHandle->ops->cancel_auto_focus(mCameraHandle->camera_handle);
2239 return rc;
2319 int32_t rc = NO_ERROR;
2324 rc = configureAFBracketing();
2326 rc = configureOptiZoom();
2328 rc = configureFlashBracketing();
2330 rc = configureHDRBracketing();
2332 rc = configureAEBracketing();
2335 rc = BAD_VALUE;
2338 return rc;
2355 int32_t rc = NO_ERROR;
2371 rc = mParameters.commitAFBracket(afBracket);
2372 if ( NO_ERROR != rc ) {
2374 return rc;
2381 return rc;
2398 int32_t rc = NO_ERROR;
2406 rc = mParameters.commitFlashBracket(flashBracket);
2407 if ( NO_ERROR != rc ) {
2411 return rc;
2428 int32_t rc = NO_ERROR;
2465 rc = mParameters.setHDRAEBracket(aeBracket);
2466 if ( NO_ERROR != rc ) {
2468 return rc;
2471 return rc;
2488 int32_t rc = NO_ERROR;
2490 rc = mParameters.setAEBracketing();
2491 if ( NO_ERROR != rc ) {
2493 return rc;
2496 return rc;
2512 int32_t rc = NO_ERROR;
2523 return rc;
2542 int32_t rc = NO_ERROR;
2545 rc = pChannel->startAdvancedCapture(MM_CAMERA_AF_BRACKETING);
2547 rc = pChannel->startAdvancedCapture(MM_CAMERA_FLASH_BRACKETING);
2549 rc = pChannel->startAdvancedCapture(MM_CAMERA_AE_BRACKETING);
2551 rc = pChannel->startAdvancedCapture(MM_CAMERA_ZOOM_1X);
2554 rc = BAD_VALUE;
2556 return rc;
2572 int rc = NO_ERROR;
2590 rc = configureAdvancedCapture();
2591 if (rc == NO_ERROR) {
2604 rc = m_postprocessor.start(pZSLChannel);
2605 if (rc != NO_ERROR) {
2607 return rc;
2614 rc = startAdvancedCapture(pZSLChannel);
2615 if (rc != NO_ERROR) {
2617 return rc;
2625 rc = pZSLChannel->takePicture(numSnapshots, numRetroSnapshots);
2626 if (rc != NO_ERROR) {
2629 return rc;
2644 rc = addCaptureChannel();
2650 rc = declareSnapshotStreams();
2651 if (NO_ERROR != rc) {
2653 return rc;
2675 rc = UNKNOWN_ERROR;
2685 rc = declareSnapshotStreams();
2686 if (NO_ERROR != rc) {
2687 return rc;
2690 rc = addCaptureChannel();
2693 if ((rc == NO_ERROR) &&
2697 rc = m_channels[QCAMERA_CH_TYPE_CAPTURE]->config();
2698 if (rc != NO_ERROR) {
2701 return rc;
2712 rc = m_channels[QCAMERA_CH_TYPE_CAPTURE]->start();
2713 if (rc != NO_ERROR) {
2716 return rc;
2724 rc = startAdvancedCapture(pCapChannel);
2725 if (rc != NO_ERROR) {
2727 return rc;
2732 rc = longShot();
2733 if (NO_ERROR != rc) {
2735 return rc;
2740 return rc;
2747 rc = addRawChannel();
2748 if (rc == NO_ERROR) {
2750 rc = m_postprocessor.start(m_channels[QCAMERA_CH_TYPE_RAW]);
2751 if (rc != NO_ERROR) {
2754 return rc;
2757 rc = startChannel(QCAMERA_CH_TYPE_RAW);
2758 if (rc != NO_ERROR) {
2762 return rc;
2766 return rc;
2771 return rc;
2787 int rc = NO_ERROR;
2791 rc = mParameters.setStreamConfigure(true, mLongshotEnabled);
2792 if (rc != NO_ERROR) {
2793 ALOGE("%s: setStreamConfigure failed %d", __func__, rc);
2795 return rc;
2799 return rc;
2816 int32_t rc = NO_ERROR;
2827 rc = pChannel->takePicture(numSnapshots, 0);
2830 rc = NO_INIT;
2835 return rc;
2959 int rc = NO_ERROR;
2960 rc= pthread_create(&mLiveSnapshotThread, NULL, Live_Snapshot_thread, (void *) this);
2961 return rc;
2977 int rc;
2982 rc = m_postprocessor.start(m_channels[QCAMERA_CH_TYPE_SNAPSHOT]);
2985 if (rc == NO_ERROR) {
2986 rc = startChannel(QCAMERA_CH_TYPE_SNAPSHOT);
2989 if (rc != NO_ERROR) {
2990 rc = processAPI(QCAMERA_SM_EVT_CANCEL_PICTURE, NULL);
2991 rc = sendEvtNotify(CAMERA_MSG_ERROR, UNKNOWN_ERROR, 0);
2993 return rc;
3009 int rc = NO_ERROR;
3020 rc = stopChannel(QCAMERA_CH_TYPE_SNAPSHOT);
3022 return rc;
3110 int rc = NO_ERROR;
3122 rc = NO_INIT;
3141 rc = setHistogram(command == CAMERA_CMD_HISTOGRAM_ON? true : false);
3147 rc = setFaceDetection(command == CAMERA_CMD_START_FACE_DETECTION? true : false);
3153 rc = NO_ERROR;
3156 return rc;
3177 int rc = NO_ERROR;
3192 rc = imgBuf->allocate(1, config->input_buf_planes.plane_info.frame_len, NON_SECURE);
3193 if (rc < 0) {
3221 rc = pChannel->start();
3222 if (rc != NO_ERROR) {
3227 return rc;
3230 rc = pChannel->doReprocess(imgBuf->getFd(0), imgBuf->getSize(0), faceID);
3240 return rc;
3341 int rc = NO_ERROR;
3344 rc = processEvt(evt, evt_payload);
3345 if (rc == NO_ERROR) {
3350 rc = m_evtResult.status;
3354 return rc;
3592 int rc = NO_ERROR;
3640 rc = m_cbNotifier.notifyCallback(cbArg);
3641 if (rc != NO_ERROR) {
3653 return rc;
3735 int32_t rc = m_cbNotifier.notifyCallback(cbArg);
3736 if (rc != NO_ERROR) {
3888 int32_t rc = NO_ERROR;
3931 rc = mParameters.updateRAW(max_dim);
3932 return rc;
3954 int32_t rc = NO_ERROR;
3977 rc = pChannel->addStream(*this,
3986 if ( !rc ) {
4001 rc = UNKNOWN_ERROR;
4008 rc = UNKNOWN_ERROR;
4015 rc = UNKNOWN_ERROR;
4020 rc = pChannel->addStream(*this,
4029 if (rc != NO_ERROR) {
4031 __func__, streamType, rc);
4034 return rc;
4037 return rc;
4053 int32_t rc = NO_ERROR;
4072 rc = pChannel->init(NULL, NULL, NULL);
4073 if (rc != NO_ERROR) {
4074 ALOGE("%s: init preview channel failed, ret = %d", __func__, rc);
4076 return rc;
4080 rc = addStreamToChannel(pChannel, CAM_STREAM_TYPE_METADATA,
4082 if (rc != NO_ERROR) {
4083 ALOGE("%s: add metadata stream failed, ret = %d", __func__, rc);
4085 return rc;
4090 rc = addStreamToChannel(pChannel, CAM_STREAM_TYPE_RAW,
4094 rc = addStreamToChannel(pChannel, CAM_STREAM_TYPE_PREVIEW,
4097 rc = addStreamToChannel(pChannel, CAM_STREAM_TYPE_PREVIEW,
4101 if (rc != NO_ERROR) {
4102 ALOGE("%s: add preview stream failed, ret = %d", __func__, rc);
4104 return rc;
4108 return rc;
4124 int32_t rc = NO_ERROR;
4141 rc = pChannel->init(NULL, NULL, NULL);
4142 if (rc != 0) {
4143 ALOGE("%s: init video channel failed, ret = %d", __func__, rc);
4145 return rc;
4148 rc = addStreamToChannel(pChannel, CAM_STREAM_TYPE_VIDEO,
4150 if (rc != NO_ERROR) {
4151 ALOGE("%s: add video stream failed, ret = %d", __func__, rc);
4153 return rc;
4157 return rc;
4175 int32_t rc = NO_ERROR;
4191 rc = pChannel->init(NULL, NULL, NULL);
4192 if (rc != NO_ERROR) {
4193 ALOGE("%s: init snapshot channel failed, ret = %d", __func__, rc);
4195 return rc;
4198 rc = addStreamToChannel(pChannel, CAM_STREAM_TYPE_SNAPSHOT,
4200 if (rc != NO_ERROR) {
4201 ALOGE("%s: add snapshot stream failed, ret = %d", __func__, rc);
4203 return rc;
4207 return rc;
4223 int32_t rc = NO_ERROR;
4239 rc = pChannel->init(NULL, NULL, NULL);
4240 if (rc != NO_ERROR) {
4241 ALOGE("%s: init raw channel failed, ret = %d", __func__, rc);
4243 return rc;
4247 rc = addStreamToChannel(pChannel, CAM_STREAM_TYPE_METADATA,
4249 if (rc != NO_ERROR) {
4250 ALOGE("%s: add metadata stream failed, ret = %d", __func__, rc);
4252 return rc;
4256 rc = addStreamToChannel(pChannel, CAM_STREAM_TYPE_RAW,
4258 if (rc != NO_ERROR) {
4259 ALOGE("%s: add snapshot stream failed, ret = %d", __func__, rc);
4261 return rc;
4265 return rc;
4282 int32_t rc = NO_ERROR;
4317 rc = pChannel->init(&attr,
4320 if (rc != 0) {
4321 ALOGE("%s: init ZSL channel failed, ret = %d", __func__, rc);
4323 return rc;
4327 rc = addStreamToChannel(pChannel, CAM_STREAM_TYPE_METADATA,
4329 if (rc != NO_ERROR) {
4330 ALOGE("%s: add metadata stream failed, ret = %d", __func__, rc);
4332 return rc;
4336 rc = addStreamToChannel(pChannel, CAM_STREAM_TYPE_PREVIEW,
4339 rc = addStreamToChannel(pChannel, CAM_STREAM_TYPE_PREVIEW,
4342 if (rc != NO_ERROR) {
4343 rc);
4345 return rc;
4348 rc = addStreamToChannel(pChannel, CAM_STREAM_TYPE_SNAPSHOT,
4350 if (rc != NO_ERROR) {
4351 ALOGE("%s: add snapshot stream failed, ret = %d", __func__, rc);
4353 return rc;
4359 rc = addStreamToChannel(pChannel,
4363 if (rc != NO_ERROR) {
4364 ALOGE("%s: add raw stream failed, ret = %d", __func__, rc);
4366 return rc;
4371 return rc;
4390 int32_t rc = NO_ERROR;
4419 rc = pChannel->init(&attr,
4422 if (rc != NO_ERROR) {
4423 ALOGE("%s: init capture channel failed, ret = %d", __func__, rc);
4425 return rc;
4429 rc = addStreamToChannel(pChannel, CAM_STREAM_TYPE_METADATA,
4431 if (rc != NO_ERROR) {
4432 ALOGE("%s: add metadata stream failed, ret = %d", __func__, rc);
4434 return rc;
4438 rc = addStreamToChannel(pChannel, CAM_STREAM_TYPE_POSTVIEW,
4441 if (rc != NO_ERROR) {
4442 ALOGE("%s: add postview stream failed, ret = %d", __func__, rc);
4444 return rc;
4447 rc = addStreamToChannel(pChannel, CAM_STREAM_TYPE_PREVIEW,
4450 if (rc != NO_ERROR) {
4451 ALOGE("%s: add preview stream failed, ret = %d", __func__, rc);
4453 return rc;
4457 rc = addStreamToChannel(pChannel, CAM_STREAM_TYPE_SNAPSHOT,
4459 if (rc != NO_ERROR) {
4460 ALOGE("%s: add snapshot stream failed, ret = %d", __func__, rc);
4462 return rc;
4468 rc = addStreamToChannel(pChannel,
4472 if (rc != NO_ERROR) {
4473 ALOGE("%s: add raw stream failed, ret = %d", __func__, rc);
4475 return rc;
4480 return rc;
4496 int32_t rc = NO_ERROR;
4511 rc = pChannel->init(NULL,
4514 if (rc != NO_ERROR) {
4515 ALOGE("%s: init metadata channel failed, ret = %d", __func__, rc);
4517 return rc;
4520 rc = addStreamToChannel(pChannel, CAM_STREAM_TYPE_METADATA,
4522 if (rc != NO_ERROR) {
4523 ALOGE("%s: add metadata stream failed, ret = %d", __func__, rc);
4525 return rc;
4529 return rc;
4546 int32_t rc = NO_ERROR;
4567 rc = pChannel->init(&attr,
4570 if (rc != NO_ERROR) {
4571 ALOGE("%s: init reprocess channel failed, ret = %d", __func__, rc);
4684 rc = pChannel->addReprocStreamsFromSource(*this,
4693 if (rc != NO_ERROR) {
4721 int32_t rc = NO_ERROR;
4731 rc = pChannel->init(NULL, NULL, NULL);
4732 if (rc != NO_ERROR) {
4733 ALOGE("%s: init reprocess channel failed, ret = %d", __func__, rc);
4758 rc = pChannel->addStream(*this,
4763 if (rc != NO_ERROR) {
4764 ALOGE("%s: add reprocess stream failed, ret = %d", __func__, rc);
4788 int32_t rc = UNKNOWN_ERROR;
4791 rc
4794 rc = addCaptureChannel();
4797 rc = addPreviewChannel();
4800 rc = addVideoChannel();
4803 rc = addSnapshotChannel();
4806 rc = addRawChannel();
4809 rc = addMetaDataChannel();
4814 return rc;
4859 int32_t rc = UNKNOWN_ERROR;
4861 rc = m_channels[ch_type]->config();
4862 if (NO_ERROR == rc) {
4863 rc = m_channels[ch_type]->start();
4867 return rc;
4884 int32_t rc = UNKNOWN_ERROR;
4886 rc = m_channels[ch_type]->stop();
4889 return rc;
4905 int32_t rc = NO_ERROR;
4908 rc = mParameters.setStreamConfigure(false, false);
4909 if (rc != NO_ERROR) {
4910 ALOGE("%s: setStreamConfigure failed %d", __func__, rc);
4912 return rc;
4917 rc = addChannel(QCAMERA_CH_TYPE_ZSL);
4918 if (rc != NO_ERROR) {
4919 ALOGE("%s[%d]: failed!! rc = %d", __func__, __LINE__, rc);
4920 return rc;
4926 rc = addChannel(QCAMERA_CH_TYPE_SNAPSHOT);
4927 if (rc != NO_ERROR) {
4928 return rc;
4931 rc = addChannel(QCAMERA_CH_TYPE_VIDEO);
4932 if (rc != NO_ERROR) {
4934 ALOGE("%s[%d]:failed!! rc = %d", __func__, __LINE__, rc);
4935 return rc;
4939 rc = addChannel(QCAMERA_CH_TYPE_PREVIEW);
4940 if (!isRdiMode() && (rc != NO_ERROR)) {
4945 ALOGE("%s[%d]:failed!! rc = %d", __func__, __LINE__, rc);
4946 return rc;
4954 return rc;
5114 int32_t rc = m_cbNotifier.notifyCallback(cbArg);
5115 if (rc != NO_ERROR) {
5119 return rc;
5209 int32_t rc = m_cbNotifier.notifyCallback(cbArg);
5210 if (rc != NO_ERROR) {
5215 return rc;
5316 int32_t rc = m_cbNotifier.notifyCallback(cbArg);
5317 if (rc != NO_ERROR) {
5547 int rc = NO_ERROR;
5551 rc = mParameters.updateParameters(param, needRestart);
5561 return rc;
5579 int rc = NO_ERROR;
5581 rc = mParameters.commitParameters();
5582 if (rc == NO_ERROR) {
5584 rc = mParameters.setNumOfSnapshot();
5587 return rc;
5911 int32_t rc = NO_ERROR;
5920 rc = mParameters.getExifDateTime(dateTime, count);
5921 if(rc == NO_ERROR) {
5931 rc = mParameters.getExifFocalLength(&focalLength);
5932 if (rc == NO_ERROR) {
5949 rc = mParameters.getExifGpsProcessingMethod(gpsProcessingMethod, count);
5950 if(rc == NO_ERROR) {
5961 rc = mParameters.getExifLatitude(latitude, latRef);
5962 if(rc == NO_ERROR) {
5977 rc = mParameters.getExifLongitude(longitude, lonRef);
5978 if(rc == NO_ERROR) {
5994 rc = mParameters.getExifAltitude(&altitude, &altRef);
5995 if(rc == NO_ERROR) {
6011 rc = mParameters.getExifGpsDateTimeStamp(gpsDateStamp, 20, gpsTimeStamp);
6012 if(rc == NO_ERROR) {