DecklinkInput.hpp 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  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, bool added);
  9. public:
  10. DeckLinkInput(obs_source_t *source, DeckLinkDeviceDiscovery *discovery);
  11. virtual ~DeckLinkInput(void);
  12. long long GetActiveModeId(void) const;
  13. obs_source_t *GetSource(void) const;
  14. inline BMDPixelFormat GetPixelFormat() const { return pixelFormat; }
  15. inline void SetPixelFormat(BMDPixelFormat format) { pixelFormat = format; }
  16. inline video_colorspace GetColorSpace() const { return colorSpace; }
  17. inline void SetColorSpace(video_colorspace format) { colorSpace = format; }
  18. inline video_range_type GetColorRange() const { return colorRange; }
  19. inline void SetColorRange(video_range_type format) { colorRange = format; }
  20. inline speaker_layout GetChannelFormat() const { return channelFormat; }
  21. inline void SetChannelFormat(speaker_layout format) { channelFormat = format; }
  22. bool Activate(DeckLinkDevice *device, long long modeId, BMDVideoConnection bmdVideoConnection,
  23. BMDAudioConnection bmdAudioConnection) override;
  24. void Deactivate() override;
  25. bool Capturing();
  26. bool buffering = false;
  27. bool dwns = false;
  28. std::string hash;
  29. long long id;
  30. bool swap = false;
  31. bool allow10Bit = false;
  32. BMDVideoConnection videoConnection;
  33. BMDAudioConnection audioConnection;
  34. };