1
0

VFWSetting.hpp 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. #if !defined(VFWSETTING_HPP)
  2. #define VFWSETTING_HPP
  3. //______________________________________________________________________________
  4. //
  5. // VFWSetting.hpp
  6. //
  7. #include "FourCC.hpp"
  8. #include <iosfwd>
  9. namespace on2vp
  10. {
  11. //--------------------------------------
  12. class VFWSetting
  13. {
  14. friend std::ostream& operator<<(std::ostream& os, const VFWSetting& vfws);
  15. public:
  16. enum Mode
  17. {
  18. M_Setting,
  19. M_Config
  20. };
  21. enum
  22. {
  23. HeaderSize = 8,
  24. Size = 16
  25. };
  26. VFWSetting(FourCC fcc);
  27. ~VFWSetting();
  28. FourCC fcc() const;
  29. Mode mode() const;
  30. int setting() const;
  31. int value() const;
  32. void settingValue(int iSetting, int iValue); // Sets mode to M_Setting
  33. long size() const;
  34. const void* data() const;
  35. int data(const void* pData, unsigned long ulSize);
  36. private:
  37. VFWSetting(const VFWSetting& vfws); // Not implemented
  38. VFWSetting& operator=(const VFWSetting& vfws); // Not implemented
  39. int extract_(const void* pData, unsigned long ulSize);
  40. void update_() const;
  41. FourCC m_fcc;
  42. Mode m_mode;
  43. int m_iSetting;
  44. int m_iValue;
  45. mutable unsigned char m_pData[Size];
  46. };
  47. } // namespace on2vp
  48. #endif // VFWSETTING_HPP