OpenShot Library | libopenshot
0.4.0
Main Page
Related Pages
Namespaces
Namespace List
Namespace Members
All
a
b
c
d
e
f
g
h
i
l
m
o
p
q
r
s
t
v
w
Functions
Variables
Typedefs
Enumerations
Enumerator
a
b
c
e
f
g
h
l
m
p
r
s
t
v
Classes
Class List
Class Index
Class Hierarchy
Class Members
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
z
~
Variables
_
a
b
c
d
e
f
g
h
i
j
l
m
n
o
p
q
r
s
t
u
v
w
x
y
Related Functions
Files
File List
File Members
All
_
a
c
e
f
h
i
k
m
n
o
p
q
r
s
t
u
Functions
Variables
Typedefs
Macros
_
a
e
f
h
i
k
m
n
o
p
q
r
s
t
u
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Pages
Settings.cpp
Go to the documentation of this file.
1
9
// Copyright (c) 2008-2019 OpenShot Studios, LLC
10
//
11
// SPDX-License-Identifier: LGPL-3.0-or-later
12
13
#include <cstdlib>
14
#include <omp.h>
15
#include "
Settings.h
"
16
17
using namespace
openshot
;
18
19
// Global reference to Settings
20
Settings
*Settings::m_pInstance =
nullptr
;
21
22
// Create or Get an instance of the settings singleton
23
Settings
*
Settings::Instance
()
24
{
25
if
(!m_pInstance) {
26
// Create the actual instance of Settings only once
27
m_pInstance =
new
Settings
;
28
m_pInstance->
OMP_THREADS
= omp_get_num_procs();
29
m_pInstance->
FF_THREADS
= omp_get_num_procs();
30
auto
env_debug = std::getenv(
"LIBOPENSHOT_DEBUG"
);
31
if
(env_debug !=
nullptr
)
32
m_pInstance->
DEBUG_TO_STDERR
=
true
;
33
}
34
35
return
m_pInstance;
36
}
Settings.h
Header file for global Settings class.
openshot
This namespace is the default namespace for all code in the openshot library.
Definition:
Compressor.h:28
openshot::Settings
This class is contains settings used by libopenshot (and can be safely toggled at any point)
Definition:
Settings.h:26
openshot::Settings::Instance
static Settings * Instance()
Create or get an instance of this logger singleton (invoke the class with this method)
Definition:
Settings.cpp:23
openshot::Settings::FF_THREADS
int FF_THREADS
Number of threads that ffmpeg uses.
Definition:
Settings.h:71
openshot::Settings::OMP_THREADS
int OMP_THREADS
Number of threads of OpenMP.
Definition:
Settings.h:68
openshot::Settings::DEBUG_TO_STDERR
bool DEBUG_TO_STDERR
Whether to dump ZeroMQ debug messages to stderr.
Definition:
Settings.h:114
Generated by
1.8.17