mirror of
https://github.com/obsproject/obs-studio.git
synced 2026-05-19 05:51:16 -04:00
decklink: Add option to select channel format
Closes jp9000/obs-studio#867
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user