Decklink: Keyer support

This commit is contained in:
Colin Edwards 2018-06-23 17:21:07 -05:00
commit 19bc92d267
7 changed files with 94 additions and 9 deletions

View file

@ -1,4 +1,4 @@
#include <sstream>
#include <sstream>
#include "decklink-device.hpp"
@ -97,6 +97,10 @@ bool DeckLinkDevice::Init()
}
}
// get keyer support
attributes->GetFlag(BMDDeckLinkSupportsExternalKeying, &supportsExternalKeyer);
attributes->GetFlag(BMDDeckLinkSupportsInternalKeying, &supportsInternalKeyer);
decklink_string_t decklinkModelName;
decklink_string_t decklinkDisplayName;
@ -152,6 +156,27 @@ bool DeckLinkDevice::GetOutput(IDeckLinkOutput **output)
return true;
}
bool DeckLinkDevice::GetKeyer(IDeckLinkKeyer **deckLinkKeyer)
{
if (device->QueryInterface(IID_IDeckLinkKeyer, (void**)deckLinkKeyer) != S_OK)
{
fprintf(stderr, "Could not obtain the IDeckLinkKeyer interface\n");
return false;
}
return true;
}
void DeckLinkDevice::SetKeyerMode(int newKeyerMode)
{
keyerMode = newKeyerMode;
}
int DeckLinkDevice::GetKeyerMode(void)
{
return keyerMode;
}
DeckLinkDeviceMode *DeckLinkDevice::FindInputMode(long long id)
{
return inputModeIdMap[id];
@ -182,6 +207,16 @@ const std::vector<DeckLinkDeviceMode *>& DeckLinkDevice::GetOutputModes(void) co
return outputModes;
}
const bool DeckLinkDevice::GetSupportsExternalKeyer(void) const
{
return supportsExternalKeyer;
}
const bool DeckLinkDevice::GetSupportsInternalKeyer(void) const
{
return supportsInternalKeyer;
}
const std::string& DeckLinkDevice::GetName(void) const
{
return name;