OpenShot Library | libopenshot  0.2.3
Settings.cpp
Go to the documentation of this file.
1 /**
2  * @file
3  * @brief Source file for global Settings class
4  * @author Jonathan Thomas <jonathan@openshot.org>
5  *
6  * @section LICENSE
7  *
8  * Copyright (c) 2008-2014 OpenShot Studios, LLC
9  * <http://www.openshotstudios.com/>. This file is part of
10  * OpenShot Library (libopenshot), an open-source project dedicated to
11  * delivering high quality video editing and animation solutions to the
12  * world. For more information visit <http://www.openshot.org/>.
13  *
14  * OpenShot Library (libopenshot) is free software: you can redistribute it
15  * and/or modify it under the terms of the GNU Lesser General Public License
16  * as published by the Free Software Foundation, either version 3 of the
17  * License, or (at your option) any later version.
18  *
19  * OpenShot Library (libopenshot) is distributed in the hope that it will be
20  * useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
21  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22  * GNU Lesser General Public License for more details.
23  *
24  * You should have received a copy of the GNU Lesser General Public License
25  * along with OpenShot Library. If not, see <http://www.gnu.org/licenses/>.
26  */
27 
28 #include "../include/Settings.h"
29 
30 using namespace std;
31 using namespace openshot;
32 
33 
34 // Global reference to logger
35 Settings *Settings::m_pInstance = NULL;
36 
37 // Create or Get an instance of the logger singleton
38 Settings *Settings::Instance()
39 {
40  if (!m_pInstance) {
41  // Create the actual instance of logger only once
42  m_pInstance = new Settings;
43  m_pInstance->HARDWARE_DECODE = false;
44  m_pInstance->HARDWARE_ENCODE = false;
45  m_pInstance->HIGH_QUALITY_SCALING = false;
46  m_pInstance->MAX_WIDTH = 0;
47  m_pInstance->MAX_HEIGHT = 0;
48  m_pInstance->WAIT_FOR_VIDEO_PROCESSING_TASK = false;
49  }
50 
51  return m_pInstance;
52 }
This class is contains settings used by libopenshot (and can be safely toggled at any point) ...
Definition: Settings.h:55
bool HARDWARE_DECODE
Use video card for faster video decoding (if supported)
Definition: Settings.h:80