Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

41 lines
989 B

  1. /**********************************************************************
  2. Copyright (c) 1994 - 1997 Microsoft Corporation. All Rights Reserved.
  3. VitcDecode, Ken Greenebaum, November 1996
  4. **********************************************************************/
  5. #ifndef _H_VITCDECODER
  6. #define _H_VITCDECODER
  7. #include <wtypes.h>
  8. #include "timecode.h"
  9. typedef struct VITCuserBits {
  10. int user1:4;
  11. int user2:4;
  12. int user3:4;
  13. int user4:4;
  14. int user5:4;
  15. int user6:4;
  16. int user7:4;
  17. int user8:4;
  18. } bar;
  19. class VITCdecoder {
  20. public:
  21. VITCdecoder(); // XXX really should spec format, rate...
  22. int decodeBuffer(BYTE *buf, int bufferSize);
  23. int getTimeCode(TimeCode *tc); // convert VITC bits to SMPTE timecode
  24. int getUserBits(VITCuserBits *bits);
  25. private:
  26. // threshold values for detection
  27. int _low;
  28. int _high;
  29. int _bits[90];
  30. int _validTimeCode; // set if the ringBuffer contains a timecode
  31. };
  32. #endif /* _H_VITCDECODER */