2015-02-18 15:15:38 -08:00
|
|
|
#pragma once
|
|
|
|
|
2018-09-25 15:51:32 -07:00
|
|
|
#include "DecklinkBase.h"
|
2015-02-18 15:15:38 -08:00
|
|
|
|
2018-09-25 15:51:32 -07:00
|
|
|
class DeckLinkInput : public DecklinkBase {
|
2015-02-18 15:15:38 -08:00
|
|
|
protected:
|
2019-06-22 22:13:45 -07:00
|
|
|
bool isCapturing = false;
|
|
|
|
obs_source_t *source;
|
2015-02-18 15:15:38 -08:00
|
|
|
|
|
|
|
void SaveSettings();
|
|
|
|
static void DevicesChanged(void *param, DeckLinkDevice *device,
|
2019-06-22 22:13:45 -07:00
|
|
|
bool added);
|
2015-02-18 15:15:38 -08:00
|
|
|
|
|
|
|
public:
|
2018-09-25 15:51:32 -07:00
|
|
|
DeckLinkInput(obs_source_t *source, DeckLinkDeviceDiscovery *discovery);
|
|
|
|
virtual ~DeckLinkInput(void);
|
2015-02-18 15:15:38 -08:00
|
|
|
|
|
|
|
long long GetActiveModeId(void) const;
|
|
|
|
obs_source_t *GetSource(void) const;
|
|
|
|
|
2019-06-22 22:13:45 -07:00
|
|
|
inline BMDPixelFormat GetPixelFormat() const { return pixelFormat; }
|
2015-10-08 10:42:33 -07:00
|
|
|
inline void SetPixelFormat(BMDPixelFormat format)
|
|
|
|
{
|
|
|
|
pixelFormat = format;
|
|
|
|
}
|
2019-06-22 22:13:45 -07:00
|
|
|
inline video_colorspace GetColorSpace() const { return colorSpace; }
|
2017-05-05 05:55:06 -07:00
|
|
|
inline void SetColorSpace(video_colorspace format)
|
|
|
|
{
|
|
|
|
colorSpace = format;
|
|
|
|
}
|
2019-06-22 22:13:45 -07:00
|
|
|
inline video_range_type GetColorRange() const { return colorRange; }
|
2017-05-05 05:55:06 -07:00
|
|
|
inline void SetColorRange(video_range_type format)
|
|
|
|
{
|
|
|
|
colorRange = format;
|
|
|
|
}
|
2019-06-22 22:13:45 -07:00
|
|
|
inline speaker_layout GetChannelFormat() const { return channelFormat; }
|
2017-03-30 21:03:38 -07:00
|
|
|
inline void SetChannelFormat(speaker_layout format)
|
|
|
|
{
|
|
|
|
channelFormat = format;
|
|
|
|
}
|
2015-10-08 10:42:33 -07:00
|
|
|
|
2019-02-25 21:19:35 -08:00
|
|
|
bool Activate(DeckLinkDevice *device, long long modeId,
|
2019-06-22 22:13:45 -07:00
|
|
|
BMDVideoConnection bmdVideoConnection,
|
|
|
|
BMDAudioConnection bmdAudioConnection);
|
2015-02-18 15:15:38 -08:00
|
|
|
void Deactivate();
|
2018-07-30 18:31:53 -07:00
|
|
|
bool Capturing();
|
2017-09-29 00:40:03 -07:00
|
|
|
|
|
|
|
bool buffering = false;
|
2018-07-30 18:31:53 -07:00
|
|
|
bool dwns = false;
|
|
|
|
std::string hash;
|
|
|
|
long long id;
|
2019-03-01 00:59:58 -08:00
|
|
|
bool swap = false;
|
2019-02-25 21:19:35 -08:00
|
|
|
BMDVideoConnection videoConnection;
|
|
|
|
BMDAudioConnection audioConnection;
|
2015-02-18 15:15:38 -08:00
|
|
|
};
|