decklink: Add option to select channel format

Closes jp9000/obs-studio#867
This commit is contained in:
mntone
2017-03-31 13:03:38 +09:00
committed by jp9000
parent 698fd00174
commit c459ade360
14 changed files with 383 additions and 49 deletions

View File

@@ -72,6 +72,15 @@ bool DeckLinkDevice::Init()
if (result != S_OK)
return true;
int64_t channels;
/* Intensity Shuttle for Thunderbolt return 2; however, it supports 8 channels */
if (name == "Intensity Shuttle Thunderbolt")
maxChannel = 8;
else if (attributes->GetInt(BMDDeckLinkMaximumAudioChannels, &channels) == S_OK)
maxChannel = (int32_t)channels;
else
maxChannel = 2;
/* http://forum.blackmagicdesign.com/viewtopic.php?f=12&t=33967
* BMDDeckLinkTopologicalID for older devices
* BMDDeckLinkPersistentID for newer ones */
@@ -118,3 +127,8 @@ const std::string& DeckLinkDevice::GetName(void) const
{
return name;
}
const int32_t DeckLinkDevice::GetMaxChannel(void) const
{
return maxChannel;
}