- Posts: 4
- Joined: Mon Feb 03, 2020 5:41 am
- Real Name: Park-Taesoon
The following function can be used to check the active/inactive state of a device:
- Code: Select all
bool isDeviceActive(IDeckLink* deckLink)
{
IDeckLinkProfileAttributes* deckLinkAttributes;
int64_t intAttribute;
if (deckLink->QueryInterface(IID_IDeckLinkProfileAttributes, (void**)&deckLinkAttributes) != S_OK)
return false;
if (deckLinkAttributes->GetInt(BMDDeckLinkDuplex, &intAttribute) != S_OK)
intAttribute = bmdDuplexInactive;
deckLinkAttributes->Release();
return ((BMDDuplexMode) intAttribute) != bmdDuplexInactive;
}
Regards
Cameron