2018-06-23 17:21:07 -05:00
|
|
|
|
#pragma once
|
2015-02-18 15:15:38 -08:00
|
|
|
|
|
|
|
|
|
#include "decklink-device-mode.hpp"
|
|
|
|
|
|
|
|
|
|
#include <map>
|
|
|
|
|
#include <string>
|
|
|
|
|
#include <vector>
|
2018-11-20 20:36:09 +02:00
|
|
|
|
#include <stdint.h>
|
2015-02-18 15:15:38 -08:00
|
|
|
|
|
2018-06-23 17:21:07 -05:00
|
|
|
|
|
|
|
|
|
|
2015-02-18 15:15:38 -08:00
|
|
|
|
class DeckLinkDevice {
|
|
|
|
|
ComPtr<IDeckLink> device;
|
2018-09-25 17:51:32 -05:00
|
|
|
|
std::map<long long, DeckLinkDeviceMode *> inputModeIdMap;
|
|
|
|
|
std::vector<DeckLinkDeviceMode *> inputModes;
|
|
|
|
|
std::map<long long, DeckLinkDeviceMode *> outputModeIdMap;
|
|
|
|
|
std::vector<DeckLinkDeviceMode *> outputModes;
|
2015-02-18 15:15:38 -08:00
|
|
|
|
std::string name;
|
|
|
|
|
std::string displayName;
|
|
|
|
|
std::string hash;
|
2017-03-31 13:03:38 +09:00
|
|
|
|
int32_t maxChannel;
|
2018-06-23 17:21:07 -05:00
|
|
|
|
decklink_bool_t supportsExternalKeyer;
|
|
|
|
|
decklink_bool_t supportsInternalKeyer;
|
|
|
|
|
int keyerMode;
|
2015-02-18 15:15:38 -08:00
|
|
|
|
volatile long refCount = 1;
|
|
|
|
|
|
|
|
|
|
public:
|
|
|
|
|
DeckLinkDevice(IDeckLink *device);
|
|
|
|
|
~DeckLinkDevice(void);
|
|
|
|
|
|
|
|
|
|
ULONG AddRef(void);
|
|
|
|
|
ULONG Release(void);
|
|
|
|
|
|
|
|
|
|
bool Init();
|
|
|
|
|
|
2018-09-25 17:51:32 -05:00
|
|
|
|
DeckLinkDeviceMode *FindInputMode(long long id);
|
|
|
|
|
DeckLinkDeviceMode *FindOutputMode(long long id);
|
2015-02-18 15:15:38 -08:00
|
|
|
|
const std::string& GetDisplayName(void);
|
|
|
|
|
const std::string& GetHash(void) const;
|
2018-09-25 17:51:32 -05:00
|
|
|
|
const std::vector<DeckLinkDeviceMode *>& GetInputModes(void) const;
|
|
|
|
|
const std::vector<DeckLinkDeviceMode *>& GetOutputModes(void) const;
|
2018-06-23 17:21:07 -05:00
|
|
|
|
const bool GetSupportsExternalKeyer(void) const;
|
|
|
|
|
const bool GetSupportsInternalKeyer(void) const;
|
|
|
|
|
int GetKeyerMode(void);
|
|
|
|
|
void SetKeyerMode(int newKeyerMode);
|
2015-02-18 15:15:38 -08:00
|
|
|
|
const std::string& GetName(void) const;
|
2017-05-10 21:55:02 +02:00
|
|
|
|
int32_t GetMaxChannel(void) const;
|
2015-02-18 15:15:38 -08:00
|
|
|
|
|
|
|
|
|
bool GetInput(IDeckLinkInput **input);
|
2018-09-25 17:51:32 -05:00
|
|
|
|
bool GetOutput(IDeckLinkOutput **output);
|
2018-06-23 17:21:07 -05:00
|
|
|
|
bool GetKeyer(IDeckLinkKeyer **keyer);
|
2015-02-18 15:15:38 -08:00
|
|
|
|
|
|
|
|
|
inline bool IsDevice(IDeckLink *device_)
|
|
|
|
|
{
|
|
|
|
|
return device_ == device;
|
|
|
|
|
}
|
|
|
|
|
};
|