2016-02-23 23:16:51 +00:00
|
|
|
#pragma once
|
|
|
|
|
2019-07-27 12:47:10 +00:00
|
|
|
#include "DecklinkBase.h"
|
2016-02-23 23:16:51 +00:00
|
|
|
|
2019-07-27 12:47:10 +00:00
|
|
|
class DeckLinkInput : public DecklinkBase {
|
2016-02-23 23:16:51 +00:00
|
|
|
protected:
|
2019-09-22 21:19:10 +00:00
|
|
|
bool isCapturing = false;
|
|
|
|
obs_source_t *source;
|
2016-02-23 23:16:51 +00:00
|
|
|
|
|
|
|
void SaveSettings();
|
|
|
|
static void DevicesChanged(void *param, DeckLinkDevice *device,
|
2019-09-22 21:19:10 +00:00
|
|
|
bool added);
|
2016-02-23 23:16:51 +00:00
|
|
|
|
|
|
|
public:
|
2019-07-27 12:47:10 +00:00
|
|
|
DeckLinkInput(obs_source_t *source, DeckLinkDeviceDiscovery *discovery);
|
|
|
|
virtual ~DeckLinkInput(void);
|
2016-02-23 23:16:51 +00:00
|
|
|
|
|
|
|
long long GetActiveModeId(void) const;
|
|
|
|
obs_source_t *GetSource(void) const;
|
|
|
|
|
2019-09-22 21:19:10 +00:00
|
|
|
inline BMDPixelFormat GetPixelFormat() const { return pixelFormat; }
|
2016-02-23 23:16:51 +00:00
|
|
|
inline void SetPixelFormat(BMDPixelFormat format)
|
|
|
|
{
|
|
|
|
pixelFormat = format;
|
|
|
|
}
|
2019-09-22 21:19:10 +00:00
|
|
|
inline video_colorspace GetColorSpace() const { return colorSpace; }
|
2018-02-19 19:54:37 +00:00
|
|
|
inline void SetColorSpace(video_colorspace format)
|
|
|
|
{
|
|
|
|
colorSpace = format;
|
|
|
|
}
|
2019-09-22 21:19:10 +00:00
|
|
|
inline video_range_type GetColorRange() const { return colorRange; }
|
2018-02-19 19:54:37 +00:00
|
|
|
inline void SetColorRange(video_range_type format)
|
|
|
|
{
|
|
|
|
colorRange = format;
|
|
|
|
}
|
2019-09-22 21:19:10 +00:00
|
|
|
inline speaker_layout GetChannelFormat() const { return channelFormat; }
|
2017-06-29 19:01:10 +00:00
|
|
|
inline void SetChannelFormat(speaker_layout format)
|
|
|
|
{
|
|
|
|
channelFormat = format;
|
|
|
|
}
|
2016-02-23 23:16:51 +00:00
|
|
|
|
2019-07-27 12:47:10 +00:00
|
|
|
bool Activate(DeckLinkDevice *device, long long modeId,
|
2019-09-22 21:19:10 +00:00
|
|
|
BMDVideoConnection bmdVideoConnection,
|
2020-10-01 20:15:25 +00:00
|
|
|
BMDAudioConnection bmdAudioConnection) override;
|
|
|
|
void Deactivate() override;
|
2019-07-27 12:47:10 +00:00
|
|
|
bool Capturing();
|
2018-02-19 19:54:37 +00:00
|
|
|
|
|
|
|
bool buffering = false;
|
2019-07-27 12:47:10 +00:00
|
|
|
bool dwns = false;
|
|
|
|
std::string hash;
|
|
|
|
long long id;
|
|
|
|
bool swap = false;
|
|
|
|
BMDVideoConnection videoConnection;
|
|
|
|
BMDAudioConnection audioConnection;
|
2016-02-23 23:16:51 +00:00
|
|
|
};
|