-/*\r
-* copyright (c) 2010 Sveriges Television AB <info@casparcg.com>\r
-*\r
-* This file is part of CasparCG.\r
-*\r
-* CasparCG is free software: you can redistribute it and/or modify\r
-* it under the terms of the GNU General Public License as published by\r
-* the Free Software Foundation, either version 3 of the License, or\r
-* (at your option) any later version.\r
-*\r
-* CasparCG is distributed in the hope that it will be useful,\r
-* but WITHOUT ANY WARRANTY; without even the implied warranty of\r
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\r
-* GNU General Public License for more details.\r
-\r
-* You should have received a copy of the GNU General Public License\r
-* along with CasparCG. If not, see <http://www.gnu.org/licenses/>.\r
-*\r
-*/\r
- \r
-#ifndef _TIMER_HELPER_H__\r
-#define _TIMER_HELPER_H__\r
-\r
-#include "FlashAxContainer.h"\r
-\r
-namespace caspar {\r
-namespace flash {\r
-\r
- class TimerHelper\r
- {\r
- TimerHelper(const TimerHelper&);\r
- const TimerHelper& operator=(const TimerHelper&);\r
-\r
- public:\r
- TimerHelper()\r
- {}\r
- TimerHelper(DWORD first, DWORD interv, ITimerSink* pTS) : firstTime(first), interval(interv), currentTime(first), pTimerSink(pTS)\r
- {\r
- ID = first;\r
- }\r
- ~TimerHelper()\r
- {\r
- }\r
- void Setup(DWORD first, DWORD interv, ITimerSink* pTS)\r
- {\r
- firstTime = first;\r
- interval = interv;\r
- currentTime = first;\r
- pTimerSink = pTS;\r
- ID = first;\r
- }\r
-\r
- DWORD Invoke()\r
- {\r
- if(pTimerSink != 0)\r
- {\r
- VARIANT value;\r
- value.vt = VT_UI4;\r
- value.ulVal = currentTime;\r
-\r
- pTimerSink->OnTimer(value);\r
- currentTime += interval;\r
- }\r
- return currentTime;\r
- }\r
-\r
- DWORD firstTime;\r
- DWORD interval;\r
- DWORD currentTime;\r
- ATL::CComPtr<ITimerSink> pTimerSink;\r
- DWORD ID;\r
- };\r
-\r
-} //namespace flash\r
-} //namespace caspar\r
-\r
+/*
+* copyright (c) 2010 Sveriges Television AB <info@casparcg.com>
+*
+* This file is part of CasparCG.
+*
+* CasparCG is free software: you can redistribute it and/or modify
+* it under the terms of the GNU General Public License as published by
+* the Free Software Foundation, either version 3 of the License, or
+* (at your option) any later version.
+*
+* CasparCG is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU General Public License for more details.
+
+* You should have received a copy of the GNU General Public License
+* along with CasparCG. If not, see <http://www.gnu.org/licenses/>.
+*
+*/
+
+#ifndef _TIMER_HELPER_H__
+#define _TIMER_HELPER_H__
+
+#include "FlashAxContainer.h"
+
+namespace caspar {
+namespace flash {
+
+ class TimerHelper
+ {
+ TimerHelper(const TimerHelper&);
+ const TimerHelper& operator=(const TimerHelper&);
+
+ public:
+ TimerHelper()
+ {}
+ TimerHelper(DWORD first, DWORD interv, ITimerSink* pTS) : firstTime(first), interval(interv), currentTime(first), pTimerSink(pTS)
+ {
+ ID = first;
+ }
+ ~TimerHelper()
+ {
+ }
+ void Setup(DWORD first, DWORD interv, ITimerSink* pTS)
+ {
+ firstTime = first;
+ interval = interv;
+ currentTime = first;
+ pTimerSink = pTS;
+ ID = first;
+ }
+
+ DWORD Invoke()
+ {
+ if(pTimerSink != 0)
+ {
+ VARIANT value;
+ value.vt = VT_UI4;
+ value.ulVal = currentTime;
+
+ pTimerSink->OnTimer(value);
+ currentTime += interval;
+ }
+ return currentTime;
+ }
+
+ DWORD firstTime;
+ DWORD interval;
+ DWORD currentTime;
+ ATL::CComPtr<ITimerSink> pTimerSink;
+ DWORD ID;
+ };
+
+} //namespace flash
+} //namespace caspar
+
#endif //_TIMER_HELPER_H__
\ No newline at end of file