-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsystemsource.cpp
More file actions
40 lines (33 loc) · 791 Bytes
/
systemsource.cpp
File metadata and controls
40 lines (33 loc) · 791 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
#include "systemsource.h"
#include "videomanager.h"
#include "handle/handlermanager.h"
SystemSource* SystemSource::instance = NULL;
SystemSource* SystemSource::getInstance(){
if(!instance){
instance = new SystemSource;
}
return instance;
}
SystemSource::SystemSource(QObject *parent) :
QObject(parent)
{
isInit = false;
}
bool SystemSource::sourceInit()
{
bool ret = false;
if(isInit == false){
if(VideoManager::getInstance()->managerInit() == 0){
if(HandlerManager::getInstance()->handlerManagerInit()){
ret = true;
isInit = true;
}
}
}
return ret;
}
SystemSource::~SystemSource()
{
delete VideoManager::getInstance();
delete HandlerManager::getInstance();
}