obs-studio/plugins/decklink/DecklinkInput.hpp
pkv 05508ac895 decklink: Fix FC<->LFE channel swap for some devices
Fixes mantis issue https://obsproject.com/mantis/view.php?id=1379
For some devices with hdmi input, the Front Center channel and the LFE
channel are swapped. For some others they are not.
To solve the issue a new swap setting is added so that the user can
swap the two channels if needed.
2019-03-03 19:57:27 +01:00

51 lines
1.3 KiB
C++

#pragma once
#include "DecklinkBase.h"
class DeckLinkInput : public DecklinkBase {
protected:
bool isCapturing = false;
obs_source_t *source;
void SaveSettings();
static void DevicesChanged(void *param, DeckLinkDevice *device,
bool added);
public:
DeckLinkInput(obs_source_t *source, DeckLinkDeviceDiscovery *discovery);
virtual ~DeckLinkInput(void);
long long GetActiveModeId(void) const;
obs_source_t *GetSource(void) const;
inline BMDPixelFormat GetPixelFormat() const {return pixelFormat;}
inline void SetPixelFormat(BMDPixelFormat format)
{
pixelFormat = format;
}
inline video_colorspace GetColorSpace() const {return colorSpace;}
inline void SetColorSpace(video_colorspace format)
{
colorSpace = format;
}
inline video_range_type GetColorRange() const {return colorRange;}
inline void SetColorRange(video_range_type format)
{
colorRange = format;
}
inline speaker_layout GetChannelFormat() const {return channelFormat;}
inline void SetChannelFormat(speaker_layout format)
{
channelFormat = format;
}
bool Activate(DeckLinkDevice *device, long long modeId);
void Deactivate();
bool Capturing();
bool buffering = false;
bool dwns = false;
std::string hash;
long long id;
bool swap = false;
};