mirror of
https://github.com/opencv/opencv.git
synced 2026-07-21 19:33:03 +04:00
build: made environment access a separate feature
This commit is contained in:
@@ -54,6 +54,7 @@
|
||||
#include "opencv2/core/utility.hpp"
|
||||
#if defined(__OPENCV_BUILD)
|
||||
#include "opencv2/core/private.hpp"
|
||||
#include "opencv2/core/utils/configuration.private.hpp"
|
||||
#endif
|
||||
|
||||
#include "opencv2/imgproc.hpp"
|
||||
|
||||
@@ -133,7 +133,7 @@ protected:
|
||||
bool readPrioritySettings()
|
||||
{
|
||||
bool hasChanges = false;
|
||||
cv::String prioritized_backends = utils::getConfigurationParameterString("OPENCV_UI_PRIORITY_LIST", NULL);
|
||||
cv::String prioritized_backends = utils::getConfigurationParameterString("OPENCV_UI_PRIORITY_LIST");
|
||||
if (prioritized_backends.empty())
|
||||
return hasChanges;
|
||||
CV_LOG_INFO(NULL, "UI: Configured priority list (OPENCV_UI_PRIORITY_LIST): " << prioritized_backends);
|
||||
|
||||
@@ -662,7 +662,7 @@ int cv::waitKey(int delay)
|
||||
static int use_legacy = -1;
|
||||
if (use_legacy < 0)
|
||||
{
|
||||
use_legacy = getenv("OPENCV_LEGACY_WAITKEY") != NULL ? 1 : 0;
|
||||
use_legacy = utils::getConfigurationParameterBool("OPENCV_LEGACY_WAITKEY");
|
||||
}
|
||||
if (use_legacy > 0)
|
||||
return code;
|
||||
|
||||
@@ -1378,7 +1378,7 @@ int cv_wl_buffer::create_tmpfile(std::string const &tmpname) {
|
||||
}
|
||||
|
||||
int cv_wl_buffer::create_anonymous_file(off_t size) {
|
||||
auto path = getenv("XDG_RUNTIME_DIR") + std::string("/opencv-shared-XXXXXX");
|
||||
auto path = cv::utils::getConfigurationParameterString("XDG_RUNTIME_DIR") + std::string("/opencv-shared-XXXXXX");
|
||||
int fd = create_tmpfile(path);
|
||||
|
||||
int ret = posix_fallocate(fd, 0, size);
|
||||
|
||||
Reference in New Issue
Block a user