1
0

ClockLayer.h 781 B

123456789101112131415161718192021222324252627282930313233343536
  1. #ifndef NULLSOFT_CLOCKLAYERH
  2. #define NULLSOFT_CLOCKLAYERH
  3. #include "WMHandler.h"
  4. class ClockLayer : public WMHandler
  5. {
  6. public:
  7. ClockLayer(IWMReader *reader);
  8. void SetStartTimeMilliseconds(long time);
  9. QWORD GetStartTime();
  10. void GoRealTime();
  11. int GetOutputTime();
  12. void SetLastOutputTime(int _outputTime)
  13. {
  14. lastOutputTime = _outputTime;
  15. }
  16. void Clock();
  17. private:
  18. // WMHandler
  19. void Opened();
  20. void Started();
  21. void TimeReached(QWORD &timeReached);
  22. void TimeToSync(QWORD timeStamp, __int64 &diff);
  23. void SampleReceived(QWORD &timeStamp, QWORD &duration, unsigned long &outputNum, unsigned long &flags, INSSBuffer *&sample);
  24. IWMReaderAdvanced *clock;
  25. QWORD startTime, clockTick, curTime;
  26. DWORD startTimeMilliseconds;
  27. bool realTime;
  28. int lastOutputTime;
  29. };
  30. #endif