decklink-device.hpp 999 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. #pragma once
  2. #include "decklink.hpp"
  3. #include "decklink-device-mode.hpp"
  4. #include <map>
  5. #include <string>
  6. #include <vector>
  7. class DeckLinkDevice {
  8. ComPtr<IDeckLink> device;
  9. std::map<long long, DeckLinkDeviceMode *> modeIdMap;
  10. std::vector<DeckLinkDeviceMode *> modes;
  11. std::string name;
  12. std::string displayName;
  13. std::string hash;
  14. volatile long refCount = 1;
  15. public:
  16. DeckLinkDevice(IDeckLink *device);
  17. ~DeckLinkDevice(void);
  18. ULONG AddRef(void);
  19. ULONG Release(void);
  20. bool Init();
  21. DeckLinkDeviceMode *FindMode(long long id);
  22. const std::string& GetDisplayName(void);
  23. const std::string& GetHash(void) const;
  24. const std::vector<DeckLinkDeviceMode *>& GetModes(void) const;
  25. const std::string& GetName(void) const;
  26. bool GetInput(IDeckLinkInput **input);
  27. inline bool IsDevice(IDeckLink *device_)
  28. {
  29. return device_ == device;
  30. }
  31. };