yolobs-studio/plugins/decklink/decklink-device.hpp

63 lines
1.8 KiB
C++
Raw Permalink Normal View History

2019-07-27 12:47:10 +00:00
#pragma once
2016-02-23 23:16:51 +00:00
#include "decklink-device-mode.hpp"
#include <map>
#include <string>
#include <vector>
2019-07-27 12:47:10 +00:00
#include <stdint.h>
2016-02-23 23:16:51 +00:00
class DeckLinkDevice {
2019-09-22 21:19:10 +00:00
ComPtr<IDeckLink> device;
2019-07-27 12:47:10 +00:00
std::map<long long, DeckLinkDeviceMode *> inputModeIdMap;
2019-09-22 21:19:10 +00:00
std::vector<DeckLinkDeviceMode *> inputModes;
2019-07-27 12:47:10 +00:00
std::map<long long, DeckLinkDeviceMode *> outputModeIdMap;
2019-09-22 21:19:10 +00:00
std::vector<DeckLinkDeviceMode *> outputModes;
std::string name;
std::string displayName;
std::string hash;
int32_t maxChannel = 0;
decklink_bool_t supportsExternalKeyer = false;
decklink_bool_t supportsInternalKeyer = false;
int64_t subDeviceIndex = 0;
int64_t numSubDevices = 0;
int64_t supportedVideoInputConnections = -1;
int64_t supportedVideoOutputConnections = -1;
int64_t supportedAudioInputConnections = -1;
int64_t supportedAudioOutputConnections = -1;
int keyerMode = 0;
volatile long refCount = 1;
2016-02-23 23:16:51 +00:00
public:
DeckLinkDevice(IDeckLink *device);
~DeckLinkDevice(void);
ULONG AddRef(void);
ULONG Release(void);
bool Init();
2019-07-27 12:47:10 +00:00
DeckLinkDeviceMode *FindInputMode(long long id);
DeckLinkDeviceMode *FindOutputMode(long long id);
2019-09-22 21:19:10 +00:00
const std::string &GetDisplayName(void);
const std::string &GetHash(void) const;
const std::vector<DeckLinkDeviceMode *> &GetInputModes(void) const;
const std::vector<DeckLinkDeviceMode *> &GetOutputModes(void) const;
2019-07-27 12:47:10 +00:00
int64_t GetVideoInputConnections();
int64_t GetAudioInputConnections();
bool GetSupportsExternalKeyer(void) const;
bool GetSupportsInternalKeyer(void) const;
int64_t GetSubDeviceCount();
int64_t GetSubDeviceIndex();
int GetKeyerMode(void);
void SetKeyerMode(int newKeyerMode);
2019-09-22 21:19:10 +00:00
const std::string &GetName(void) const;
2017-06-29 19:01:10 +00:00
int32_t GetMaxChannel(void) const;
2016-02-23 23:16:51 +00:00
bool GetInput(IDeckLinkInput **input);
2019-07-27 12:47:10 +00:00
bool GetOutput(IDeckLinkOutput **output);
bool GetKeyer(IDeckLinkKeyer **keyer);
2016-02-23 23:16:51 +00:00
2019-09-22 21:19:10 +00:00
inline bool IsDevice(IDeckLink *device_) { return device_ == device; }
2016-02-23 23:16:51 +00:00
};