2 Copyright 2004-2005 Chris Tallon
3 Copyright 2012 Marten Richter
5 This file is part of VOMP.
7 VOMP 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.
12 VOMP is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
17 You should have received a copy of the GNU General Public License
18 along with VOMP. If not, see <https://www.gnu.org/licenses/>.
27 #define _WIN32_WINNT 0x501
31 #include "vompreswin.h"
42 #include "windowsosd.h"
44 #include "osdwinpixel.h"
46 #include "osdwinvector.h"
50 #include "vsleeptimer.h"
51 #include "messagequeue.h"
53 void sighandler(int signalReceived);
54 void shutdown(int code);
56 // Global variables --------------------------------------------------------------------------------------------------
69 Sleeptimer* sleeptimer;
70 std::string commandLineServer;
72 bool wnd_fullscreen=false;
73 bool wnd_topmost=false;
74 RECT wnd_fs_rect={20,20,768+20,576+20};
75 RECT wnd_fs_rect_client={0,0,768,576};
76 //OSVERSIONINFO windows_ver; //attempt to distigsh windows versions
82 typedef UINT (WINAPI *GETRAWINPUTDATAFNC) (HRAWINPUT,UINT,LPVOID,PUINT,UINT);
83 typedef UINT (WINAPI *REGISTERRAWINPUTDEVICEFNC) (PCRAWINPUTDEVICE,UINT,UINT);
85 GETRAWINPUTDATAFNC dynGetRawInputData=NULL;
86 REGISTERRAWINPUTDEVICEFNC dynRegisterRawInputDevices=NULL;
90 MessageQueue* messageQueue;
93 void MILLISLEEP(ULONG a)
100 int getClockRealTime(struct timespec *tp){
104 GetSystemTime(&systime);
105 SystemTimeToFileTime(&systime, (FILETIME*)&filetime);
106 tp->tv_sec = (filetime - WINDOWS_TIME_BASE_OFFSET) / (10 * 1000 * 1000);
107 tp->tv_nsec = ((filetime - WINDOWS_TIME_BASE_OFFSET) % (10 * 1000 * 1000)) * 100;
111 DWORD WINAPI controlthreadStart(void *arg)
118 void LoadRemoteFunctions() {
119 user32dll=LoadLibrary("user32.dll");
120 if (user32dll!=NULL) {
121 dynGetRawInputData=(GETRAWINPUTDATAFNC)GetProcAddress(user32dll,"GetRawInputData");
122 if (dynGetRawInputData!=NULL) {
123 dynRegisterRawInputDevices=(REGISTERRAWINPUTDEVICEFNC)GetProcAddress(user32dll,"RegisterRawInputDevices");
124 if (dynRegisterRawInputDevices!=NULL) {
131 bool InitApp(HINSTANCE hinst,int cmdshow);
133 HWND win_main;//global window handle
134 HWND win;//global child window handle
137 #define ERROR_MSG(str) MessageBox(win_main,str,"Error!",MB_OK|MB_ICONWARNING)
138 INT WINAPI WinMain( HINSTANCE hinst , HINSTANCE previnst, LPSTR cmdline, int cmdshow)
141 //On Windows we have to init a window, we use DXUT
142 LoadRemoteFunctions();
143 if (!InitApp(hinst,cmdshow)) return false;
144 //Starting Network support
146 int result = WSAStartup(MAKEWORD(2,2),&wsadat);
147 if (result!=NO_ERROR) {
148 ERROR_MSG("Initialising WinSocked: Error at WSAStartup()\n");
152 result= CoInitializeEx(NULL,COINIT_MULTITHREADED );//Initialize COM for DirectShow
154 ERROR_MSG("Initialising COM: Error at Coinitialize()\n");
161 // Init global vars ------------------------------------------------------------------------------------------------
164 remote = new InputMan();
166 timers = new Timers();
167 osd = new Osd_TYPE();
169 video = new VideoWin();
170 audio = new AudioWin();
171 control = new Control();
173 sleeptimer = new Sleeptimer();
175 if (!logger || !remote || !led || !osd || !video || !audio || !control || !sleeptimer)
177 ERROR_MSG("Could not create objects. Memory problems?\n");
183 messageQueue = control;
185 // Get logging module started --------------------------------------------------------------------------------------
187 if (!logger->init(Log::DEBUG, "vompwin.log", true))
189 ERROR_MSG("Could not initialise log object. Aborting.\n");
195 logger->log("Core", Log::INFO, "Starting up...");
199 // Init modules ----------------------------------------------------------------------------------------------------
202 success = remote->init();
205 logger->log("Core", Log::INFO, "Remote module initialised");
209 logger->log("Core", Log::EMERG, "Remote module failed to initialise");
215 inputWin = remote->getInputWin();
217 success = led->init(0);
220 logger->log("Core", Log::INFO, "LED module initialised");
224 logger->log("Core", Log::EMERG, "LED module failed to initialise");
230 success = timers->init();
233 logger->log("Core", Log::INFO, "Timers module initialised");
237 logger->log("Core", Log::EMERG, "Timers module failed to initialise");
243 UCHAR videoFormat = Video::PAL; // PALNTSC FIXME.
245 success = video->init(videoFormat);
248 logger->log("Core", Log::INFO, "Video module initialised");
252 logger->log("Core", Log::EMERG, "Video module failed to initialise");
258 dynamic_cast<WindowsOsd*>(osd)->setWindow(win);
259 success = osd->init();
262 logger->log("Core", Log::INFO, "OSD module initialised");
266 logger->log("Core", Log::EMERG, "OSD module failed to initialise");
271 video->setDefaultAspect();
273 success = audio->init(Audio::MPEG2_PES);
276 logger->log("Core", Log::INFO, "Audio module initialised");
280 logger->log("Core", Log::EMERG, "Audio module failed to initialise");
286 success = vdr->init();
289 logger->log("Core", Log::INFO, "VDR module initialised");
293 logger->log("Core", Log::EMERG, "VDR module failed to initialise");
299 success = control->init();
302 logger->log("Core", Log::INFO, "Control module initialised");
306 logger->log("Core", Log::EMERG, "Control module failed to initialise");
312 // Other init ------------------------------------------------------------------------------------------------------
314 logger->log("Core", Log::NOTICE, "Startup successful");
316 // Run main loop ---------------------------------------------------------------------------------------------------
318 // Ok, all major device components and other bits are loaded and ready
319 lastmousemove=timeGetTime();
321 HANDLE controlthread;
322 controlthread= CreateThread(NULL, 0, controlthreadStart, NULL,0,
325 message.message=WM_NULL;
327 while(run && WaitForSingleObject(controlthread,0)==WAIT_TIMEOUT) {
328 if (PeekMessage(&message, NULL, 0,0,PM_REMOVE)!=0) {
329 if (TranslateAccelerator(win_main,acc,&message)==NULL) {
330 TranslateMessage(&message);
331 DispatchMessage(&message);
332 switch (message.message) {
334 run=false; //TODO post exit to control Messages
338 //Render, moved to OSD !
340 //((OsdWin*)osd)->Render();
343 // When that returns quit ------------------------------------------------------------------------------------------
344 WaitForSingleObject(controlthread,INFINITE);
347 if (user32dll) FreeModule(user32dll);
352 bool TranslateMousePosition(POINT *pos) {
355 ScreenToClient(win,pos);
356 GetClientRect(win,&clientrect);
357 if (!PtInRect(&clientrect,*pos)) return false;//Don't pass it further
358 pos->x=((double)pos->x)/((double) (clientrect.right-clientrect.left))
359 *((double)Video::getInstance()->getScreenWidth());
360 pos->y=((double)pos->y)/((double) (clientrect.bottom-clientrect.top))
361 *((double)Video::getInstance()->getScreenHeight());
368 void CalculateWindowSize(RECT * size,ULONG size_mode) {
371 DWORD adjheight,adjwidth;
372 if (!wnd_fullscreen) {
373 DWORD flags =WS_VISIBLE | WS_POPUP | WS_CAPTION | WS_SYSMENU
374 |WS_MINIMIZEBOX | WS_SIZEBOX |WS_MAXIMIZEBOX;
375 RECT wnted={50,50,150,150};
376 AdjustWindowRect(&wnted,flags ,false);
377 adjwidth=-wnted.left+wnted.right-100;
378 adjheight=-wnted.top+wnted.bottom-100;
380 adjwidth=adjheight=0;
382 width=size->right-size->left-adjwidth;
383 height=size->bottom-size->top-adjheight;
384 UCHAR mode=Video::PAL;
385 UCHAR aspect=Video::ASPECT4X3;
386 UCHAR tvsize=Video::ASPECT4X3;
388 mode=video->getMode();
389 aspect=((VideoWin*)video)->getAspectRatio();
390 tvsize=((VideoWin*)video)->getPseudoTVsize();
393 double aspectrt=4./3.;
394 if (tvsize==Video::ASPECT16X9) {
395 if (aspect==Video::ASPECT16X9) {
396 aspectrt=4./3.; //looks strange, but it is a 16:9 tv
397 } else if (aspect==Video::ASPECT4X3) {
398 aspectrt=4./3./(16./9.)*(4./3.); //I hope this is correct
400 } else if (tvsize==Video::ASPECT4X3) {
401 if (aspect==Video::ASPECT16X9) {
402 if (mode!=Video::NORMAL) {
407 } else if (aspect==Video::ASPECT4X3) {
411 if (!wnd_fullscreen) {
414 case WMSZ_BOTTOMRIGHT:
417 width=(ULONG)(((double)height)*aspectrt);
418 size->right=size->left+width+adjwidth;
420 case WMSZ_BOTTOMLEFT:
422 width=(ULONG)(((double)height)*aspectrt);
423 size->left=size->right-width-adjwidth;
427 height=(ULONG)(((double)width)/aspectrt);
428 size->bottom=size->top+height+adjheight;
431 MoveWindow(win,0,0,width,height,TRUE);
433 RECT newrect={0,0,width,height};
435 if ((ULONG)(((double)height)*aspectrt)>width) {
436 newlength=(ULONG)(((double)width)/aspectrt);
437 newrect.top+=(height-newlength)/2;
438 newrect.bottom-=(height-newlength);
440 newlength=(ULONG)(((double)height)*aspectrt);
441 newrect.left+=(width-newlength)/2;
442 newrect.right-=(width-newlength);
444 MoveWindow(win,newrect.left,newrect.top,newrect.right,newrect.bottom,TRUE);
449 void AdjustWindow() {
450 if (!wnd_fullscreen) {
452 GetWindowRect(win_main,&winrect);
453 CalculateWindowSize(&winrect,WMSZ_BOTTOM);
454 MoveWindow(win_main,winrect.left,
455 winrect.top,winrect.right-winrect.left,winrect.bottom-winrect.top,true);
458 GetWindowRect(win_main,&winrect);
459 CalculateWindowSize(&winrect,WMSZ_BOTTOM);
464 void ToggleFullscreen() {
465 if (wnd_fullscreen) {
466 wnd_fullscreen=false;
467 SetWindowLong(win_main,GWL_STYLE,WS_VISIBLE | WS_POPUP | WS_CAPTION | WS_SYSMENU
468 |WS_MINIMIZEBOX | WS_SIZEBOX |WS_MAXIMIZEBOX);
469 SetWindowPos(win_main,NULL,0,0,0,0,SWP_NOMOVE | SWP_NOSIZE | SWP_NOZORDER | SWP_FRAMECHANGED);
471 SetWindowPos(win_main,wnd_topmost?HWND_TOPMOST:HWND_TOP,wnd_fs_rect.left,wnd_fs_rect.top,
472 wnd_fs_rect.right-wnd_fs_rect.left,
473 wnd_fs_rect.bottom-wnd_fs_rect.top,
474 SWP_DRAWFRAME | SWP_FRAMECHANGED);
475 MoveWindow(win,wnd_fs_rect_client.left,wnd_fs_rect_client.top,
476 wnd_fs_rect_client.right-wnd_fs_rect_client.left,
477 wnd_fs_rect_client.bottom-wnd_fs_rect_client.top,TRUE);
480 GetWindowRect(win_main,&wnd_fs_rect);
481 GetWindowRect(win,&wnd_fs_rect_client);
482 SetWindowLong(win_main,GWL_STYLE,WS_VISIBLE | WS_POPUP );
483 SetWindowPos(win_main,NULL,0,0,0,0,SWP_NOMOVE | SWP_NOSIZE | SWP_NOZORDER | SWP_FRAMECHANGED);
484 HMONITOR monitor=MonitorFromWindow(win_main,MONITOR_DEFAULTTONEAREST);
486 moninfo.cbSize=sizeof(moninfo);
488 if (!GetMonitorInfo(monitor,&moninfo)) return ;
489 SetWindowPos(win_main,wnd_topmost?HWND_TOPMOST:HWND_TOP,moninfo.rcMonitor.left,moninfo.rcMonitor.top,
490 moninfo.rcMonitor.right,moninfo.rcMonitor.bottom,SWP_FRAMECHANGED);
499 void ToggleTopmost() {
500 wnd_topmost=!wnd_topmost;
501 SetWindowPos(win_main,wnd_topmost?HWND_TOPMOST:HWND_NOTOPMOST,0,0,
502 0,0,SWP_NOMOVE | SWP_NOSIZE);
505 void CursorUpdate() {
507 GetCursorPos(&cursorpos);
509 asswind=WindowFromPoint(cursorpos);
510 if (asswind!=win_main && asswind!=win) {
511 return ; //not our responsibility
513 if ((timeGetTime()-lastmousemove)<4000 || cmenu) {
514 SetCursor(LoadCursor(NULL,IDC_ARROW));
520 bool ContextMenu(HWND wind,int x,int y) {
523 ScreenToClient(wind,&p);
524 GetClientRect(wind,&clientrect);
525 if (!PtInRect(&clientrect,p)) return false;
526 ClientToScreen(wind,&p);
529 menu=LoadMenu(hinstance,MAKEINTRESOURCE(VOMPMENU));
530 popup=GetSubMenu(menu,0);
531 if (wnd_fullscreen) {
532 CheckMenuItem(popup,VOMP_FULL_SCREEN,MF_BYCOMMAND|MF_CHECKED);
534 CheckMenuItem(popup,VOMP_FULL_SCREEN,MF_BYCOMMAND|MF_UNCHECKED);
537 CheckMenuItem(popup,VOMP_TOPMOST,MF_BYCOMMAND|MF_CHECKED);
539 CheckMenuItem(popup,VOMP_TOPMOST,MF_BYCOMMAND|MF_UNCHECKED);
542 TrackPopupMenu(popup,TPM_RIGHTBUTTON|TPM_LEFTALIGN,x,y,0,wind, NULL);
550 LONG FAR PASCAL WindowProc(HWND wind, UINT msg, WPARAM wparam, LPARAM lparam)
556 logger->log("Core", Log::NOTICE, "Window closed, shutting down...");
561 CalculateWindowSize((RECT*) lparam,wparam);
565 int width = LOWORD(lparam);
566 int height = HIWORD(lparam);
568 if (wparam == SIZE_MAXIMIZED) {
571 } /*else if (wparam == SIZE_MINIMIZED) {
581 if (GetUpdateRect(wind, &r, FALSE)) {
582 BeginPaint(wind, &ps);
583 //Call Painting Mechanism
588 if (inputWin->ReceiveButtonVK(wparam)) {
589 return 0L; //We process that Key
591 return DefWindowProc(wind, msg, wparam, lparam);
596 if (inputWin->ReceiveButtonCH(wparam)) {
597 return 0L; //We process that Key
599 return DefWindowProc(wind, msg, wparam, lparam);
604 if (inputWin->ReceiveButtonAP(GET_APPCOMMAND_LPARAM(lparam))){
605 return TRUE; //yes we process that message
607 return DefWindowProc(wind, msg, wparam, lparam);
616 dynGetRawInputData((HRAWINPUT)lparam,RID_INPUT,NULL,&risize,sizeof(RAWINPUTHEADER));
617 lpit=(LPRAWINPUT)malloc(risize);
618 dynGetRawInputData((HRAWINPUT)lparam,RID_INPUT,lpit,&risize,sizeof(RAWINPUTHEADER));
620 if (lpit->header.dwType==RIM_TYPEHID && lpit->data.hid.dwSizeHid>=2) {
621 DWORD button=lpit->data.hid.bRawData[1] | (lpit->data.hid.bRawData[0]<< 8);
622 if (inputWin->ReceiveButtonRI(button)){
624 return 0; //yes we process that message
629 return DefWindowProc(wind, msg, wparam, lparam);
634 if (LOWORD(wparam)==VOMP_FULL_SCREEN) {
638 if (LOWORD(wparam)==VOMP_TOPMOST) {
642 if (inputWin->ReceiveButtonAP(LOWORD(wparam))){
643 return 0; //yes we process that message
645 return DefWindowProc(wind, msg, wparam, lparam);
650 if (((HANDLE)wparam)==win) {
654 return DefWindowProc(wind, msg, wparam, lparam);
658 if (wparam==SC_MAXIMIZE) {
661 } else if (wparam==SC_SCREENSAVE || wparam==SC_MONITORPOWER) {
664 return DefWindowProc(wind,msg,wparam, lparam);
669 lastmousemove=timeGetTime();
670 SetCursor(LoadCursor(NULL,IDC_ARROW));
671 SetTimer(wind,VOMP_CURSORUPDATE,4500,NULL);
672 POINT mpos={GET_X_LPARAM(lparam),GET_Y_LPARAM(lparam)};
673 ClientToScreen(wind,&mpos);
674 if (TranslateMousePosition(&mpos)) {
675 Message *mousemes=new Message();
676 mousemes->message=Message::MOUSE_MOVE;
678 mousemes->p_to = Message::MOUSE_RECEIVER;
679 mousemes->parameter=(mpos.x & 0xFFFF)<< 16| (mpos.y & 0xFFFF);
681 messageQueue->postMessage(mousemes);
685 //return DefWindowProc(wind,msg,wparam, lparam);
689 if (wparam==VOMP_CURSORUPDATE) {
693 return DefWindowProc(wind, msg, wparam, lparam);
697 if (!ContextMenu(wind,GET_X_LPARAM(lparam),GET_Y_LPARAM(lparam))) {
698 return DefWindowProc(wind, msg, wparam, lparam);
703 case WM_LBUTTONDOWN:{
704 POINT mpos={GET_X_LPARAM(lparam),GET_Y_LPARAM(lparam)};
705 ClientToScreen(wind,&mpos);
706 if (TranslateMousePosition(&mpos)) {
707 Message *mousemes=new Message();
708 mousemes->message=Message::MOUSE_LBDOWN;
710 mousemes->p_to = Message::MOUSE_RECEIVER;
711 mousemes->parameter=(mpos.x & 0xFFFF)<< 16| (mpos.y & 0xFFFF);
713 messageQueue->postMessage(mousemes);
717 POINT mpos = { GET_X_LPARAM(lparam), GET_Y_LPARAM(lparam) };
718 ClientToScreen(wind, &mpos);
719 if (TranslateMousePosition(&mpos)) {
720 Message *mousemes = new Message();
721 mousemes->message = Message::MOUSE_SCROLL;
722 mousemes->from = NULL;
723 mousemes->p_to = Message::MOUSE_RECEIVER;
724 mousemes->parameter = (0 & 0xFFFF) << 16 | (GET_WHEEL_DELTA_WPARAM(wparam) &0xFFFF);
725 mousemes->tag = (mpos.x & 0xFFFF) << 16 | (mpos.y & 0xFFFF);
726 messageQueue->postMessage(mousemes);
731 return DefWindowProc(wind, msg, wparam, lparam);
737 bool InitApp(HINSTANCE hinst,int cmdshow) {
741 wcs.style = CS_HREDRAW | CS_VREDRAW;
742 wcs.lpfnWndProc = WindowProc;
744 wcs.cbWndExtra = sizeof(DWORD);
745 wcs.hInstance = hinst;
748 wcs.hbrBackground = (HBRUSH)GetStockObject(BLACK_BRUSH);
749 wcs.lpszMenuName = NULL;
750 wcs.lpszClassName = "vomp";
751 acc=LoadAccelerators(hinst,MAKEINTRESOURCE(VOMPACCELERATOR));
752 if (!RegisterClass(&wcs))
754 flags =WS_VISIBLE | WS_POPUP | WS_CAPTION | WS_SYSMENU
755 |WS_MINIMIZEBOX | WS_SIZEBOX |WS_MAXIMIZEBOX;
756 RECT wnted={50,50,768+50,576+50};
757 AdjustWindowRect(&wnted,flags ,false);
758 win_main=CreateWindow("vomp","VOMP on Windows",flags, CW_USEDEFAULT,CW_USEDEFAULT,
759 wnted.right-wnted.left,wnted.bottom-wnted.top,NULL,NULL,hinst,NULL);
762 ShowWindow(win_main,SW_SHOWNORMAL);
763 UpdateWindow(win_main);
764 /* in order to handle letterboxing we use a child window */
766 child_wcs.style = CS_HREDRAW | CS_VREDRAW;
767 child_wcs.lpfnWndProc = WindowProc;
768 child_wcs.cbClsExtra = 0;
769 child_wcs.cbWndExtra = sizeof(DWORD);
770 child_wcs.hInstance = hinst;
771 child_wcs.hIcon = NULL;
772 child_wcs.hCursor = NULL;
773 child_wcs.hbrBackground = (HBRUSH)GetStockObject(WHITE_BRUSH);
774 child_wcs.lpszMenuName = NULL;
775 child_wcs.lpszClassName = "vomp_playback";
776 if (!RegisterClass(&child_wcs))
779 win=CreateWindow("vomp_playback","Vomp Playback Window",WS_VISIBLE | WS_CHILD |WS_CLIPCHILDREN,
780 0,0,768,576,win_main,NULL,hinst,NULL);
783 ShowWindow(win,SW_SHOWNORMAL);
785 if (remotefnc) {//at least windows XP
786 /* We want to support MCE Remote controls*/
787 RAWINPUTDEVICE remote_control_data[4];
788 ZeroMemory(remote_control_data,sizeof(remote_control_data));
789 remote_control_data[0].usUsagePage=0xFFBC;
790 remote_control_data[0].usUsage=0x88;
791 remote_control_data[0].dwFlags=0;
792 remote_control_data[1].usUsagePage=0x0C;
793 remote_control_data[1].usUsage=0x80;
794 remote_control_data[1].dwFlags=0;
795 remote_control_data[2].usUsagePage=0x0C;
796 remote_control_data[2].usUsage=0x01;
797 remote_control_data[2].dwFlags=0;
798 remote_control_data[3].usUsagePage=0x01;
799 remote_control_data[3].usUsage=0x80;
800 remote_control_data[3].dwFlags=0;
801 if (dynRegisterRawInputDevices(remote_control_data,4,sizeof(remote_control_data[0]))!=TRUE) {
802 MessageBox(0,"Registering remote control failed!","Aborting!",0);
814 // -------------------------------------------------------------------------------------------------------------------
816 void shutdown(int code)
818 if (control) // shut down control here in case views have posted messages
822 logger->log("Core", Log::NOTICE, "Control module shut down");
829 logger->log("Core", Log::NOTICE, "VDR module shut down");
836 logger->log("Core", Log::NOTICE, "OSD module shut down");
843 logger->log("Core", Log::NOTICE, "Audio module shut down");
850 logger->log("Core", Log::NOTICE, "Video module shut down");
857 logger->log("Core", Log::NOTICE, "Timers module shut down");
864 logger->log("Core", Log::NOTICE, "LED module shut down");
871 logger->log("Core", Log::NOTICE, "Remote module shut down");
876 logger->log("Core", Log::NOTICE, "WOL module shut down");
881 logger->log("Core", Log::NOTICE, "Log module shutting down... bye!\n\n");
888 logger->log("Core", Log::NOTICE, "Sleeptimer module shut down");
894 // -------------------------------------------------------------------------------------------------------------------
896 ULLONG htonll(ULLONG a)
898 return (((ULLONG)htonl((ULONG)((a<<32)>> 32))<<32)
899 |(ULONG)htonl(((ULONG) (a >> 32))));
902 ULLONG ntohll(ULLONG a)
907 std::string tp2str(const std::chrono::time_point<std::chrono::system_clock>& tp)
909 auto tms = std::chrono::time_point_cast<std::chrono::milliseconds>(tp);
910 std::chrono::milliseconds e = tms.time_since_epoch();
911 long long c = e.count();
912 time_t tt = c / 1000;
914 auto stm = std::localtime(&tt);
915 std::stringstream ss;
916 ss << std::put_time(stm, "%T") << "." << std::setfill('0') << std::setw(3) << ttm;
920 const std::string& getCommandLineServer()
922 return commandLineServer;