diff --git a/camera.cpp b/camera.cpp index 93c27e6..00d7092 100644 --- a/camera.cpp +++ b/camera.cpp @@ -145,11 +145,6 @@ bool camera_create(const parameters_t *params, camera_frame_cb frame_cb, camera_ // We make sure to set the environment variable before libcamera init setenv("LIBCAMERA_RPI_TUNING_FILE", params->tuning_file, 1); - // TODO: move into embedded libcamera - setenv("LIBCAMERA_IPA_CONFIG_PATH", "./ipa_conf", 1); - setenv("LIBCAMERA_IPA_MODULE_PATH", "./ipa_module", 1); - setenv("LIBCAMERA_IPA_PROXY_PATH", "/dev/null", 1); - camp->camera_manager = std::make_unique(); int ret = camp->camera_manager->start(); if (ret != 0) { diff --git a/libcamera.patch b/libcamera.patch index 07de71a..45053d0 100644 --- a/libcamera.patch +++ b/libcamera.patch @@ -11,6 +11,25 @@ index 58bb9893..41fc661f 100644 default_options : [ 'werror=true', 'warning_level=2', +diff --git a/src/ipa/meson.build b/src/ipa/meson.build +index 0ad4631d..101b41ad 100644 +--- a/src/ipa/meson.build ++++ b/src/ipa/meson.build +@@ -8,12 +8,9 @@ ipa_install_dir = libcamera_libdir + ipa_data_dir = libcamera_datadir / 'ipa' + ipa_sysconf_dir = libcamera_sysconfdir / 'ipa' + +-config_h.set('IPA_CONFIG_DIR', +- '"' + get_option('prefix') / ipa_sysconf_dir + +- ':' + get_option('prefix') / ipa_data_dir + '"') ++config_h.set('IPA_CONFIG_DIR', '"./ipa_conf"') + +-config_h.set('IPA_MODULE_DIR', +- '"' + get_option('prefix') / ipa_install_dir + '"') ++config_h.set('IPA_MODULE_DIR', '"./ipa_module"') + + summary({ + 'IPA_CONFIG_DIR' : config_h.get('IPA_CONFIG_DIR'), diff --git a/src/libcamera/meson.build b/src/libcamera/meson.build index 89504cee..20c588cb 100644 --- a/src/libcamera/meson.build @@ -24,3 +43,17 @@ index 89504cee..20c588cb 100644 libthreads = dependency('threads') subdir('base') +diff --git a/src/libcamera/proxy/worker/meson.build b/src/libcamera/proxy/worker/meson.build +index aa4d9cd7..31b994a9 100644 +--- a/src/libcamera/proxy/worker/meson.build ++++ b/src/libcamera/proxy/worker/meson.build +@@ -24,8 +24,7 @@ foreach mojom : ipa_mojoms + dependencies : libcamera_private) + endforeach + +-config_h.set('IPA_PROXY_DIR', +- '"' + get_option('prefix') / proxy_install_dir + '"') ++config_h.set('IPA_PROXY_DIR', '"/dev/null"') + + summary({ + 'IPA_PROXY_DIR' : config_h.get('IPA_PROXY_DIR'),