libmoldeo (Moldeo 1.0 Core)
1.0
libmoldeo is the group of objects and functions that executes the basic operations of Moldeo 1.0 Platform.
moConsoleState.cpp
Ir a la documentación de este archivo.
1
/*******************************************************************************
2
3
moConsoleState.cpp
4
5
****************************************************************************
6
* *
7
* This source is free software; you can redistribute it and/or modify *
8
* it under the terms of the GNU General Public License as published by *
9
* the Free Software Foundation; either version 2 of the License, or *
10
* (at your option) any later version. *
11
* *
12
* This code is distributed in the hope that it will be useful, but *
13
* WITHOUT ANY WARRANTY; without even the implied warranty of *
14
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
15
* General Public License for more details. *
16
* *
17
* A copy of the GNU General Public License is available on the World *
18
* Wide Web at <http://www.gnu.org/copyleft/gpl.html>. You can also *
19
* obtain it by writing to the Free Software Foundation, *
20
* Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
21
* *
22
****************************************************************************
23
24
Copyright(C) 2006 Fabricio Costa
25
26
Authors:
27
Fabricio Costa
28
29
30
*******************************************************************************/
31
32
#include "
moConsoleState.h
"
33
34
moConsoleState::moConsoleState
() {
35
36
automatic
=
MO_DEACTIVATED
;
37
pause
=
MO_DEACTIVATED
;
38
finish
=
MO_FALSE
;
39
reinit
=
MO_FALSE
;
40
setfps
=
MO_DEACTIVATED
;
41
42
fps
= 30;
43
fps0
= 0;
44
fps1
= 1;
45
46
stereooutput
=
MO_DEACTIVATED
;
47
savescreen
=
MO_DEACTIVATED
;
48
frame
= 0;
49
50
m_Mode
=
MO_CONSOLE_MODE_LIVE
;
51
m_RenderFrameQuality
=
"JPGGOOD"
;
52
}
53
54
moConsoleState::~moConsoleState
() {
55
Finish
();
56
}
57
58
MOboolean
59
moConsoleState::Init
() {
60
61
automatic
=
MO_DEACTIVATED
;
62
pause
=
MO_DEACTIVATED
;
63
finish
=
MO_FALSE
;
64
reinit
=
MO_FALSE
;
65
setfps
=
MO_DEACTIVATED
;
66
67
fps
= 30;
68
fps0
= 0;
69
fps1
= 1;
70
71
m_Mode
=
MO_CONSOLE_MODE_LIVE
;
72
73
return
true
;
74
}
75
76
MOboolean
77
moConsoleState::Finish
() {
78
79
automatic
=
MO_DEACTIVATED
;
80
pause
=
MO_DEACTIVATED
;
81
finish
=
MO_FALSE
;
82
reinit
=
MO_FALSE
;
83
setfps
=
MO_DEACTIVATED
;
84
85
fps
= 30;
86
fps0
= 0;
87
fps1
= 1;
88
/*
89
m_nEffects = 0;
90
m_nPreEffects = 0;
91
m_nPostEffects = 0;
92
m_nMasterEffects = 0;
93
m_nAllEffects = 0;
94
*/
95
return
true
;
96
}
97
98
const
moText
&
99
moConsoleState::ToJSON
() {
100
101
moText
fieldSeparation =
","
;
102
moEffectState::ToJSON
();
103
moText
tmode =
""
;
104
if
(
m_Mode
==
MO_CONSOLE_MODE_LIVE
) tmode =
"live"
;
105
if
(
m_Mode
==
MO_CONSOLE_MODE_PLAY_SESSION
) tmode =
"playsession"
;
106
if
(
m_Mode
==
MO_CONSOLE_MODE_RECORD_SESSION
) tmode =
"recordsession"
;
107
if
(
m_Mode
==
MO_CONSOLE_MODE_RENDER_SESSION
) tmode =
"rendersession"
;
108
109
moText
json =
"{"
;
110
json+=
"'mode': '"
+tmode+
"'"
;
111
json+= fieldSeparation +
"'effectstate':"
+
fullJSON
;
112
json+=
"}"
;
113
114
fullJSON = json;
115
return
fullJSON
;
116
}
117
118
119
120
moConsoleState::reinit
MOswitch reinit
Definition:
moConsoleState.h:72
moConsoleState::automatic
MOswitch automatic
Definition:
moConsoleState.h:71
moConsoleState::fps0
MOuint fps0
Definition:
moConsoleState.h:76
MO_CONSOLE_MODE_RENDER_SESSION
Definition:
moConsoleState.h:45
moConsoleState::pause
MOswitch pause
Definition:
moConsoleState.h:70
MOboolean
#define MOboolean
Definition:
moTypes.h:385
moEffectState::fullJSON
moText fullJSON
Definition:
moEffectState.h:158
moConsoleState::Finish
MOboolean Finish()
Finaliza el objeto, libera recursos.
Definition:
moConsoleState.cpp:77
moConsoleState::ToJSON
const moText & ToJSON()
Definition:
moConsoleState.cpp:99
moText0
clase de para manejar textos
Definition:
moText.h:75
MO_CONSOLE_MODE_LIVE
Definition:
moConsoleState.h:42
moConsoleState::~moConsoleState
virtual ~moConsoleState()
Definition:
moConsoleState.cpp:54
moConsoleState::setfps
MOswitch setfps
Definition:
moConsoleState.h:75
MO_DEACTIVATED
#define MO_DEACTIVATED
Definition:
moTypes.h:368
MO_CONSOLE_MODE_RECORD_SESSION
Definition:
moConsoleState.h:43
moConsoleState::savescreen
MOswitch savescreen
Definition:
moConsoleState.h:81
moConsoleState::m_Mode
moConsoleMode m_Mode
Definition:
moConsoleState.h:66
moConsoleState::m_RenderFrameQuality
moText m_RenderFrameQuality
Definition:
moConsoleState.h:68
moConsoleState::frame
MOuint frame
Definition:
moConsoleState.h:82
moConsoleState.h
moConsoleState::fps
MOuint fps
Definition:
moConsoleState.h:76
moConsoleState::Init
MOboolean Init()
Inicializa el objeto.
Definition:
moConsoleState.cpp:59
moConsoleState::fps1
MOuint fps1
Definition:
moConsoleState.h:76
MO_FALSE
#define MO_FALSE
Definition:
moTypes.h:369
moConsoleState::stereooutput
MOswitch stereooutput
Definition:
moConsoleState.h:79
moConsoleState::finish
MOswitch finish
Definition:
moConsoleState.h:73
MO_CONSOLE_MODE_PLAY_SESSION
Definition:
moConsoleState.h:44
moConsoleState::moConsoleState
moConsoleState()
Definition:
moConsoleState.cpp:34
moEffectState::ToJSON
virtual const moText & ToJSON()
Definition:
moEffectState.cpp:157
libmoldeo
moConsoleState.cpp
Generado el Martes, 10 de Septiembre de 2019 21:27:06 para libmoldeo (Moldeo 1.0 Core) por
1.8.13