69ac12fcb8ee5ac55fadc04d3a96a3a7c2d0038a
Stefan Schuermans added missing file header

Stefan Schuermans authored 12 years ago

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) 
Stefan Schuermans added MCUF sender modules t...

Stefan Schuermans authored 12 years ago

6) #include <iostream>
7) #include <string>
8) 
Stefan Schuermans first version of canvas mod...

Stefan Schuermans authored 12 years ago

9) #include "Canvas.h"
Stefan Schuermans first version, plays videos...

Stefan Schuermans authored 13 years ago

10) #include "Directory.h"
Stefan Schuermans added flexipix output suppo...

Stefan Schuermans authored 12 years ago

11) #include "FlexiPix.h"
Stefan Schuermans put all managers in one str...

Stefan Schuermans authored 12 years ago

12) #include "Mgrs.h"
Stefan Schuermans implemented module manager...

Stefan Schuermans authored 13 years ago

13) #include "ModuleMgr.h"
Stefan Schuermans split ModuleMgr.h into decl...

Stefan Schuermans authored 12 years ago

14) #include "ModuleMgr_impl.h"
Stefan Schuermans implement operator connecti...

Stefan Schuermans authored 12 years ago

15) #include "OpPrinter.h"
Stefan Schuermans implemented output module t...

Stefan Schuermans authored 12 years ago

16) #include "Output.h"
Stefan Schuermans first version, plays videos...

Stefan Schuermans authored 13 years ago

17) #include "Player.h"
Stefan Schuermans implemented stream printer...

Stefan Schuermans authored 13 years ago

18) #include "Printer.h"
Stefan Schuermans implemented priority based...

Stefan Schuermans authored 12 years ago

19) #include "Priority.h"
Stefan Schuermans implemented resizer module

Stefan Schuermans authored 12 years ago

20) #include "Resizer.h"
Stefan Schuermans implemented scaler module

Stefan Schuermans authored 12 years ago

21) #include "Scaler.h"
Stefan Schuermans begin of phone connector

Stefan Schuermans authored 12 years ago

22) #include "Udp4Phone.h"
Stefan Schuermans implemented stream receiver

Stefan Schuermans authored 12 years ago

23) #include "Udp4Receiver.h"
Stefan Schuermans added MCUF sender modules t...

Stefan Schuermans authored 12 years ago

24) #include "Udp4Sender.h"
Stefan Schuermans first version, plays videos...

Stefan Schuermans authored 13 years ago

25) 
26) using namespace Blinker;
27) 
Stefan Schuermans added MCUF sender modules t...

Stefan Schuermans authored 12 years ago

28) void run(const std::string &dirConfig)
Stefan Schuermans first version, plays videos...

Stefan Schuermans authored 13 years ago

29) {
Stefan Schuermans put all managers in one str...

Stefan Schuermans authored 12 years ago

30)   Directory cfg(dirConfig);
31) 
32)   Mgrs mgrs;
33) 
Stefan Schuermans make modules know their name

Stefan Schuermans authored 12 years ago

34) #define MODULEMGR(TYPE, CLASS) \
35)   ModuleMgr<TYPE> CLASS(#CLASS, mgrs, cfg.getSubdir(#CLASS))
36) 
37)   MODULEMGR(Canvas,       canvases);
38)   MODULEMGR(FlexiPix,     flexipixes);
39)   MODULEMGR(OpPrinter,    opprinters);
40)   MODULEMGR(Output,       outputs);
41)   MODULEMGR(Player,       players);
42)   MODULEMGR(Printer,      printers);
43)   MODULEMGR(Priority,     priorities);
44)   MODULEMGR(Resizer,      resizers);
45)   MODULEMGR(Scaler,       scalers);
46)   MODULEMGR(Udp4Phone,    udp4phones);
47)   MODULEMGR(Udp4Receiver, udp4receivers);
48)   MODULEMGR(Udp4Sender,   udp4senders);
49) 
50) #undef MODULEMGR
Stefan Schuermans put all managers in one str...

Stefan Schuermans authored 12 years ago

51) 
52)   mgrs.m_callMgr.run();
Stefan Schuermans added MCUF sender modules t...

Stefan Schuermans authored 12 years ago

53) }
54) 
55) int main(int argc, const char *argv[])
56) {
57)   const char * dirConfig;
58) 
59)   if (argc < 2) {
Stefan Schuermans added flexipix output suppo...

Stefan Schuermans authored 12 years ago

60)     std::cerr << "Blinker" << std::endl
61)               << "configuration:"BLINKER_CONFIG << std::endl
62)               << "usage: " << argv[0] << " config-directory" << std::endl;
Stefan Schuermans added MCUF sender modules t...

Stefan Schuermans authored 12 years ago

63)     return 2;
64)   }
65)   dirConfig = argv[1];
66) 
67)   run(dirConfig);