|
OpenShot Library | libopenshot
0.6.0
|
Go to the documentation of this file.
21 Settings *Settings::m_pInstance =
nullptr;
30 return std::max(2, std::max(2, omp_get_num_procs()) * 3);
36 if (applied_omp_threads != requested_threads) {
37 omp_set_num_threads(requested_threads);
38 applied_omp_threads = requested_threads;
48 const int machine_threads = std::max(2, omp_get_num_procs());
49 m_pInstance->default_omp_threads = machine_threads;
50 m_pInstance->default_ff_threads = machine_threads;
53 auto env_debug = std::getenv(
"LIBOPENSHOT_DEBUG");
54 if (env_debug !=
nullptr)
Header file for global Settings class.
This namespace is the default namespace for all code in the openshot library.
int MaxAllowedThreads() const
Return the maximum allowed thread override based on this machine.
This class is contains settings used by libopenshot (and can be safely toggled at any point)
void ApplyOpenMPSettings()
Apply any explicit OpenMP thread override to the runtime.
static Settings * Instance()
Create or get an instance of this logger singleton (invoke the class with this method)
int FF_THREADS
Number of threads that ffmpeg uses.
int OMP_THREADS
Number of OpenMP threads.
bool DEBUG_TO_STDERR
Whether to dump ZeroMQ debug messages to stderr.
int EffectiveOMPThreads() const
Return the effective OpenMP worker budget used by libopenshot heuristics.