diff options
author | Matthias P. Braendli <matthias.braendli@mpb.li> | 2014-01-24 14:11:19 +0100 |
---|---|---|
committer | Matthias P. Braendli <matthias.braendli@mpb.li> | 2014-01-24 14:11:19 +0100 |
commit | f75ac25e6e93ab167b5f3cfdecbbbf286fdc4fed (patch) | |
tree | 6bcc8fe0786404fc3793dbfc53742b12380270c1 /src/DabMux.cpp | |
parent | 63636d3d211b92e5adb9653db9b06b62278cb889 (diff) | |
download | dabmux-f75ac25e6e93ab167b5f3cfdecbbbf286fdc4fed.tar.gz dabmux-f75ac25e6e93ab167b5f3cfdecbbbf286fdc4fed.tar.bz2 dabmux-f75ac25e6e93ab167b5f3cfdecbbbf286fdc4fed.zip |
Implement remote control and global_stats, and add to configuration
Diffstat (limited to 'src/DabMux.cpp')
-rw-r--r-- | src/DabMux.cpp | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/src/DabMux.cpp b/src/DabMux.cpp index d1198f1..4e10287 100644 --- a/src/DabMux.cpp +++ b/src/DabMux.cpp @@ -123,7 +123,7 @@ typedef DWORD32 uint32_t; using namespace std; /* Global stats server */ -StatsServer global_stats(12720); //TODO define port +StatsServer* global_stats; static unsigned char Padding_FIB[] = { 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -288,6 +288,8 @@ int main(int argc, char *argv[]) vector<dabOutput*>::iterator output; dabProtection* protection = NULL; + BaseRemoteController* rc; + unsigned int currentFrame; int returnCode = 0; int result; @@ -312,6 +314,8 @@ int main(int argc, char *argv[]) bool enableTist = false; unsigned timestamp = 0; + int statsserverport = 0; + unsigned long time_seconds = 0; struct timeval mnsc_time; @@ -337,7 +341,7 @@ int main(int argc, char *argv[]) string conf_file = argv[2]; parse_configfile(conf_file, outputs, ensemble, &enableTist, &FICL, - &factumAnalyzer, &limit); + &factumAnalyzer, &limit, rc, &statsserverport); printSubchannels(ensemble->subchannels); cerr << endl; @@ -361,6 +365,13 @@ int main(int argc, char *argv[]) } } + if (statsserverport != 0) { + global_stats = new StatsServer(statsserverport); + } + else { + global_stats = new StatsServer(); + } + etiLog.log(info, "CRC-DABMUX starting up"); |