OpenShot Library | libopenshot 0.3.3
Loading...
Searching...
No Matches
Settings.h
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#ifndef OPENSHOT_SETTINGS_H
14#define OPENSHOT_SETTINGS_H
15
16#include <string>
17
18namespace openshot {
19
26 class Settings {
27 private:
28
30 Settings(){}; // Don't allow user to create an instance of this singleton
31
32#if __GNUC__ >=7
34 Settings(Settings const&) = delete; // Don't allow the user to assign this instance
35
37 Settings & operator=(Settings const&) = delete; // Don't allow the user to assign this instance
38#else
40 Settings(Settings const&) {}; // Don't allow the user to assign this instance
41
43 Settings & operator=(Settings const&); // Don't allow the user to assign this instance
44#endif
45
47 static Settings * m_pInstance;
48
49 public:
63
66
68 int OMP_THREADS = 12;
69
71 int FF_THREADS = 8;
72
75
78
81
84
87
90
93
96
99
102
105
108 std::string PATH_OPENSHOT_INSTALL = "";
109
111 bool DEBUG_TO_STDERR = false;
112
114 static Settings * Instance();
115 };
116
117}
118
119#endif
This class is contains settings used by libopenshot (and can be safely toggled at any point)
Definition Settings.h:26
int DE_LIMIT_WIDTH_MAX
Maximum columns that hardware decode can handle.
Definition Settings.h:77
int OMP_THREADS
Number of threads of OpenMP.
Definition Settings.h:68
std::string PLAYBACK_AUDIO_DEVICE_NAME
The audio device name to use during playback.
Definition Settings.h:101
std::string PLAYBACK_AUDIO_DEVICE_TYPE
The device type for the playback audio devices.
Definition Settings.h:104
std::string PATH_OPENSHOT_INSTALL
Definition Settings.h:108
int HW_DE_DEVICE_SET
Which GPU to use to decode (0 is the first)
Definition Settings.h:80
int DE_LIMIT_HEIGHT_MAX
Maximum rows that hardware decode can handle.
Definition Settings.h:74
static Settings * Instance()
Create or get an instance of this logger singleton (invoke the class with this method)
Definition Settings.cpp:23
int VIDEO_CACHE_MIN_PREROLL_FRAMES
Minimum number of frames to cache before playback begins.
Definition Settings.h:89
int HARDWARE_DECODER
Use video codec for faster video decoding (if supported)
Definition Settings.h:62
bool HIGH_QUALITY_SCALING
Scale mode used in FFmpeg decoding and encoding (used as an optimization for faster previews)
Definition Settings.h:65
int VIDEO_CACHE_MAX_FRAMES
Max number of frames (when paused) to cache for playback.
Definition Settings.h:95
int FF_THREADS
Number of threads that ffmpeg uses.
Definition Settings.h:71
float VIDEO_CACHE_PERCENT_AHEAD
Percentage of cache in front of the playhead (0.0 to 1.0)
Definition Settings.h:86
bool ENABLE_PLAYBACK_CACHING
Enable/Disable the cache thread to pre-fetch and cache video frames before we need them.
Definition Settings.h:98
int HW_EN_DEVICE_SET
Which GPU to use to encode (0 is the first)
Definition Settings.h:83
int VIDEO_CACHE_MAX_PREROLL_FRAMES
Max number of frames (ahead of playhead) to cache during playback.
Definition Settings.h:92
bool DEBUG_TO_STDERR
Whether to dump ZeroMQ debug messages to stderr.
Definition Settings.h:111
This namespace is the default namespace for all code in the openshot library.
Definition Compressor.h:29