Lines Matching refs:camera

34 #include <camera/Camera.h>
74 JNICameraContext(JNIEnv* env, jobject weak_this, jclass clazz, const sp<Camera>& camera);
132 sp<Camera> camera;
136 camera = context->getCamera();
138 ALOGV("get_native_camera: context=%p, camera=%p", context, camera.get());
139 if (camera == 0) {
145 return camera;
148 JNICameraContext::JNICameraContext(JNIEnv* env, jobject weak_this, jclass clazz, const sp<Camera>& camera)
152 mCamera = camera;
204 ALOGW("callback on dead camera object");
310 ALOGW("callback on dead camera object");
358 // This may be called when stagefright just releases camera but there are still outstanding
372 // This may be called when stagefright just releases camera but there are still outstanding
483 // We want to make sure the camera knows we're ready for the
533 ALOGE("%s: Unknown camera ID %d", __FUNCTION__, cameraId);
534 jniThrowRuntimeException(env, "Unknown camera ID");
540 jniThrowRuntimeException(env, "Fail to get camera info");
547 property_get("ro.camera.sound.forced", value, "0");
553 // connect to camera service
565 sp<Camera> camera;
567 // Default path: hal version is don't care, do normal camera connect.
568 camera = Camera::connect(cameraId, clientName,
572 Camera::USE_CALLING_UID, camera);
578 if (camera == NULL) {
582 // make sure camera hardware is alive
583 if (camera->getStatus() != NO_ERROR) {
596 sp<JNICameraContext> context = new JNICameraContext(env, weak_this, clazz, camera);
598 camera->setListener(context);
627 ALOGE("Unexpected camera orientation %d!", cameraInfo.orientation);
632 rc = camera->sendCommand(CAMERA_CMD_SET_DISPLAY_ORIENTATION,
644 // disconnect from camera service
645 // It's okay to call this when the native camera context is already null.
650 ALOGV("release camera");
652 sp<Camera> camera;
663 camera = context->getCamera();
665 ALOGV("native_release: context=%p camera=%p", context, camera.get());
668 if (camera != NULL) {
669 camera->setPreviewCallbackFlags(CAMERA_FRAME_CALLBACK_FLAG_NOOP);
670 camera->disconnect();
681 sp<Camera> camera = get_native_camera(env, thiz, NULL);
682 if (camera == 0) return;
693 if (camera->setPreviewTarget(gbp) != NO_ERROR) {
702 sp<Camera> camera = get_native_camera(env, thiz, NULL);
703 if (camera == 0) return;
716 if (camera->setPreviewTarget(producer) != NO_ERROR) {
727 sp<Camera> camera = get_native_camera(env, thiz, &context);
728 if (camera == 0) return;
741 if (camera->setPreviewCallbackTarget(gbp) != NO_ERROR) {
749 sp<Camera> camera = get_native_camera(env, thiz, NULL);
750 if (camera == 0) return;
752 if (camera->startPreview() != NO_ERROR) {
783 sp<Camera> camera = get_native_camera(env, thiz, &context);
784 if (camera == 0) return;
787 // camera->setPreviewCallbackFlags within a mutex for us.
829 sp<Camera> camera = get_native_camera(env, thiz, &context);
830 if (camera == 0) return;
850 if (camera->takePicture(msgType) != NO_ERROR) {
859 sp<Camera> camera = get_native_camera(env, thiz, NULL);
860 if (camera == 0) return;
869 if (camera->setParameters(params8) != NO_ERROR) {
878 sp<Camera> camera = get_native_camera(env, thiz, NULL);
879 if (camera == 0) return 0;
881 String8 params8 = camera->getParameters();
892 sp<Camera> camera = get_native_camera(env, thiz, NULL);
893 if (camera == 0) return;
895 if (camera->reconnect() != NO_ERROR) {
904 sp<Camera> camera = get_native_camera(env, thiz, NULL);
905 if (camera == 0) return;
907 if (camera->lock() != NO_ERROR) {
915 sp<Camera> camera = get_native_camera(env, thiz, NULL);
916 if (camera == 0) return;
918 if (camera->unlock() != NO_ERROR) {
926 sp<Camera> camera = get_native_camera(env, thiz, NULL);
927 if (camera == 0) return;
929 status_t rc = camera->sendCommand(CAMERA_CMD_START_SMOOTH_ZOOM, value, 0);
942 sp<Camera> camera = get_native_camera(env, thiz, NULL);
943 if (camera == 0) return;
945 if (camera->sendCommand(CAMERA_CMD_STOP_SMOOTH_ZOOM, 0, 0) != NO_ERROR) {
954 sp<Camera> camera = get_native_camera(env, thiz, NULL);
955 if (camera == 0) return;
957 if (camera->sendCommand(CAMERA_CMD_SET_DISPLAY_ORIENTATION, value, 0) != NO_ERROR) {
966 sp<Camera> camera = get_native_camera(env, thiz, NULL);
967 if (camera == 0) return JNI_FALSE;
970 status_t rc = camera->sendCommand(CAMERA_CMD_ENABLE_SHUTTER_SOUND, value, 0);
986 sp<Camera> camera = get_native_camera(env, thiz, &context);
987 if (camera == 0) return;
989 status_t rc = camera->sendCommand(CAMERA_CMD_START_FACE_DETECTION, type, 0);
1002 sp<Camera> camera = get_native_camera(env, thiz, NULL);
1003 if (camera == 0) return;
1005 if (camera->sendCommand(CAMERA_CMD_STOP_FACE_DETECTION, 0, 0) != NO_ERROR) {
1013 sp<Camera> camera = get_native_camera(env, thiz, NULL);
1014 if (camera == 0) return;
1016 if (camera->sendCommand(CAMERA_CMD_ENABLE_FOCUS_MOVE_MSG, enable, 0) != NO_ERROR) {