clang-format: Increase column limit from 80 to 120

This commit is contained in:
Ryan Foster
2024-10-04 17:33:58 -04:00
parent 109f64c446
commit a1fbf1015f
736 changed files with 22684 additions and 45435 deletions

View File

@@ -31,15 +31,11 @@ ULONG DeckLinkDevice::Release()
bool DeckLinkDevice::Init()
{
ComPtr<IDeckLinkProfileAttributes> attributes;
const HRESULT result = device->QueryInterface(
IID_IDeckLinkProfileAttributes, (void **)&attributes);
const HRESULT result = device->QueryInterface(IID_IDeckLinkProfileAttributes, (void **)&attributes);
if (result == S_OK) {
decklink_bool_t detectable = false;
if (attributes->GetFlag(BMDDeckLinkSupportsInputFormatDetection,
&detectable) == S_OK &&
!!detectable) {
DeckLinkDeviceMode *mode =
new DeckLinkDeviceMode("Auto", MODE_ID_AUTO);
if (attributes->GetFlag(BMDDeckLinkSupportsInputFormatDetection, &detectable) == S_OK && !!detectable) {
DeckLinkDeviceMode *mode = new DeckLinkDeviceMode("Auto", MODE_ID_AUTO);
inputModes.push_back(mode);
inputModeIdMap[MODE_ID_AUTO] = mode;
}
@@ -47,8 +43,7 @@ bool DeckLinkDevice::Init()
// Find input modes
ComPtr<IDeckLinkInput> input;
if (device->QueryInterface(IID_IDeckLinkInput, (void **)&input) ==
S_OK) {
if (device->QueryInterface(IID_IDeckLinkInput, (void **)&input) == S_OK) {
ComPtr<IDeckLinkDisplayModeIterator> modeIterator;
if (input->GetDisplayModeIterator(&modeIterator) == S_OK) {
ComPtr<IDeckLinkDisplayMode> displayMode;
@@ -58,9 +53,7 @@ bool DeckLinkDevice::Init()
if (displayMode == nullptr)
continue;
DeckLinkDeviceMode *mode =
new DeckLinkDeviceMode(displayMode,
modeId);
DeckLinkDeviceMode *mode = new DeckLinkDeviceMode(displayMode, modeId);
inputModes.push_back(mode);
inputModeIdMap[modeId] = mode;
++modeId;
@@ -69,21 +62,16 @@ bool DeckLinkDevice::Init()
}
// Get supported video connections
attributes->GetInt(BMDDeckLinkVideoInputConnections,
&supportedVideoInputConnections);
attributes->GetInt(BMDDeckLinkVideoOutputConnections,
&supportedVideoOutputConnections);
attributes->GetInt(BMDDeckLinkVideoInputConnections, &supportedVideoInputConnections);
attributes->GetInt(BMDDeckLinkVideoOutputConnections, &supportedVideoOutputConnections);
// Get supported audio connections
attributes->GetInt(BMDDeckLinkAudioInputConnections,
&supportedAudioInputConnections);
attributes->GetInt(BMDDeckLinkAudioOutputConnections,
&supportedAudioOutputConnections);
attributes->GetInt(BMDDeckLinkAudioInputConnections, &supportedAudioInputConnections);
attributes->GetInt(BMDDeckLinkAudioOutputConnections, &supportedAudioOutputConnections);
// find output modes
ComPtr<IDeckLinkOutput> output;
if (device->QueryInterface(IID_IDeckLinkOutput, (void **)&output) ==
S_OK) {
if (device->QueryInterface(IID_IDeckLinkOutput, (void **)&output) == S_OK) {
ComPtr<IDeckLinkDisplayModeIterator> modeIterator;
if (output->GetDisplayModeIterator(&modeIterator) == S_OK) {
@@ -94,9 +82,7 @@ bool DeckLinkDevice::Init()
if (displayMode == nullptr)
continue;
DeckLinkDeviceMode *mode =
new DeckLinkDeviceMode(displayMode,
modeId);
DeckLinkDeviceMode *mode = new DeckLinkDeviceMode(displayMode, modeId);
outputModes.push_back(mode);
outputModeIdMap[modeId] = mode;
++modeId;
@@ -105,20 +91,16 @@ bool DeckLinkDevice::Init()
}
// get keyer support
attributes->GetFlag(BMDDeckLinkSupportsExternalKeying,
&supportsExternalKeyer);
attributes->GetFlag(BMDDeckLinkSupportsInternalKeying,
&supportsInternalKeyer);
attributes->GetFlag(BMDDeckLinkSupportsExternalKeying, &supportsExternalKeyer);
attributes->GetFlag(BMDDeckLinkSupportsInternalKeying, &supportsInternalKeyer);
attributes->GetFlag(BMDDeckLinkSupportsHDRMetadata,
&supportsHDRMetadata);
attributes->GetFlag(BMDDeckLinkSupportsHDRMetadata, &supportsHDRMetadata);
// Sub Device Counts
attributes->GetInt(BMDDeckLinkSubDeviceIndex, &subDeviceIndex);
attributes->GetInt(BMDDeckLinkNumberOfSubDevices, &numSubDevices);
if (FAILED(attributes->GetInt(BMDDeckLinkMinimumPrerollFrames,
&minimumPrerollFrames))) {
if (FAILED(attributes->GetInt(BMDDeckLinkMinimumPrerollFrames, &minimumPrerollFrames))) {
minimumPrerollFrames = 3;
}
@@ -142,8 +124,7 @@ bool DeckLinkDevice::Init()
/* 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)
else if (attributes->GetInt(BMDDeckLinkMaximumAudioChannels, &channels) == S_OK)
maxChannel = (int32_t)channels;
else
maxChannel = 2;
@@ -172,8 +153,7 @@ bool DeckLinkDevice::GetInput(IDeckLinkInput **input)
bool DeckLinkDevice::GetOutput(IDeckLinkOutput **output)
{
if (device->QueryInterface(IID_IDeckLinkOutput, (void **)output) !=
S_OK)
if (device->QueryInterface(IID_IDeckLinkOutput, (void **)output) != S_OK)
return false;
return true;
@@ -181,10 +161,8 @@ bool DeckLinkDevice::GetOutput(IDeckLinkOutput **output)
bool DeckLinkDevice::GetKeyer(IDeckLinkKeyer **deckLinkKeyer)
{
if (device->QueryInterface(IID_IDeckLinkKeyer,
(void **)deckLinkKeyer) != S_OK) {
fprintf(stderr,
"Could not obtain the IDeckLinkKeyer interface\n");
if (device->QueryInterface(IID_IDeckLinkKeyer, (void **)deckLinkKeyer) != S_OK) {
fprintf(stderr, "Could not obtain the IDeckLinkKeyer interface\n");
return false;
}
@@ -221,14 +199,12 @@ const std::string &DeckLinkDevice::GetHash(void) const
return hash;
}
const std::vector<DeckLinkDeviceMode *> &
DeckLinkDevice::GetInputModes(void) const
const std::vector<DeckLinkDeviceMode *> &DeckLinkDevice::GetInputModes(void) const
{
return inputModes;
}
const std::vector<DeckLinkDeviceMode *> &
DeckLinkDevice::GetOutputModes(void) const
const std::vector<DeckLinkDeviceMode *> &DeckLinkDevice::GetOutputModes(void) const
{
return outputModes;
}