OpenShot Library | libopenshot  0.3.3
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 
18 namespace 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
33  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
39  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 
65  bool HIGH_QUALITY_SCALING = false;
66 
68  int OMP_THREADS = 12;
69 
71  int FF_THREADS = 8;
72 
74  int DE_LIMIT_HEIGHT_MAX = 1100;
75 
77  int DE_LIMIT_WIDTH_MAX = 1950;
78 
81 
84 
87 
90 
93 
95  int VIDEO_CACHE_MAX_FRAMES = 30 * 10;
96 
99 
101  std::string PLAYBACK_AUDIO_DEVICE_NAME = "";
102 
104  std::string PLAYBACK_AUDIO_DEVICE_TYPE = "";
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
openshot::Settings::VIDEO_CACHE_PERCENT_AHEAD
float VIDEO_CACHE_PERCENT_AHEAD
Percentage of cache in front of the playhead (0.0 to 1.0)
Definition: Settings.h:86
openshot::Settings::HARDWARE_DECODER
int HARDWARE_DECODER
Use video codec for faster video decoding (if supported)
Definition: Settings.h:62
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::ENABLE_PLAYBACK_CACHING
bool ENABLE_PLAYBACK_CACHING
Enable/Disable the cache thread to pre-fetch and cache video frames before we need them.
Definition: Settings.h:98
openshot::Settings::VIDEO_CACHE_MAX_FRAMES
int VIDEO_CACHE_MAX_FRAMES
Max number of frames (when paused) to cache for playback.
Definition: Settings.h:95
openshot::Settings::HW_EN_DEVICE_SET
int HW_EN_DEVICE_SET
Which GPU to use to encode (0 is the first)
Definition: Settings.h:83
openshot::Settings::VIDEO_CACHE_MAX_PREROLL_FRAMES
int VIDEO_CACHE_MAX_PREROLL_FRAMES
Max number of frames (ahead of playhead) to cache during playback.
Definition: Settings.h:92
openshot::Settings::DE_LIMIT_HEIGHT_MAX
int DE_LIMIT_HEIGHT_MAX
Maximum rows that hardware decode can handle.
Definition: Settings.h:74
openshot::Settings::PLAYBACK_AUDIO_DEVICE_NAME
std::string PLAYBACK_AUDIO_DEVICE_NAME
The audio device name to use during playback.
Definition: Settings.h:101
openshot::Settings::VIDEO_CACHE_MIN_PREROLL_FRAMES
int VIDEO_CACHE_MIN_PREROLL_FRAMES
Minimum number of frames to cache before playback begins.
Definition: Settings.h:89
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::PATH_OPENSHOT_INSTALL
std::string PATH_OPENSHOT_INSTALL
Definition: Settings.h:108
openshot::Settings::FF_THREADS
int FF_THREADS
Number of threads that ffmpeg uses.
Definition: Settings.h:71
openshot::Settings::PLAYBACK_AUDIO_DEVICE_TYPE
std::string PLAYBACK_AUDIO_DEVICE_TYPE
The device type for the playback audio devices.
Definition: Settings.h:104
openshot::Settings::HIGH_QUALITY_SCALING
bool HIGH_QUALITY_SCALING
Scale mode used in FFmpeg decoding and encoding (used as an optimization for faster previews)
Definition: Settings.h:65
openshot::Settings::DE_LIMIT_WIDTH_MAX
int DE_LIMIT_WIDTH_MAX
Maximum columns that hardware decode can handle.
Definition: Settings.h:77
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:111
openshot::Settings::HW_DE_DEVICE_SET
int HW_DE_DEVICE_SET
Which GPU to use to decode (0 is the first)
Definition: Settings.h:80