OBS源码解析(3)OBSApp类介绍
OBSApp类有以下功能:
1.负责配置文件管理
2.版本信息管理
3.主界面OBSBasic对象管理
4.obs模块初始化
class OBSApp : public QApplication {
Q_OBJECT
private:
std::string locale;
std::string theme;
ConfigFile globalConfig;
TextLookup textLookup;
OBSContext obsContext;
QPointer<OBSMainWindow> mainWindow;
profiler_name_store_t *profilerNameStore = nullptr;
os_inhibit_t *sleepInhibitor = nullptr;
int sleepInhibitRefs = 0;
std::deque<obs_frontend_translate_ui_cb> translatorHooks;
bool InitGlobalConfig();
bool InitGlobalConfigDefaults();
bool InitLocale();
bool InitTheme();
public:
OBSApp(int &argc, char **argv, profiler_name_store_t *store);
~OBSApp();
void AppInit();
bool OBSInit();
inline QMainWindow *GetMainWindow() const {return mainWindow.data();}
inline config_t *GlobalConfig() const {return globalConfig;}
inline const char *GetLocale() const
{
return locale.c_str();
}
inline const char *GetTheme() const {return theme.c_str();}
bool SetTheme(std::string name, std::string path = "");
inline lookup_t *GetTextLookup() const {return textLookup;}
inline const char *GetString(const char *lookupVal) const
{
return textLookup.GetString(lookupVal);
}
bool TranslateString(const char *lookupVal, const char **out) const;
profiler_name_store_t *GetProfilerNameStore() const
{
return profilerNameStore;
}
const char *GetLastLog() const;
const char *GetCurrentLog() const;
std::string GetVersionString() const;
const char *InputAudioSource() const;
const char *OutputAudioSource() const;
const char *GetRenderModule() const;
inline void IncrementSleepInhibition()
{
if (!sleepInhibitor) return;
if (sleepInhibitRefs++ == 0)
os_inhibit_sleep_set_active(sleepInhibitor, true);
}
inline void DecrementSleepInhibition()
{
if (!sleepInhibitor) return;
if (sleepInhibitRefs == 0) return;
if (--sleepInhibitRefs == 0)
os_inhibit_sleep_set_active(sleepInhibitor, false);
}
inline void PushUITranslation(obs_frontend_translate_ui_cb cb)
{
translatorHooks.emplace_front(cb);
}
inline void PopUITranslation()
{
translatorHooks.pop_front();
}
};
OBS源码解析(3)OBSApp类介绍的更多相关文章
- AOP源码解析:AspectJAwareAdvisorAutoProxyCreator类的介绍
AspectJAwareAdvisorAutoProxyCreator 的类图 上图中一些 类/接口 的介绍: AspectJAwareAdvisorAutoProxyCreator : 公开了Asp ...
- Mybatis源码解析3——核心类SqlSessionFactory,看完我悟了
这是昨晚的武汉,晚上九点钟拍的,疫情又一次来袭,曾经熙熙攘攘的夜市也变得冷冷清清,但比前几周要好很多了.希望大家都能保护好自己,保护好身边的人,生活不可能像你想象的那么好,但也不会像你想象的那么糟. ...
- java源码解析之String类(二)
上一节主要介绍了String类的一些构造方法,主要分为四类 无参构造器:String(),创建一个空字符串"",区别于null字符串,""已经初始化,null并 ...
- Netty源码解析 -- 内存对齐类SizeClasses
在学习Netty内存池之前,我们先了解一下Netty的内存对齐类SizeClasses,它为Netty内存池中的内存块提供大小对齐,索引计算等服务方法. 源码分析基于Netty 4.1.52 Nett ...
- AOP源码解析:AspectJExpressionPointcutAdvisor类
先看看 AspectJExpressionPointcutAdvisor 的类图 再了解一下切点(Pointcut)表达式,它指定触发advice的方法,可以精确到返回参数,参数类型,方法名 1 pa ...
- java源码解析之Object类
一.Object类概述 Object类是java中类层次的根,是所有类的基类.在编译时会自动导入.Object中的方法如下: 二.方法详解 Object的方法可以分成两类,一类是被关键字fin ...
- Bulma 源码解析之 .columns 类
{说明} 这一部分的源码内容被我简化了,另外我还额外添加了一个辅助类 is-grow. .columns // 修饰类 &.is-centered justify-content: cente ...
- java源码解析之String类(一)
String是我们接触最多的类,无论是学习中还是工作中,基本每天都会和字符串打交道,从字符串本身的各种拼接.切片.变形,再到和其他基本数据类型的转换,几乎无时无刻都在使用它,今天就让我们揭开Strin ...
- Spring源码解析 – @Configuration配置类及注解Bean的解析
在分析Spring 容器创建过程时,我们知道容器默认会加载一些后置处理器PostPRocessor,以AnnotationConfigApplicationContext为例,在构造函数中初始化rea ...
随机推荐
- Hdu 1698(线段树 区间修改 区间查询)
In the game of DotA, Pudge's meat hook is actually the most horrible thing for most of the heroes. T ...
- HDU1792A New Change Problem(GCD规律推导)
A New Change Problem Time Limit: 5000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Oth ...
- h5 动画页面
伪元素上就不要做动画了,页面果然应该做一个测试一个啊 拿到设计稿一开始就先看看这个设计稿的布局,有一些是从页面顶部到底部都有效果的,这个时候就要考虑在 iPhone4 这样屏幕不够高的设备上如何保 ...
- CSS3详解:transform、transition
CSS3 transform是什么? transform的含义是:改变,使-变形:转换 CSS3 transform都有哪些常用属性? transform的属性包括:rotate() / skew() ...
- 文本域、bootstrap-table显示以及MySQL三者间的换行符问题
首先,今天在做项目的时候遇到的一个问题,如何实现文本输入换行以及在前台Bootstrap-table中显示也能够换行. 也许你马上就会想到说,用富文本编辑器,然而我们需要实现的只是文本输入以及换行功能 ...
- c#异步调用的几种方式
首先,我们分析一下异步处理的环境 需要在当前线程中获取返回值 不需要在当前线程中获取返回值,但是仍然需要对返回值做处理对于第1中情况,还可以继续细分 在当前线程中启动线程T,然后继续执行当前线程中的其 ...
- java 虚拟机的类加载机制
Java 虚拟机的类加载机制 关于类加载机制: 虚拟机把描述类的数据从Class 文件加载到内存,并对数据进行效验.转换解析和初始化,最终 形成可以被虚拟机直接使用的Java 类型,就是虚拟机的类 ...
- mysql数据库第三弹
mysql数据库知识拓展 视图 视图是一个虚拟表(非真实存在),其本质是[根据SQL语句获取动态的数据集,并为其命名],用户使用时只需使用[名称]即可获取结果集,并可以将其当作表来使用. SELECT ...
- 使用dropwizard(5)--加入swagger
前言 Swagger已经成API service的规范了,本处在dropwizard中简单集成Swagger. Demo source https://github.com/Ryan-Miao/l4d ...
- ORA-01843: 无效的月份
1.插入的日期如果是DateTime类型的,没有影响 2.如果DateTime.ToString()获取的日期,就会报错,例如(@param_datetime = cf.GetServerDateTi ...