Stefan Schuermans commited on 2011-12-22 11:32:05
Showing 29 changed files, with 166 additions and 211 deletions.
... | ... |
@@ -8,33 +8,31 @@ |
8 | 8 |
|
9 | 9 |
#include <BlinkenLib/BlinkenFrame.h> |
10 | 10 |
|
11 |
-#include "CallMgr.h" |
|
12 | 11 |
#include "Canvas.h" |
13 | 12 |
#include "CanvasInput.h" |
14 | 13 |
#include "Directory.h" |
15 | 14 |
#include "File.h" |
16 | 15 |
#include "Format.h" |
17 | 16 |
#include "FormatFile.h" |
17 |
+#include "Mgrs.h" |
|
18 | 18 |
#include "Module.h" |
19 | 19 |
#include "ListTracker.h" |
20 | 20 |
#include "ListTracker_impl.h" |
21 | 21 |
#include "OutStreamFile.h" |
22 |
-#include "StreamMgr.h" |
|
23 | 22 |
#include "StreamRecv.h" |
24 | 23 |
|
25 | 24 |
namespace Blinker { |
26 | 25 |
|
27 | 26 |
/** |
28 | 27 |
* @brief constructor |
29 |
- * @param[in] callMgr callback manager |
|
30 |
- * @param[in] streamMgr stream manager |
|
28 |
+ * @param[in] mgrs managers |
|
31 | 29 |
* @param[in] dirBase base directory |
32 | 30 |
*/ |
33 |
-Canvas::Canvas(CallMgr &callMgr, StreamMgr &streamMgr, |
|
31 |
+Canvas::Canvas(Mgrs &mgrs, |
|
34 | 32 |
const Directory &dirBase): |
35 |
- Module(callMgr, streamMgr, dirBase), |
|
33 |
+ Module(mgrs, dirBase), |
|
36 | 34 |
m_fileFormat(dirBase.getFile("format")), |
37 |
- m_fileOutStream(dirBase.getFile("outstream"), streamMgr), |
|
35 |
+ m_fileOutStream(dirBase.getFile("outstream"), mgrs.m_streamMgr), |
|
38 | 36 |
m_pCanvas(NULL), |
39 | 37 |
m_canvasHasFrame(false), |
40 | 38 |
m_inListTracker(*this, dirBase.getSubdir("inputs")) |
... | ... |
@@ -11,15 +11,14 @@ |
11 | 11 |
|
12 | 12 |
#include <BlinkenLib/BlinkenFrame.h> |
13 | 13 |
|
14 |
-#include "CallMgr.h" |
|
15 | 14 |
#include "Directory.h" |
16 | 15 |
#include "File.h" |
17 | 16 |
#include "Format.h" |
18 | 17 |
#include "FormatFile.h" |
19 | 18 |
#include "ListTracker.h" |
19 |
+#include "Mgrs.h" |
|
20 | 20 |
#include "Module.h" |
21 | 21 |
#include "OutStreamFile.h" |
22 |
-#include "StreamMgr.h" |
|
23 | 22 |
|
24 | 23 |
namespace Blinker { |
25 | 24 |
|
... | ... |
@@ -36,11 +35,10 @@ protected: |
36 | 35 |
public: |
37 | 36 |
/** |
38 | 37 |
* @brief constructor |
39 |
- * @param[in] callMgr callback manager |
|
40 |
- * @param[in] streamMgr stream manager |
|
38 |
+ * @param[in] mgrs managers |
|
41 | 39 |
* @param[in] dirBase base directory |
42 | 40 |
*/ |
43 |
- Canvas(CallMgr &callMgr, StreamMgr &streamMgr, const Directory &dirBase); |
|
41 |
+ Canvas(Mgrs &mgrs, const Directory &dirBase); |
|
44 | 42 |
|
45 | 43 |
/// virtual destructor |
46 | 44 |
virtual ~Canvas(); |
... | ... |
@@ -31,7 +31,7 @@ Canvas::Input::Input(Canvas &canvas, const std::string &name, |
31 | 31 |
const Directory &dirBase): |
32 | 32 |
m_canvas(canvas), |
33 | 33 |
m_name(name), |
34 |
- m_fileInStream(dirBase.getFile("instream"), canvas.m_streamMgr), |
|
34 |
+ m_fileInStream(dirBase.getFile("instream"), canvas.m_mgrs.m_streamMgr), |
|
35 | 35 |
m_fileSrcPos(dirBase.getFile("srcpos")), |
36 | 36 |
m_fileSize(dirBase.getFile("size")), |
37 | 37 |
m_fileDestPos(dirBase.getFile("destpos")) |
... | ... |
@@ -17,14 +17,13 @@ extern "C" { |
17 | 17 |
} // extern "C" |
18 | 18 |
#endif // #ifdef BLINKER_CFG_FLEIXPIX |
19 | 19 |
|
20 |
-#include "CallMgr.h" |
|
21 | 20 |
#include "Directory.h" |
22 | 21 |
#include "File.h" |
23 | 22 |
#include "FlexiPix.h" |
24 | 23 |
#include "InStreamFile.h" |
24 |
+#include "Mgrs.h" |
|
25 | 25 |
#include "Module.h" |
26 | 26 |
#include "Size.h" |
27 |
-#include "StreamMgr.h" |
|
28 | 27 |
#include "StreamRecv.h" |
29 | 28 |
#include "Time.h" |
30 | 29 |
#include "TimeCallee.h" |
... | ... |
@@ -33,14 +32,13 @@ namespace Blinker { |
33 | 32 |
|
34 | 33 |
/** |
35 | 34 |
* @brief constructor |
36 |
- * @param[in] callMgr callback manager |
|
37 |
- * @param[in] streamMgr stream manager |
|
35 |
+ * @param[in] mgrs managers |
|
38 | 36 |
* @param[in] dirBase base directory |
39 | 37 |
*/ |
40 |
-FlexiPix::FlexiPix(CallMgr &callMgr, StreamMgr &streamMgr, |
|
38 |
+FlexiPix::FlexiPix(Mgrs &mgrs, |
|
41 | 39 |
const Directory &dirBase): |
42 |
- Module(callMgr, streamMgr, dirBase), |
|
43 |
- m_fileInStream(dirBase.getFile("instream"), streamMgr), |
|
40 |
+ Module(mgrs, dirBase), |
|
41 |
+ m_fileInStream(dirBase.getFile("instream"), mgrs.m_streamMgr), |
|
44 | 42 |
m_fileConfig(dirBase.getFile("flexipix.flp")), |
45 | 43 |
m_pDisplay(NULL) |
46 | 44 |
{ |
... | ... |
@@ -55,7 +53,7 @@ FlexiPix::~FlexiPix() |
55 | 53 |
// clean up |
56 | 54 |
destroyDisplay(); |
57 | 55 |
m_fileInStream.setStreamRecv(NULL); |
58 |
- m_callMgr.cancelTimeCall(this); |
|
56 |
+ m_mgrs.m_callMgr.cancelTimeCall(this); |
|
59 | 57 |
} |
60 | 58 |
|
61 | 59 |
/// check for update of configuration |
... | ... |
@@ -184,7 +182,7 @@ void FlexiPix::sendFrame() |
184 | 182 |
#ifdef BLINKER_CFG_FLEXIPIX |
185 | 183 |
if (m_pDisplay) { |
186 | 184 |
flp_display_send(m_pDisplay); |
187 |
- m_callMgr.requestTimeCall(this, Time::now() + Time(1)); // for refresh |
|
185 |
+ m_mgrs.m_callMgr.requestTimeCall(this, Time::now() + Time(1)); // for refresh |
|
188 | 186 |
} |
189 | 187 |
#endif // #ifdef BLINKER_CFG_FLEXIPIX |
190 | 188 |
} |
... | ... |
@@ -10,13 +10,12 @@ |
10 | 10 |
|
11 | 11 |
#include <BlinkenLib/BlinkenFrame.h> |
12 | 12 |
|
13 |
-#include "CallMgr.h" |
|
14 | 13 |
#include "Directory.h" |
15 | 14 |
#include "File.h" |
16 | 15 |
#include "InStreamFile.h" |
16 |
+#include "Mgrs.h" |
|
17 | 17 |
#include "Module.h" |
18 | 18 |
#include "Size.h" |
19 |
-#include "StreamMgr.h" |
|
20 | 19 |
#include "StreamRecv.h" |
21 | 20 |
#include "Time.h" |
22 | 21 |
#include "TimeCallee.h" |
... | ... |
@@ -29,11 +28,10 @@ class FlexiPix: public Module, public StreamRecv, public TimeCallee |
29 | 28 |
public: |
30 | 29 |
/** |
31 | 30 |
* @brief constructor |
32 |
- * @param[in] callMgr callback manager |
|
33 |
- * @param[in] streamMgr stream manager |
|
31 |
+ * @param[in] mgrs managers |
|
34 | 32 |
* @param[in] dirBase base directory |
35 | 33 |
*/ |
36 |
- FlexiPix(CallMgr &callMgr, StreamMgr &streamMgr, const Directory &dirBase); |
|
34 |
+ FlexiPix(Mgrs &mgrs, const Directory &dirBase); |
|
37 | 35 |
|
38 | 36 |
/// virtual destructor |
39 | 37 |
virtual ~FlexiPix(); |
... | ... |
@@ -0,0 +1,24 @@ |
1 |
+/* Blinker |
|
2 |
+ Copyright 2011 Stefan Schuermans <stefan@blinkenarea.org> |
|
3 |
+ Copyleft GNU public license - http://www.gnu.org/copyleft/gpl.html |
|
4 |
+ a blinkenarea.org project */ |
|
5 |
+ |
|
6 |
+#ifndef BLINKER_MGRS_H |
|
7 |
+#define BLINKER_MGRS_H |
|
8 |
+ |
|
9 |
+#include "CallMgr.h" |
|
10 |
+#include "StreamMgr.h" |
|
11 |
+ |
|
12 |
+namespace Blinker { |
|
13 |
+ |
|
14 |
+/// structure to collect all managers |
|
15 |
+struct Mgrs |
|
16 |
+{ |
|
17 |
+ CallMgr m_callMgr; ///< call manager |
|
18 |
+ StreamMgr m_streamMgr; ///< stream manager |
|
19 |
+}; // struct Mgrs |
|
20 |
+ |
|
21 |
+} // namespace Blinker |
|
22 |
+ |
|
23 |
+#endif // #ifndef BLINKER_MGRS_H |
|
24 |
+ |
... | ... |
@@ -3,23 +3,19 @@ |
3 | 3 |
Copyleft GNU public license - http://www.gnu.org/copyleft/gpl.html |
4 | 4 |
a blinkenarea.org project */ |
5 | 5 |
|
6 |
-#include "CallMgr.h" |
|
6 |
+#include "Mgrs.h" |
|
7 | 7 |
#include "Directory.h" |
8 | 8 |
#include "Module.h" |
9 |
-#include "StreamMgr.h" |
|
10 | 9 |
|
11 | 10 |
namespace Blinker { |
12 | 11 |
|
13 | 12 |
/** |
14 | 13 |
* @brief constructor |
15 |
- * @param[in] callMgr callback manager |
|
16 |
- * @param[in] streamMgr stream manager |
|
14 |
+ * @param[in] mgrs managers |
|
17 | 15 |
* @param[in] dirBase base directory |
18 | 16 |
*/ |
19 |
-Module::Module(CallMgr &callMgr, StreamMgr &streamMgr, |
|
20 |
- const Directory &dirBase): |
|
21 |
- m_callMgr(callMgr), |
|
22 |
- m_streamMgr(streamMgr), |
|
17 |
+Module::Module(Mgrs &mgrs, const Directory &dirBase): |
|
18 |
+ m_mgrs(mgrs), |
|
23 | 19 |
m_dirBase(dirBase) |
24 | 20 |
{ |
25 | 21 |
} |
... | ... |
@@ -6,9 +6,8 @@ |
6 | 6 |
#ifndef BLINKER_MODULE_H |
7 | 7 |
#define BLINKER_MODULE_H |
8 | 8 |
|
9 |
-#include "CallMgr.h" |
|
9 |
+#include "Mgrs.h" |
|
10 | 10 |
#include "Directory.h" |
11 |
-#include "StreamMgr.h" |
|
12 | 11 |
|
13 | 12 |
namespace Blinker { |
14 | 13 |
|
... | ... |
@@ -18,11 +17,10 @@ class Module |
18 | 17 |
public: |
19 | 18 |
/** |
20 | 19 |
* @brief constructor |
21 |
- * @param[in] callMgr callback manager |
|
22 |
- * @param[in] streamMgr stream manager |
|
20 |
+ * @param[in] mgrs managers |
|
23 | 21 |
* @param[in] dirBase base directory |
24 | 22 |
*/ |
25 |
- Module(CallMgr &callMgr, StreamMgr &streamMgr, const Directory &dirBase); |
|
23 |
+ Module(Mgrs &mgrs, const Directory &dirBase); |
|
26 | 24 |
|
27 | 25 |
/// virtual destructor |
28 | 26 |
virtual ~Module(); |
... | ... |
@@ -39,8 +37,7 @@ public: |
39 | 37 |
virtual void updateConfig() = 0; |
40 | 38 |
|
41 | 39 |
protected: |
42 |
- CallMgr &m_callMgr; ///< callback manager |
|
43 |
- StreamMgr &m_streamMgr; ///< stream manager |
|
40 |
+ Mgrs &m_mgrs; ///< managers |
|
44 | 41 |
Directory m_dirBase; ///< base directory |
45 | 42 |
}; // class Module |
46 | 43 |
|
... | ... |
@@ -8,11 +8,10 @@ |
8 | 8 |
|
9 | 9 |
#include <list> |
10 | 10 |
|
11 |
-#include "CallMgr.h" |
|
12 | 11 |
#include "Directory.h" |
13 | 12 |
#include "ListTracker.h" |
13 |
+#include "Mgrs.h" |
|
14 | 14 |
#include "Module.h" |
15 |
-#include "StreamMgr.h" |
|
16 | 15 |
#include "TimeCallee.h" |
17 | 16 |
|
18 | 17 |
namespace Blinker { |
... | ... |
@@ -31,11 +30,10 @@ protected: |
31 | 30 |
public: |
32 | 31 |
/** |
33 | 32 |
* @brief constructor |
34 |
- * @param[in] callMgr callback manager |
|
35 |
- * @param[in] streamMgr stream manager |
|
33 |
+ * @param[in] mgrs managers |
|
36 | 34 |
* @param[in] dirBase base directory |
37 | 35 |
*/ |
38 |
- ModuleMgr(CallMgr &callMgr, StreamMgr &streamMgr, const Directory &dirBase); |
|
36 |
+ ModuleMgr(Mgrs &mgrs, const Directory &dirBase); |
|
39 | 37 |
|
40 | 38 |
/// destructor |
41 | 39 |
~ModuleMgr(); |
... | ... |
@@ -56,8 +54,7 @@ protected: |
56 | 54 |
void updateConfig(); |
57 | 55 |
|
58 | 56 |
protected: |
59 |
- CallMgr &m_callMgr; ///< callback manager |
|
60 |
- StreamMgr &m_streamMgr; ///< stream manager |
|
57 |
+ Mgrs &m_mgrs; ///< managers |
|
61 | 58 |
Directory m_dirBase; ///< base directory |
62 | 59 |
ModuleListTracker m_moduleListTracker; ///< module list tracker |
63 | 60 |
}; // class ModuleMgr |
... | ... |
@@ -8,37 +8,33 @@ |
8 | 8 |
|
9 | 9 |
#include <list> |
10 | 10 |
|
11 |
-#include "CallMgr.h" |
|
12 | 11 |
#include "Directory.h" |
13 | 12 |
#include "ListTracker.h" |
14 | 13 |
#include "ListTracker_impl.h" |
14 |
+#include "Mgrs.h" |
|
15 | 15 |
#include "Module.h" |
16 | 16 |
#include "ModuleMgr.h" |
17 | 17 |
#include "ModuleMgrCntr.h" |
18 | 18 |
#include "ModuleMgrCntr_impl.h" |
19 |
-#include "StreamMgr.h" |
|
20 | 19 |
#include "TimeCallee.h" |
21 | 20 |
|
22 | 21 |
namespace Blinker { |
23 | 22 |
|
24 | 23 |
/** |
25 | 24 |
* @brief constructor |
26 |
- * @param[in] callMgr callback manager |
|
27 |
- * @param[in] streamMgr stream manager |
|
25 |
+ * @param[in] mgrs managers |
|
28 | 26 |
* @param[in] dirBase base directory |
29 | 27 |
*/ |
30 | 28 |
template<typename MODULE> |
31 |
-ModuleMgr<MODULE>::ModuleMgr(CallMgr &callMgr, StreamMgr &streamMgr, |
|
32 |
- const Directory &dirBase): |
|
33 |
- m_callMgr(callMgr), |
|
34 |
- m_streamMgr(streamMgr), |
|
29 |
+ModuleMgr<MODULE>::ModuleMgr(Mgrs &mgrs, const Directory &dirBase): |
|
30 |
+ m_mgrs(mgrs), |
|
35 | 31 |
m_dirBase(dirBase), |
36 | 32 |
m_moduleListTracker(*this, dirBase) |
37 | 33 |
{ |
38 | 34 |
m_moduleListTracker.init(); |
39 | 35 |
|
40 | 36 |
// request call in 1s |
41 |
- m_callMgr.requestTimeCall(this, Time::now() + Time(1)); |
|
37 |
+ m_mgrs.m_callMgr.requestTimeCall(this, Time::now() + Time(1)); |
|
42 | 38 |
} |
43 | 39 |
|
44 | 40 |
/// destructor |
... | ... |
@@ -55,7 +51,7 @@ void ModuleMgr<MODULE>::timeCall() |
55 | 51 |
updateConfig(); |
56 | 52 |
|
57 | 53 |
// request next call in 1s |
58 |
- m_callMgr.requestTimeCall(this, Time::now() + Time(1)); |
|
54 |
+ m_mgrs.m_callMgr.requestTimeCall(this, Time::now() + Time(1)); |
|
59 | 55 |
} |
60 | 56 |
|
61 | 57 |
/// check for update of configuration |
... | ... |
@@ -8,18 +8,17 @@ |
8 | 8 |
#include <BlinkenLib/BlinkenFrame.h> |
9 | 9 |
#include <BlinkenLib/BlinkenProto.h> |
10 | 10 |
|
11 |
-#include "CallMgr.h" |
|
12 | 11 |
#include "Device.h" |
13 | 12 |
#include "Directory.h" |
14 | 13 |
#include "File.h" |
15 | 14 |
#include "InStreamFile.h" |
15 |
+#include "Mgrs.h" |
|
16 | 16 |
#include "Module.h" |
17 | 17 |
#include "NameFile.h" |
18 | 18 |
#include "Output.h" |
19 | 19 |
#include "Protocol.h" |
20 | 20 |
#include "ProtocolFile.h" |
21 | 21 |
#include "SerCfgFile.h" |
22 |
-#include "StreamMgr.h" |
|
23 | 22 |
#include "StreamRecv.h" |
24 | 23 |
#include "Time.h" |
25 | 24 |
#include "TimeCallee.h" |
... | ... |
@@ -28,14 +27,13 @@ namespace Blinker { |
28 | 27 |
|
29 | 28 |
/** |
30 | 29 |
* @brief constructor |
31 |
- * @param[in] callMgr callback manager |
|
32 |
- * @param[in] streamMgr stream manager |
|
30 |
+ * @param[in] mgrs managers |
|
33 | 31 |
* @param[in] dirBase base directory |
34 | 32 |
*/ |
35 |
-Output::Output(CallMgr &callMgr, StreamMgr &streamMgr, |
|
33 |
+Output::Output(Mgrs &mgrs, |
|
36 | 34 |
const Directory &dirBase): |
37 |
- Module(callMgr, streamMgr, dirBase), |
|
38 |
- m_fileInStream(dirBase.getFile("instream"), streamMgr), |
|
35 |
+ Module(mgrs, dirBase), |
|
36 |
+ m_fileInStream(dirBase.getFile("instream"), mgrs.m_streamMgr), |
|
39 | 37 |
m_fileProtocol(dirBase.getFile("protocol")), |
40 | 38 |
m_fileDevice(dirBase.getFile("device")), |
41 | 39 |
m_fileSerCfg(dirBase.getFile("ser_cfg")), |
... | ... |
@@ -53,7 +51,7 @@ Output::~Output() |
53 | 51 |
// clean up |
54 | 52 |
closeDevice(); |
55 | 53 |
m_fileInStream.setStreamRecv(NULL); |
56 |
- m_callMgr.cancelTimeCall(this); |
|
54 |
+ m_mgrs.m_callMgr.cancelTimeCall(this); |
|
57 | 55 |
} |
58 | 56 |
|
59 | 57 |
/// check for update of configuration |
... | ... |
@@ -138,7 +136,7 @@ void Output::closeDevice() |
138 | 136 |
} |
139 | 137 |
|
140 | 138 |
// request time callback in one second (for trying to re-open device) |
141 |
- m_callMgr.requestTimeCall(this, Time::now() + Time(1)); |
|
139 |
+ m_mgrs.m_callMgr.requestTimeCall(this, Time::now() + Time(1)); |
|
142 | 140 |
} |
143 | 141 |
|
144 | 142 |
/// output current frame to device |
... | ... |
@@ -172,7 +170,7 @@ void Output::outputFrame() |
172 | 170 |
closeDevice(); // error -> close device |
173 | 171 |
|
174 | 172 |
// request time callback in one second (for outputting current frame again) |
175 |
- m_callMgr.requestTimeCall(this, Time::now() + Time(1)); |
|
173 |
+ m_mgrs.m_callMgr.requestTimeCall(this, Time::now() + Time(1)); |
|
176 | 174 |
} |
177 | 175 |
|
178 | 176 |
} // namespace Blinker |
... | ... |
@@ -10,17 +10,16 @@ |
10 | 10 |
|
11 | 11 |
#include <BlinkenLib/BlinkenFrame.h> |
12 | 12 |
|
13 |
-#include "CallMgr.h" |
|
14 | 13 |
#include "Device.h" |
15 | 14 |
#include "Directory.h" |
16 | 15 |
#include "File.h" |
17 | 16 |
#include "InStreamFile.h" |
17 |
+#include "Mgrs.h" |
|
18 | 18 |
#include "Module.h" |
19 | 19 |
#include "NameFile.h" |
20 | 20 |
#include "Protocol.h" |
21 | 21 |
#include "ProtocolFile.h" |
22 | 22 |
#include "SerCfgFile.h" |
23 |
-#include "StreamMgr.h" |
|
24 | 23 |
#include "StreamRecv.h" |
25 | 24 |
#include "Time.h" |
26 | 25 |
#include "TimeCallee.h" |
... | ... |
@@ -33,11 +32,10 @@ class Output: public Module, public StreamRecv, public TimeCallee |
33 | 32 |
public: |
34 | 33 |
/** |
35 | 34 |
* @brief constructor |
36 |
- * @param[in] callMgr callback manager |
|
37 |
- * @param[in] streamMgr stream manager |
|
35 |
+ * @param[in] mgrs managers |
|
38 | 36 |
* @param[in] dirBase base directory |
39 | 37 |
*/ |
40 |
- Output(CallMgr &callMgr, StreamMgr &streamMgr, const Directory &dirBase); |
|
38 |
+ Output(Mgrs &mgrs, const Directory &dirBase); |
|
41 | 39 |
|
42 | 40 |
/// virtual destructor |
43 | 41 |
virtual ~Output(); |
... | ... |
@@ -9,17 +9,16 @@ |
9 | 9 |
#include <BlinkenLib/BlinkenFrame.h> |
10 | 10 |
#include <BlinkenLib/BlinkenMovie.h> |
11 | 11 |
|
12 |
-#include "CallMgr.h" |
|
13 | 12 |
#include "Directory.h" |
14 | 13 |
#include "File.h" |
15 | 14 |
#include "InStreamFile.h" |
16 | 15 |
#include "ListTracker.h" |
17 | 16 |
#include "ListTracker_impl.h" |
17 |
+#include "Mgrs.h" |
|
18 | 18 |
#include "Module.h" |
19 | 19 |
#include "OutStreamFile.h" |
20 | 20 |
#include "Player.h" |
21 | 21 |
#include "PlayerMovie.h" |
22 |
-#include "StreamMgr.h" |
|
23 | 22 |
#include "StreamRecv.h" |
24 | 23 |
#include "Time.h" |
25 | 24 |
#include "TimeCallee.h" |
... | ... |
@@ -28,15 +27,14 @@ namespace Blinker { |
28 | 27 |
|
29 | 28 |
/** |
30 | 29 |
* @brief constructor |
31 |
- * @param[in] callMgr callback manager |
|
32 |
- * @param[in] streamMgr stream manager |
|
30 |
+ * @param[in] mgrs managers |
|
33 | 31 |
* @param[in] dirBase base directory |
34 | 32 |
*/ |
35 |
-Player::Player(CallMgr &callMgr, StreamMgr &streamMgr, |
|
33 |
+Player::Player(Mgrs &mgrs, |
|
36 | 34 |
const Directory &dirBase): |
37 |
- Module(callMgr, streamMgr, dirBase), |
|
38 |
- m_fileOutStream(dirBase.getFile("outstream"), streamMgr), |
|
39 |
- m_fileHaltStream(dirBase.getFile("haltstream"), streamMgr), |
|
35 |
+ Module(mgrs, dirBase), |
|
36 |
+ m_fileOutStream(dirBase.getFile("outstream"), mgrs.m_streamMgr), |
|
37 |
+ m_fileHaltStream(dirBase.getFile("haltstream"), mgrs.m_streamMgr), |
|
40 | 38 |
m_playlistTracker(*this, dirBase.getSubdir("playlist")), |
41 | 39 |
m_curValid(false), |
42 | 40 |
m_curEntry(m_playlistTracker.m_list.begin()), |
... | ... |
@@ -54,7 +52,7 @@ Player::Player(CallMgr &callMgr, StreamMgr &streamMgr, |
54 | 52 |
Player::~Player() |
55 | 53 |
{ |
56 | 54 |
// cancel time callback request |
57 |
- m_callMgr.cancelTimeCall(this); |
|
55 |
+ m_mgrs.m_callMgr.cancelTimeCall(this); |
|
58 | 56 |
|
59 | 57 |
// free all movies |
60 | 58 |
m_playlistTracker.clear(); |
... | ... |
@@ -99,7 +97,7 @@ void Player::setFrame(const std::string &stream, stBlinkenFrame *pFrame) |
99 | 97 |
m_remainTime = Time::zero; |
100 | 98 |
} |
101 | 99 |
// cancel time call |
102 |
- m_callMgr.cancelTimeCall(this); |
|
100 |
+ m_mgrs.m_callMgr.cancelTimeCall(this); |
|
103 | 101 |
} |
104 | 102 |
|
105 | 103 |
// halt stream ended -> continue playing |
... | ... |
@@ -109,7 +107,7 @@ void Player::setFrame(const std::string &stream, stBlinkenFrame *pFrame) |
109 | 107 |
// determine time for next frame |
110 | 108 |
m_nextTime = Time::now() + m_remainTime; |
111 | 109 |
// schedule time call |
112 |
- m_callMgr.requestTimeCall(this, m_nextTime); |
|
110 |
+ m_mgrs.m_callMgr.requestTimeCall(this, m_nextTime); |
|
113 | 111 |
} |
114 | 112 |
} |
115 | 113 |
|
... | ... |
@@ -126,7 +124,7 @@ void Player::timeCall() |
126 | 124 |
// leave if time is not yet ready to next frame |
127 | 125 |
if (Time::now() < m_nextTime) { |
128 | 126 |
// request call at time for next frame |
129 |
- m_callMgr.requestTimeCall(this, m_nextTime); |
|
127 |
+ m_mgrs.m_callMgr.requestTimeCall(this, m_nextTime); |
|
130 | 128 |
return; |
131 | 129 |
} |
132 | 130 |
|
... | ... |
@@ -194,7 +192,7 @@ void Player::procFrame() |
194 | 192 |
m_nextTime += m_remainTime; |
195 | 193 |
// request call at time for next frame |
196 | 194 |
if (!m_halted) |
197 |
- m_callMgr.requestTimeCall(this, m_nextTime); |
|
195 |
+ m_mgrs.m_callMgr.requestTimeCall(this, m_nextTime); |
|
198 | 196 |
} |
199 | 197 |
} |
200 | 198 |
|
... | ... |
@@ -11,14 +11,13 @@ |
11 | 11 |
|
12 | 12 |
#include <BlinkenLib/BlinkenMovie.h> |
13 | 13 |
|
14 |
-#include "CallMgr.h" |
|
15 | 14 |
#include "Directory.h" |
16 | 15 |
#include "File.h" |
17 | 16 |
#include "InStreamFile.h" |
18 | 17 |
#include "ListTracker.h" |
18 |
+#include "Mgrs.h" |
|
19 | 19 |
#include "Module.h" |
20 | 20 |
#include "OutStreamFile.h" |
21 |
-#include "StreamMgr.h" |
|
22 | 21 |
#include "StreamRecv.h" |
23 | 22 |
#include "Time.h" |
24 | 23 |
#include "TimeCallee.h" |
... | ... |
@@ -41,11 +40,10 @@ protected: |
41 | 40 |
public: |
42 | 41 |
/** |
43 | 42 |
* @brief constructor |
44 |
- * @param[in] callMgr callback manager |
|
45 |
- * @param[in] streamMgr stream manager |
|
43 |
+ * @param[in] mgrs managers |
|
46 | 44 |
* @param[in] dirBase base directory |
47 | 45 |
*/ |
48 |
- Player(CallMgr &callMgr, StreamMgr &streamMgr, const Directory &dirBase); |
|
46 |
+ Player(Mgrs &mgrs, const Directory &dirBase); |
|
49 | 47 |
|
50 | 48 |
/// virtual destructor |
51 | 49 |
virtual ~Player(); |
... | ... |
@@ -10,27 +10,25 @@ |
10 | 10 |
|
11 | 11 |
#include <BlinkenLib/BlinkenFrame.h> |
12 | 12 |
|
13 |
-#include "CallMgr.h" |
|
14 | 13 |
#include "Directory.h" |
15 | 14 |
#include "File.h" |
16 | 15 |
#include "InStreamFile.h" |
16 |
+#include "Mgrs.h" |
|
17 | 17 |
#include "Module.h" |
18 | 18 |
#include "Printer.h" |
19 |
-#include "StreamMgr.h" |
|
20 | 19 |
#include "StreamRecv.h" |
21 | 20 |
|
22 | 21 |
namespace Blinker { |
23 | 22 |
|
24 | 23 |
/** |
25 | 24 |
* @brief constructor |
26 |
- * @param[in] callMgr callback manager |
|
27 |
- * @param[in] streamMgr stream manager |
|
25 |
+ * @param[in] mgrs managers |
|
28 | 26 |
* @param[in] dirBase base directory |
29 | 27 |
*/ |
30 |
-Printer::Printer(CallMgr &callMgr, StreamMgr &streamMgr, |
|
28 |
+Printer::Printer(Mgrs &mgrs, |
|
31 | 29 |
const Directory &dirBase): |
32 |
- Module(callMgr, streamMgr, dirBase), |
|
33 |
- m_fileInStream(dirBase.getFile("instream"), streamMgr) |
|
30 |
+ Module(mgrs, dirBase), |
|
31 |
+ m_fileInStream(dirBase.getFile("instream"), mgrs.m_streamMgr) |
|
34 | 32 |
{ |
35 | 33 |
// set up |
36 | 34 |
m_fileInStream.setStreamRecv(this); |
... | ... |
@@ -10,12 +10,11 @@ |
10 | 10 |
|
11 | 11 |
#include <BlinkenLib/BlinkenFrame.h> |
12 | 12 |
|
13 |
-#include "CallMgr.h" |
|
14 | 13 |
#include "Directory.h" |
15 | 14 |
#include "File.h" |
16 | 15 |
#include "InStreamFile.h" |
16 |
+#include "Mgrs.h" |
|
17 | 17 |
#include "Module.h" |
18 |
-#include "StreamMgr.h" |
|
19 | 18 |
#include "StreamRecv.h" |
20 | 19 |
|
21 | 20 |
namespace Blinker { |
... | ... |
@@ -26,11 +25,10 @@ class Printer: public Module, public StreamRecv |
26 | 25 |
public: |
27 | 26 |
/** |
28 | 27 |
* @brief constructor |
29 |
- * @param[in] callMgr callback manager |
|
30 |
- * @param[in] streamMgr stream manager |
|
28 |
+ * @param[in] mgrs managers |
|
31 | 29 |
* @param[in] dirBase base directory |
32 | 30 |
*/ |
33 |
- Printer(CallMgr &callMgr, StreamMgr &streamMgr, const Directory &dirBase); |
|
31 |
+ Printer(Mgrs &mgrs, const Directory &dirBase); |
|
34 | 32 |
|
35 | 33 |
/// virtual destructor |
36 | 34 |
virtual ~Printer(); |
... | ... |
@@ -8,30 +8,27 @@ |
8 | 8 |
|
9 | 9 |
#include <BlinkenLib/BlinkenFrame.h> |
10 | 10 |
|
11 |
-#include "CallMgr.h" |
|
12 | 11 |
#include "Directory.h" |
13 | 12 |
#include "File.h" |
14 | 13 |
#include "ListTracker.h" |
15 | 14 |
#include "ListTracker_impl.h" |
15 |
+#include "Mgrs.h" |
|
16 | 16 |
#include "Module.h" |
17 | 17 |
#include "Priority.h" |
18 | 18 |
#include "PriorityInput.h" |
19 | 19 |
#include "OutStreamFile.h" |
20 |
-#include "StreamMgr.h" |
|
21 | 20 |
#include "StreamRecv.h" |
22 | 21 |
|
23 | 22 |
namespace Blinker { |
24 | 23 |
|
25 | 24 |
/** |
26 | 25 |
* @brief constructor |
27 |
- * @param[in] callMgr callback manager |
|
28 |
- * @param[in] streamMgr stream manager |
|
26 |
+ * @param[in] mgrs managers |
|
29 | 27 |
* @param[in] dirBase base directory |
30 | 28 |
*/ |
31 |
-Priority::Priority(CallMgr &callMgr, StreamMgr &streamMgr, |
|
32 |
- const Directory &dirBase): |
|
33 |
- Module(callMgr, streamMgr, dirBase), |
|
34 |
- m_fileOutStream(dirBase.getFile("outstream"), streamMgr), |
|
29 |
+Priority::Priority(Mgrs &mgrs, const Directory &dirBase): |
|
30 |
+ Module(mgrs, dirBase), |
|
31 |
+ m_fileOutStream(dirBase.getFile("outstream"), mgrs.m_streamMgr), |
|
35 | 32 |
m_inListTracker(*this, dirBase.getSubdir("inputs")), |
36 | 33 |
m_itCurIn(m_inListTracker.m_list.rend()) |
37 | 34 |
{ |
... | ... |
@@ -11,13 +11,12 @@ |
11 | 11 |
|
12 | 12 |
#include <BlinkenLib/BlinkenFrame.h> |
13 | 13 |
|
14 |
-#include "CallMgr.h" |
|
15 | 14 |
#include "Directory.h" |
16 | 15 |
#include "File.h" |
17 | 16 |
#include "ListTracker.h" |
17 |
+#include "Mgrs.h" |
|
18 | 18 |
#include "Module.h" |
19 | 19 |
#include "OutStreamFile.h" |
20 |
-#include "StreamMgr.h" |
|
21 | 20 |
|
22 | 21 |
namespace Blinker { |
23 | 22 |
|
... | ... |
@@ -37,11 +36,10 @@ protected: |
37 | 36 |
public: |
38 | 37 |
/** |
39 | 38 |
* @brief constructor |
40 |
- * @param[in] callMgr callback manager |
|
41 |
- * @param[in] streamMgr stream manager |
|
39 |
+ * @param[in] mgrs managers |
|
42 | 40 |
* @param[in] dirBase base directory |
43 | 41 |
*/ |
44 |
- Priority(CallMgr &callMgr, StreamMgr &streamMgr, const Directory &dirBase); |
|
42 |
+ Priority(Mgrs &mgrs, const Directory &dirBase); |
|
45 | 43 |
|
46 | 44 |
/// virtual destructor |
47 | 45 |
virtual ~Priority(); |
... | ... |
@@ -27,7 +27,7 @@ Priority::Input::Input(Priority &priority, const std::string &name, |
27 | 27 |
const Directory &dirBase): |
28 | 28 |
m_priority(priority), |
29 | 29 |
m_name(name), |
30 |
- m_fileInStream(dirBase.getFile("instream"), priority.m_streamMgr), |
|
30 |
+ m_fileInStream(dirBase.getFile("instream"), priority.m_mgrs.m_streamMgr), |
|
31 | 31 |
m_pFrame(NULL) |
32 | 32 |
{ |
33 | 33 |
// set up |
... | ... |
@@ -13,16 +13,15 @@ |
13 | 13 |
#include <BlinkenLib/BlinkenProto.h> |
14 | 14 |
#include <BlinkenLib/BlinkenFrame.h> |
15 | 15 |
|
16 |
-#include "CallMgr.h" |
|
17 | 16 |
#include "Directory.h" |
18 | 17 |
#include "File.h" |
19 | 18 |
#include "IoCallee.h" |
19 |
+#include "Mgrs.h" |
|
20 | 20 |
#include "Module.h" |
21 | 21 |
#include "OutStreamFile.h" |
22 | 22 |
#include "Protocol.h" |
23 | 23 |
#include "ProtocolFile.h" |
24 | 24 |
#include "SettingFile.h" |
25 |
-#include "StreamMgr.h" |
|
26 | 25 |
#include "Time.h" |
27 | 26 |
#include "TimeCallee.h" |
28 | 27 |
|
... | ... |
@@ -39,11 +38,10 @@ protected: |
39 | 38 |
public: |
40 | 39 |
/** |
41 | 40 |
* @brief constructor |
42 |
- * @param[in] callMgr callback manager |
|
43 |
- * @param[in] streamMgr stream manager |
|
41 |
+ * @param[in] mgrs managers |
|
44 | 42 |
* @param[in] dirBase base directory |
45 | 43 |
*/ |
46 |
- Receiver(CallMgr &callMgr, StreamMgr &streamMgr, const Directory &dirBase); |
|
44 |
+ Receiver(Mgrs &mgrs, const Directory &dirBase); |
|
47 | 45 |
|
48 | 46 |
/// virtual destructor |
49 | 47 |
virtual ~Receiver(); |
... | ... |
@@ -13,17 +13,16 @@ |
13 | 13 |
#include <BlinkenLib/BlinkenProto.h> |
14 | 14 |
#include <BlinkenLib/BlinkenFrame.h> |
15 | 15 |
|
16 |
-#include "CallMgr.h" |
|
17 | 16 |
#include "Directory.h" |
18 | 17 |
#include "File.h" |
19 | 18 |
#include "IoCallee.h" |
19 |
+#include "Mgrs.h" |
|
20 | 20 |
#include "Module.h" |
21 | 21 |
#include "OutStreamFile.h" |
22 | 22 |
#include "Protocol.h" |
23 | 23 |
#include "ProtocolFile.h" |
24 | 24 |
#include "Receiver.h" |
25 | 25 |
#include "SettingFile.h" |
26 |
-#include "StreamMgr.h" |
|
27 | 26 |
#include "Time.h" |
28 | 27 |
#include "TimeCallee.h" |
29 | 28 |
|
... | ... |
@@ -31,15 +30,13 @@ namespace Blinker { |
31 | 30 |
|
32 | 31 |
/** |
33 | 32 |
* @brief constructor |
34 |
- * @param[in] callMgr callback manager |
|
35 |
- * @param[in] streamMgr stream manager |
|
33 |
+ * @param[in] mgrs managers |
|
36 | 34 |
* @param[in] dirBase base directory |
37 | 35 |
*/ |
38 | 36 |
template<typename ADDR, typename SOCK> |
39 |
-Receiver<ADDR, SOCK>::Receiver(CallMgr &callMgr, StreamMgr &streamMgr, |
|
40 |
- const Directory &dirBase): |
|
41 |
- Module(callMgr, streamMgr, dirBase), |
|
42 |
- m_fileOutStream(dirBase.getFile("outstream"), streamMgr), |
|
37 |
+Receiver<ADDR, SOCK>::Receiver(Mgrs &mgrs, const Directory &dirBase): |
|
38 |
+ Module(mgrs, dirBase), |
|
39 |
+ m_fileOutStream(dirBase.getFile("outstream"), mgrs.m_streamMgr), |
|
43 | 40 |
m_fileBind(dirBase.getFile("bind")), |
44 | 41 |
m_fileSrc(dirBase.getFile("source")), |
45 | 42 |
m_fileProtocol(dirBase.getFile("protocol")), |
... | ... |
@@ -188,7 +185,7 @@ void Receiver<ADDR, SOCK>::createSock() |
188 | 185 |
} |
189 | 186 |
|
190 | 187 |
// request callback on recepetion |
191 |
- m_callMgr.requestIoReadCall(this, m_pSock); |
|
188 |
+ m_mgrs.m_callMgr.requestIoReadCall(this, m_pSock); |
|
192 | 189 |
|
193 | 190 |
// send new stream request |
194 | 191 |
request(true); |
... | ... |
@@ -204,7 +201,7 @@ void Receiver<ADDR, SOCK>::destroySock() |
204 | 201 |
m_fileOutStream.setFrame(NULL); |
205 | 202 |
|
206 | 203 |
// cancel callback request |
207 |
- m_callMgr.cancelIoReadCall(this, m_pSock); |
|
204 |
+ m_mgrs.m_callMgr.cancelIoReadCall(this, m_pSock); |
|
208 | 205 |
|
209 | 206 |
// destroy socket |
210 | 207 |
if (m_pSock) { |
... | ... |
@@ -322,15 +319,15 @@ void Receiver<ADDR, SOCK>::updateTimeCallback() |
322 | 319 |
{ |
323 | 320 |
if (m_needTimeout) |
324 | 321 |
if (m_needNextReq) |
325 |
- m_callMgr.requestTimeCall(this, m_timeout < m_nextReq ? m_timeout |
|
322 |
+ m_mgrs.m_callMgr.requestTimeCall(this, m_timeout < m_nextReq ? m_timeout |
|
326 | 323 |
: m_nextReq); |
327 | 324 |
else |
328 |
- m_callMgr.requestTimeCall(this, m_timeout); |
|
325 |
+ m_mgrs.m_callMgr.requestTimeCall(this, m_timeout); |
|
329 | 326 |
else |
330 | 327 |
if (m_needNextReq) |
331 |
- m_callMgr.requestTimeCall(this, m_nextReq); |
|
328 |
+ m_mgrs.m_callMgr.requestTimeCall(this, m_nextReq); |
|
332 | 329 |
else |
333 |
- m_callMgr.cancelTimeCall(this); |
|
330 |
+ m_mgrs.m_callMgr.cancelTimeCall(this); |
|
334 | 331 |
} |
335 | 332 |
|
336 | 333 |
} // namespace Blinker |
... | ... |
@@ -9,32 +9,30 @@ |
9 | 9 |
|
10 | 10 |
#include <BlinkenLib/BlinkenFrame.h> |
11 | 11 |
|
12 |
-#include "CallMgr.h" |
|
13 | 12 |
#include "Directory.h" |
14 | 13 |
#include "File.h" |
15 | 14 |
#include "Format.h" |
16 | 15 |
#include "FormatFile.h" |
17 | 16 |
#include "InStreamFile.h" |
17 |
+#include "Mgrs.h" |
|
18 | 18 |
#include "Module.h" |
19 | 19 |
#include "OutStreamFile.h" |
20 | 20 |
#include "Resizer.h" |
21 |
-#include "StreamMgr.h" |
|
22 | 21 |
#include "StreamRecv.h" |
23 | 22 |
|
24 | 23 |
namespace Blinker { |
25 | 24 |
|
26 | 25 |
/** |
27 | 26 |
* @brief constructor |
28 |
- * @param[in] callMgr callback manager |
|
29 |
- * @param[in] streamMgr stream manager |
|
27 |
+ * @param[in] mgrs managers |
|
30 | 28 |
* @param[in] dirBase base directory |
31 | 29 |
*/ |
32 |
-Resizer::Resizer(CallMgr &callMgr, StreamMgr &streamMgr, |
|
30 |
+Resizer::Resizer(Mgrs &mgrs, |
|
33 | 31 |
const Directory &dirBase): |
34 |
- Module(callMgr, streamMgr, dirBase), |
|
35 |
- m_fileInStream(dirBase.getFile("instream"), streamMgr), |
|
32 |
+ Module(mgrs, dirBase), |
|
33 |
+ m_fileInStream(dirBase.getFile("instream"), mgrs.m_streamMgr), |
|
36 | 34 |
m_fileFormat(dirBase.getFile("format")), |
37 |
- m_fileOutStream(dirBase.getFile("outstream"), streamMgr) |
|
35 |
+ m_fileOutStream(dirBase.getFile("outstream"), mgrs.m_streamMgr) |
|
38 | 36 |
{ |
39 | 37 |
// set up |
40 | 38 |
getFormat(); |
... | ... |
@@ -10,15 +10,14 @@ |
10 | 10 |
|
11 | 11 |
#include <BlinkenLib/BlinkenFrame.h> |
12 | 12 |
|
13 |
-#include "CallMgr.h" |
|
14 | 13 |
#include "Directory.h" |
15 | 14 |
#include "File.h" |
16 | 15 |
#include "Format.h" |
17 | 16 |
#include "FormatFile.h" |
18 | 17 |
#include "InStreamFile.h" |
18 |
+#include "Mgrs.h" |
|
19 | 19 |
#include "Module.h" |
20 | 20 |
#include "OutStreamFile.h" |
21 |
-#include "StreamMgr.h" |
|
22 | 21 |
#include "StreamRecv.h" |
23 | 22 |
|
24 | 23 |
namespace Blinker { |
... | ... |
@@ -29,11 +28,10 @@ class Resizer: public Module, public StreamRecv |
29 | 28 |
public: |
30 | 29 |
/** |
31 | 30 |
* @brief constructor |
32 |
- * @param[in] callMgr callback manager |
|
33 |
- * @param[in] streamMgr stream manager |
|
31 |
+ * @param[in] mgrs managers |
|
34 | 32 |
* @param[in] dirBase base directory |
35 | 33 |
*/ |
36 |
- Resizer(CallMgr &callMgr, StreamMgr &streamMgr, const Directory &dirBase); |
|
34 |
+ Resizer(Mgrs &mgrs, const Directory &dirBase); |
|
37 | 35 |
|
38 | 36 |
/// virtual destructor |
39 | 37 |
virtual ~Resizer(); |
... | ... |
@@ -9,31 +9,29 @@ |
9 | 9 |
|
10 | 10 |
#include <BlinkenLib/BlinkenFrame.h> |
11 | 11 |
|
12 |
-#include "CallMgr.h" |
|
13 | 12 |
#include "Directory.h" |
14 | 13 |
#include "File.h" |
15 | 14 |
#include "InStreamFile.h" |
15 |
+#include "Mgrs.h" |
|
16 | 16 |
#include "Module.h" |
17 | 17 |
#include "OutStreamFile.h" |
18 | 18 |
#include "Scaler.h" |
19 | 19 |
#include "Size.h" |
20 |
-#include "StreamMgr.h" |
|
21 | 20 |
#include "StreamRecv.h" |
22 | 21 |
|
23 | 22 |
namespace Blinker { |
24 | 23 |
|
25 | 24 |
/** |
26 | 25 |
* @brief constructor |
27 |
- * @param[in] callMgr callback manager |
|
28 |
- * @param[in] streamMgr stream manager |
|
26 |
+ * @param[in] mgrs managers |
|
29 | 27 |
* @param[in] dirBase base directory |
30 | 28 |
*/ |
31 |
-Scaler::Scaler(CallMgr &callMgr, StreamMgr &streamMgr, |
|
29 |
+Scaler::Scaler(Mgrs &mgrs, |
|
32 | 30 |
const Directory &dirBase): |
33 |
- Module(callMgr, streamMgr, dirBase), |
|
34 |
- m_fileInStream(dirBase.getFile("instream"), streamMgr), |
|
31 |
+ Module(mgrs, dirBase), |
|
32 |
+ m_fileInStream(dirBase.getFile("instream"), mgrs.m_streamMgr), |
|
35 | 33 |
m_fileSize(dirBase.getFile("size")), |
36 |
- m_fileOutStream(dirBase.getFile("outstream"), streamMgr) |
|
34 |
+ m_fileOutStream(dirBase.getFile("outstream"), mgrs.m_streamMgr) |
|
37 | 35 |
{ |
38 | 36 |
// set up |
39 | 37 |
getSize(); |
... | ... |
@@ -10,15 +10,14 @@ |
10 | 10 |
|
11 | 11 |
#include <BlinkenLib/BlinkenFrame.h> |
12 | 12 |
|
13 |
-#include "CallMgr.h" |
|
14 | 13 |
#include "Directory.h" |
15 | 14 |
#include "File.h" |
16 | 15 |
#include "InStreamFile.h" |
16 |
+#include "Mgrs.h" |
|
17 | 17 |
#include "Module.h" |
18 | 18 |
#include "OutStreamFile.h" |
19 | 19 |
#include "Size.h" |
20 | 20 |
#include "SizeFile.h" |
21 |
-#include "StreamMgr.h" |
|
22 | 21 |
#include "StreamRecv.h" |
23 | 22 |
|
24 | 23 |
namespace Blinker { |
... | ... |
@@ -29,11 +28,10 @@ class Scaler: public Module, public StreamRecv |
29 | 28 |
public: |
30 | 29 |
/** |
31 | 30 |
* @brief constructor |
32 |
- * @param[in] callMgr callback manager |
|
33 |
- * @param[in] streamMgr stream manager |
|
31 |
+ * @param[in] mgrs managers |
|
34 | 32 |
* @param[in] dirBase base directory |
35 | 33 |
*/ |
36 |
- Scaler(CallMgr &callMgr, StreamMgr &streamMgr, const Directory &dirBase); |
|
34 |
+ Scaler(Mgrs &mgrs, const Directory &dirBase); |
|
37 | 35 |
|
38 | 36 |
/// virtual destructor |
39 | 37 |
virtual ~Scaler(); |
... | ... |
@@ -13,17 +13,16 @@ |
13 | 13 |
#include <BlinkenLib/BlinkenProto.h> |
14 | 14 |
#include <BlinkenLib/BlinkenFrame.h> |
15 | 15 |
|
16 |
-#include "CallMgr.h" |
|
17 | 16 |
#include "Directory.h" |
18 | 17 |
#include "File.h" |
19 | 18 |
#include "InStreamFile.h" |
20 | 19 |
#include "IoCallee.h" |
20 |
+#include "Mgrs.h" |
|
21 | 21 |
#include "Module.h" |
22 | 22 |
#include "ListTracker.h" |
23 | 23 |
#include "Protocol.h" |
24 | 24 |
#include "ProtocolFile.h" |
25 | 25 |
#include "SettingFile.h" |
26 |
-#include "StreamMgr.h" |
|
27 | 26 |
#include "StreamRecv.h" |
28 | 27 |
#include "Time.h" |
29 | 28 |
#include "TimeCallee.h" |
... | ... |
@@ -51,11 +50,10 @@ protected: |
51 | 50 |
public: |
52 | 51 |
/** |
53 | 52 |
* @brief constructor |
54 |
- * @param[in] callMgr callback manager |
|
55 |
- * @param[in] streamMgr stream manager |
|
53 |
+ * @param[in] mgrs managers |
|
56 | 54 |
* @param[in] dirBase base directory |
57 | 55 |
*/ |
58 |
- Sender(CallMgr &callMgr, StreamMgr &streamMgr, const Directory &dirBase); |
|
56 |
+ Sender(Mgrs &mgrs, const Directory &dirBase); |
|
59 | 57 |
|
60 | 58 |
/// virtual destructor |
61 | 59 |
virtual ~Sender(); |
... | ... |
@@ -13,13 +13,13 @@ |
13 | 13 |
#include <BlinkenLib/BlinkenProto.h> |
14 | 14 |
#include <BlinkenLib/BlinkenFrame.h> |
15 | 15 |
|
16 |
-#include "CallMgr.h" |
|
17 | 16 |
#include "Directory.h" |
18 | 17 |
#include "File.h" |
19 | 18 |
#include "InStreamFile.h" |
20 | 19 |
#include "IoCallee.h" |
21 | 20 |
#include "ListTracker.h" |
22 | 21 |
#include "ListTracker_impl.h" |
22 |
+#include "Mgrs.h" |
|
23 | 23 |
#include "Module.h" |
24 | 24 |
#include "Protocol.h" |
25 | 25 |
#include "ProtocolFile.h" |
... | ... |
@@ -27,7 +27,6 @@ |
27 | 27 |
#include "SenderDest.h" |
28 | 28 |
#include "SenderDest_impl.h" |
29 | 29 |
#include "SettingFile.h" |
30 |
-#include "StreamMgr.h" |
|
31 | 30 |
#include "StreamRecv.h" |
32 | 31 |
#include "Time.h" |
33 | 32 |
#include "TimeCallee.h" |
... | ... |
@@ -36,15 +35,13 @@ namespace Blinker { |
36 | 35 |
|
37 | 36 |
/** |
38 | 37 |
* @brief constructor |
39 |
- * @param[in] callMgr callback manager |
|
40 |
- * @param[in] streamMgr stream manager |
|
38 |
+ * @param[in] mgrs managers |
|
41 | 39 |
* @param[in] dirBase base directory |
42 | 40 |
*/ |
43 | 41 |
template<typename ADDR, typename SOCK> |
44 |
-Sender<ADDR, SOCK>::Sender(CallMgr &callMgr, StreamMgr &streamMgr, |
|
45 |
- const Directory &dirBase): |
|
46 |
- Module(callMgr, streamMgr, dirBase), |
|
47 |
- m_fileInStream(dirBase.getFile("instream"), streamMgr), |
|
42 |
+Sender<ADDR, SOCK>::Sender(Mgrs &mgrs, const Directory &dirBase): |
|
43 |
+ Module(mgrs, dirBase), |
|
44 |
+ m_fileInStream(dirBase.getFile("instream"), mgrs.m_streamMgr), |
|
48 | 45 |
m_fileBind(dirBase.getFile("bind")), |
49 | 46 |
m_fileProtocol(dirBase.getFile("protocol")), |
50 | 47 |
m_pSock(NULL), |
... | ... |
@@ -77,7 +74,7 @@ Sender<ADDR, SOCK>::~Sender() |
77 | 74 |
// detach from input stream |
78 | 75 |
m_fileInStream.setStreamRecv(NULL); |
79 | 76 |
// cancel time callback |
80 |
- m_callMgr.cancelTimeCall(this); |
|
77 |
+ m_mgrs.m_callMgr.cancelTimeCall(this); |
|
81 | 78 |
} |
82 | 79 |
|
83 | 80 |
/// check for update of configuration |
... | ... |
@@ -204,7 +201,7 @@ void Sender<ADDR, SOCK>::createSock() |
204 | 201 |
} |
205 | 202 |
|
206 | 203 |
// request callback on recepetion |
207 |
- m_callMgr.requestIoReadCall(this, m_pSock); |
|
204 |
+ m_mgrs.m_callMgr.requestIoReadCall(this, m_pSock); |
|
208 | 205 |
|
209 | 206 |
// send current protocol data to all destinations |
210 | 207 |
sendAllProto(); |
... | ... |
@@ -223,7 +220,7 @@ void Sender<ADDR, SOCK>::destroySock() |
223 | 220 |
m_dynDests.clear(); |
224 | 221 |
|
225 | 222 |
// cancel callback request |
226 |
- m_callMgr.cancelIoReadCall(this, m_pSock); |
|
223 |
+ m_mgrs.m_callMgr.cancelIoReadCall(this, m_pSock); |
|
227 | 224 |
|
228 | 225 |
// destroy socket |
229 | 226 |
if (m_pSock) { |
... | ... |
@@ -260,7 +257,7 @@ void Sender<ADDR, SOCK>::sendAllProto() |
260 | 257 |
sendDests(&m_data); |
261 | 258 |
|
262 | 259 |
// request time callback in one second |
263 |
- m_callMgr.requestTimeCall(this, Time::now() + Time(1)); |
|
260 |
+ m_mgrs.m_callMgr.requestTimeCall(this, Time::now() + Time(1)); |
|
264 | 261 |
} |
265 | 262 |
|
266 | 263 |
/// send "no frame" to all destinations |
... | ... |
@@ -274,7 +271,7 @@ void Sender<ADDR, SOCK>::sendAllNoFrame() |
274 | 271 |
sendDests(&m_noFrameData); |
275 | 272 |
|
276 | 273 |
// request time callback in one second |
277 |
- m_callMgr.requestTimeCall(this, Time::now() + Time(1)); |
|
274 |
+ m_mgrs.m_callMgr.requestTimeCall(this, Time::now() + Time(1)); |
|
278 | 275 |
} |
279 | 276 |
|
280 | 277 |
/** |
... | ... |
@@ -6,10 +6,10 @@ |
6 | 6 |
#include <iostream> |
7 | 7 |
#include <string> |
8 | 8 |
|
9 |
-#include "CallMgr.h" |
|
10 | 9 |
#include "Canvas.h" |
11 | 10 |
#include "Directory.h" |
12 | 11 |
#include "FlexiPix.h" |
12 |
+#include "Mgrs.h" |
|
13 | 13 |
#include "ModuleMgr.h" |
14 | 14 |
#include "ModuleMgr_impl.h" |
15 | 15 |
#include "Output.h" |
... | ... |
@@ -18,7 +18,6 @@ |
18 | 18 |
#include "Priority.h" |
19 | 19 |
#include "Resizer.h" |
20 | 20 |
#include "Scaler.h" |
21 |
-#include "StreamMgr.h" |
|
22 | 21 |
#include "Udp4Receiver.h" |
23 | 22 |
#include "Udp4Sender.h" |
24 | 23 |
|
... | ... |
@@ -26,33 +25,22 @@ using namespace Blinker; |
26 | 25 |
|
27 | 26 |
void run(const std::string &dirConfig) |
28 | 27 |
{ |
29 |
- Directory dirCfg(dirConfig); |
|
30 |
- |
|
31 |
- CallMgr callMgr; |
|
32 |
- StreamMgr streamMgr; |
|
33 |
- |
|
34 |
- ModuleMgr<Canvas> canvasMgr(callMgr, streamMgr, |
|
35 |
- dirCfg.getSubdir("canvases")); |
|
36 |
- ModuleMgr<FlexiPix> flexipixMgr(callMgr, streamMgr, |
|
37 |
- dirCfg.getSubdir("flexipixes")); |
|
38 |
- ModuleMgr<Output> outputMgr(callMgr, streamMgr, |
|
39 |
- dirCfg.getSubdir("outputs")); |
|
40 |
- ModuleMgr<Player> playerMgr(callMgr, streamMgr, |
|
41 |
- dirCfg.getSubdir("players")); |
|
42 |
- ModuleMgr<Printer> printerMgr(callMgr, streamMgr, |
|
43 |
- dirCfg.getSubdir("printers")); |
|
44 |
- ModuleMgr<Priority> priorityMgr(callMgr, streamMgr, |
|
45 |
- dirCfg.getSubdir("priorities")); |
|
46 |
- ModuleMgr<Resizer> resizerMgr(callMgr, streamMgr, |
|
47 |
- dirCfg.getSubdir("resizers")); |
|
48 |
- ModuleMgr<Scaler> scalerMgr(callMgr, streamMgr, |
|
49 |
- dirCfg.getSubdir("scalers")); |
|
50 |
- ModuleMgr<Udp4Receiver> udp4ReceiverMgr(callMgr, streamMgr, |
|
51 |
- dirCfg.getSubdir("udp4receivers")); |
|
52 |
- ModuleMgr<Udp4Sender> udp4SenderMgr(callMgr, streamMgr, |
|
53 |
- dirCfg.getSubdir("udp4senders")); |
|
54 |
- |
|
55 |
- callMgr.run(); |
|
28 |
+ Directory cfg(dirConfig); |
|
29 |
+ |
|
30 |
+ Mgrs mgrs; |
|
31 |
+ |
|
32 |
+ ModuleMgr<Canvas> canvases(mgrs, cfg.getSubdir("canvases")); |
|
33 |
+ ModuleMgr<FlexiPix> flexipixes(mgrs, cfg.getSubdir("flexipixes")); |
|
34 |
+ ModuleMgr<Output> outputs(mgrs, cfg.getSubdir("outputs")); |
|
35 |
+ ModuleMgr<Player> players(mgrs, cfg.getSubdir("players")); |
|
36 |
+ ModuleMgr<Printer> printers(mgrs, cfg.getSubdir("printers")); |
|
37 |
+ ModuleMgr<Priority> priorities(mgrs, cfg.getSubdir("priorities")); |
|
38 |
+ ModuleMgr<Resizer> resizers(mgrs, cfg.getSubdir("resizers")); |
|
39 |
+ ModuleMgr<Scaler> scalers(mgrs, cfg.getSubdir("scalers")); |
|
40 |
+ ModuleMgr<Udp4Receiver> udp4Receivers(mgrs, cfg.getSubdir("udp4receivers")); |
|
41 |
+ ModuleMgr<Udp4Sender> udp4Senders(mgrs, cfg.getSubdir("udp4senders")); |
|
42 |
+ |
|
43 |
+ mgrs.m_callMgr.run(); |
|
56 | 44 |
} |
57 | 45 |
|
58 | 46 |
int main(int argc, const char *argv[]) |
59 | 47 |