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 {
|
|
|
|
|
ComPtr<IDeckLink> device;
|
2019-07-27 12:47:10 +00:00
|
|
|
|
std::map<long long, DeckLinkDeviceMode *> inputModeIdMap;
|
|
|
|
|
std::vector<DeckLinkDeviceMode *> inputModes;
|
|
|
|
|
std::map<long long, DeckLinkDeviceMode *> outputModeIdMap;
|
|
|
|
|
std::vector<DeckLinkDeviceMode *> outputModes;
|
2016-02-23 23:16:51 +00:00
|
|
|
|
std::string name;
|
|
|
|
|
std::string displayName;
|
|
|
|
|
std::string hash;
|
2019-07-27 12:47:10 +00:00
|
|
|
|
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;
|
2016-02-23 23:16:51 +00:00
|
|
|
|
volatile long refCount = 1;
|
|
|
|
|
|
|
|
|
|
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);
|
2016-02-23 23:16:51 +00:00
|
|
|
|
const std::string& GetDisplayName(void);
|
|
|
|
|
const std::string& GetHash(void) const;
|
2019-07-27 12:47:10 +00:00
|
|
|
|
const std::vector<DeckLinkDeviceMode *>& GetInputModes(void) const;
|
|
|
|
|
const std::vector<DeckLinkDeviceMode *>& GetOutputModes(void) const;
|
|
|
|
|
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);
|
2016-02-23 23:16:51 +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
|
|
|
|
|
|
|
|
|
inline bool IsDevice(IDeckLink *device_)
|
|
|
|
|
{
|
|
|
|
|
return device_ == device;
|
|
|
|
|
}
|
|
|
|
|
};
|