Lines Matching refs:res

56     status_t res = OK;
71 res = mCameraModule->getCameraInfo(
73 if (res) {
76 return res;
110 status_t res = OK;
132 res = createFlashlightControl(cameraId);
133 if (res) {
134 return res;
136 res = mFlashControl->setTorchMode(cameraId, enabled);
137 return res;
142 res = mFlashControl->setTorchMode(cameraId, enabled);
143 if (res == BAD_INDEX) {
147 res = createFlashlightControl(cameraId);
148 if (res) {
149 return res;
151 res = mFlashControl->setTorchMode(cameraId, enabled);
154 return res;
159 status_t res;
169 res = createFlashlightControl(id);
170 if (res) {
174 res = mFlashControl->hasFlashUnit(id, &hasFlash);
175 if (res == -EUSERS || res == -EBUSY) {
179 return res;
180 } else if (res) {
182 " (%d)", __FUNCTION__, id.string(), strerror(-res),
183 res);
319 status_t res = mCameraModule->getCameraInfo(atoi(cameraId.string()),
321 if (res != 0) {
322 return res;
382 status_t res;
392 res = mSurfaceTexture->setDefaultBufferSize(width, height);
393 if (res) {
394 return res;
396 res = mSurfaceTexture->setDefaultBufferFormat(format);
397 if (res) {
398 return res;
405 res = device->createStream(mSurface, width, height, format,
407 if (res) {
408 return res;
411 res = device->configureStreams();
412 if (res) {
413 return res;
416 return res;
472 status_t res = mCameraModule->getCameraInfo(atoi(cameraId.string()), &info);
473 if (res != 0) {
476 return res;
485 res = device->initialize(mCameraModule);
486 if (res) {
487 return res;
491 res = getSmallestSurfaceSize(info, &width, &height);
492 if (res) {
493 return res;
495 res = initializeSurface(device, width, height);
496 if (res) {
497 return res;
535 status_t res = mCameraModule->getCameraInfo(
537 if (res != 0) {
540 return res;
555 status_t res;
562 res = mDevice->createDefaultRequest(
564 if (res) {
565 return res;
580 res = mDevice->setStreamingRequest(*mMetadata);
582 res = mDevice->capture(*mMetadata);
584 return res;
595 status_t res = hasFlashUnitLocked(cameraId, &hasFlash);
600 if (res) {
624 res = connectCameraDevice(cameraId);
625 if (res) {
626 return res;
630 res = submitTorchEnabledRequest();
631 if (res) {
632 return res;
679 status_t res;
683 res = hasFlashUnitLocked(cameraId, &hasFlash, /*keepDeviceOpen*/true);
685 if (res) {
688 return res == BAD_INDEX ? BAD_INDEX : -EINVAL;
708 res = startPreviewAndTorch();
709 if (res) {
710 return res;
734 status_t res;
737 res = connectCameraDevice(cameraId);
738 if (res) {
739 return res;
759 res = disconnectCameraDevice();
760 if (res != OK) {
762 strerror(-res), res);
763 return res;
771 status_t res = OK;
772 res = mDevice->startPreview();
773 if (res) {
775 strerror(-res), res);
776 return res;
816 status_t res;
826 res = mSurfaceTexture->setDefaultBufferSize(width, height);
827 if (res) {
828 return res;
830 res = mSurfaceTexture->setDefaultBufferFormat(format);
831 if (res) {
832 return res;
840 res = native_window_api_connect(mSurface.get(), NATIVE_WINDOW_API_CAMERA);
841 if (res) {
843 return res;
854 status_t res = device->initialize(mCameraModule);
855 if (res) {
858 return res;
867 res = getSmallestSurfaceSize(&width, &height);
868 if (res) {
871 return res;
874 res = initializePreviewWindow(device, width, height);
875 if (res) {
878 return res;
899 status_t res = native_window_api_disconnect(mSurface.get(),
901 if (res) {
903 __FUNCTION__, strerror(-res), res);