1
0

DecklinkInput.hpp 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. #pragma once
  2. #include "DecklinkBase.h"
  3. class DeckLinkInput : public DecklinkBase {
  4. protected:
  5. bool isCapturing = false;
  6. obs_source_t *source;
  7. void SaveSettings();
  8. static void DevicesChanged(void *param, DeckLinkDevice *device,
  9. bool added);
  10. public:
  11. DeckLinkInput(obs_source_t *source, DeckLinkDeviceDiscovery *discovery);
  12. virtual ~DeckLinkInput(void);
  13. long long GetActiveModeId(void) const;
  14. obs_source_t *GetSource(void) const;
  15. inline BMDPixelFormat GetPixelFormat() const {return pixelFormat;}
  16. inline void SetPixelFormat(BMDPixelFormat format)
  17. {
  18. pixelFormat = format;
  19. }
  20. inline video_colorspace GetColorSpace() const {return colorSpace;}
  21. inline void SetColorSpace(video_colorspace format)
  22. {
  23. colorSpace = format;
  24. }
  25. inline video_range_type GetColorRange() const {return colorRange;}
  26. inline void SetColorRange(video_range_type format)
  27. {
  28. colorRange = format;
  29. }
  30. inline speaker_layout GetChannelFormat() const {return channelFormat;}
  31. inline void SetChannelFormat(speaker_layout format)
  32. {
  33. channelFormat = format;
  34. }
  35. bool Activate(DeckLinkDevice *device, long long modeId);
  36. void Deactivate();
  37. bool Capturing();
  38. bool buffering = false;
  39. bool dwns = false;
  40. std::string hash;
  41. long long id;
  42. bool swap = false;
  43. };