Esempio n. 1
0
    void addToCaptureRequest(
        CameraCharacteristics cc, boolean isFacingFront, CaptureRequest.Builder captureBuilder) {
      for (CameraPlugin plugin : getPlugins()) {
        CameraTwoConfigurator configurator = plugin.buildConfigurator(CameraTwoConfigurator.class);

        if (configurator != null) {
          configurator.addToCaptureRequest(cc, isFacingFront, captureBuilder);
        }
      }
    }
Esempio n. 2
0
    ImageReader buildImageReader() {
      ImageReader result = null;

      for (CameraPlugin plugin : getPlugins()) {
        CameraTwoConfigurator configurator = plugin.buildConfigurator(CameraTwoConfigurator.class);

        if (configurator != null) {
          result = configurator.buildImageReader();
        }

        if (result != null) break;
      }

      return (result);
    }
    Camera.Parameters configure() {
      final Descriptor descriptor = (Descriptor) getDescriptor();
      final Camera camera = descriptor.getCamera();
      Camera.Parameters params = camera.getParameters();
      Camera.CameraInfo info = new Camera.CameraInfo();

      Camera.getCameraInfo(descriptor.getCameraId(), info);

      for (CameraPlugin plugin : getPlugins()) {
        ClassicCameraConfigurator configurator =
            plugin.buildConfigurator(ClassicCameraConfigurator.class);

        if (configurator != null) {
          params = configurator.configure(info, camera, params);
        }
      }

      return (params);
    }