DecklinkInput.hpp 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  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. BMDVideoConnection bmdVideoConnection,
  37. BMDAudioConnection bmdAudioConnection);
  38. void Deactivate();
  39. bool Capturing();
  40. bool buffering = false;
  41. bool dwns = false;
  42. std::string hash;
  43. long long id;
  44. bool swap = false;
  45. BMDVideoConnection videoConnection;
  46. BMDAudioConnection audioConnection;
  47. };