mirror of
https://github.com/obsproject/obs-studio.git
synced 2026-10-24 23:08:51 -04:00
clang-format: Increase column limit from 80 to 120
This commit is contained in:
1 parent
109f64c446
commit
a1fbf1015f
736 files changed
+22684
-45435
No files matched your search
@@ -2,8 +2,7 @@
|
||||
|
||||
#include <util/threading.h>
|
||||
|
||||
DeckLinkInput::DeckLinkInput(obs_source_t *source,
|
||||
DeckLinkDeviceDiscovery *discovery_)
|
||||
DeckLinkInput::DeckLinkInput(obs_source_t *source, DeckLinkDeviceDiscovery *discovery_)
|
||||
: DecklinkBase(discovery_),
|
||||
source(source)
|
||||
{
|
||||
@@ -16,8 +15,7 @@ DeckLinkInput::~DeckLinkInput(void)
|
||||
Deactivate();
|
||||
}
|
||||
|
||||
void DeckLinkInput::DevicesChanged(void *param, DeckLinkDevice *device,
|
||||
bool added)
|
||||
void DeckLinkInput::DevicesChanged(void *param, DeckLinkDevice *device, bool added)
|
||||
{
|
||||
DeckLinkInput *decklink = reinterpret_cast<DeckLinkInput *>(param);
|
||||
std::lock_guard<std::recursive_mutex> lock(decklink->deviceMutex);
|
||||
@@ -33,18 +31,15 @@ void DeckLinkInput::DevicesChanged(void *param, DeckLinkDevice *device,
|
||||
|
||||
settings = obs_source_get_settings(decklink->source);
|
||||
hash = obs_data_get_string(settings, "device_hash");
|
||||
videoConnection = (BMDVideoConnection)obs_data_get_int(
|
||||
settings, "video_connection");
|
||||
audioConnection = (BMDAudioConnection)obs_data_get_int(
|
||||
settings, "audio_connection");
|
||||
videoConnection = (BMDVideoConnection)obs_data_get_int(settings, "video_connection");
|
||||
audioConnection = (BMDAudioConnection)obs_data_get_int(settings, "audio_connection");
|
||||
mode = obs_data_get_int(settings, "mode_id");
|
||||
obs_data_release(settings);
|
||||
|
||||
if (device->GetHash().compare(hash) == 0) {
|
||||
if (!decklink->activateRefs)
|
||||
return;
|
||||
if (decklink->Activate(device, mode, videoConnection,
|
||||
audioConnection))
|
||||
if (decklink->Activate(device, mode, videoConnection, audioConnection))
|
||||
os_atomic_dec_long(&decklink->activateRefs);
|
||||
}
|
||||
|
||||
@@ -56,8 +51,7 @@ void DeckLinkInput::DevicesChanged(void *param, DeckLinkDevice *device,
|
||||
}
|
||||
}
|
||||
|
||||
bool DeckLinkInput::Activate(DeckLinkDevice *device, long long modeId,
|
||||
BMDVideoConnection bmdVideoConnection,
|
||||
bool DeckLinkInput::Activate(DeckLinkDevice *device, long long modeId, BMDVideoConnection bmdVideoConnection,
|
||||
BMDAudioConnection bmdAudioConnection)
|
||||
{
|
||||
std::lock_guard<std::recursive_mutex> lock(deviceMutex);
|
||||
@@ -68,14 +62,11 @@ bool DeckLinkInput::Activate(DeckLinkDevice *device, long long modeId,
|
||||
if (same) {
|
||||
if (!isActive)
|
||||
return false;
|
||||
if (instance->GetActiveModeId() == modeId &&
|
||||
instance->GetVideoConnection() == bmdVideoConnection &&
|
||||
if (instance->GetActiveModeId() == modeId && instance->GetVideoConnection() == bmdVideoConnection &&
|
||||
instance->GetAudioConnection() == bmdAudioConnection &&
|
||||
instance->GetActivePixelFormat() == pixelFormat &&
|
||||
instance->GetActiveColorSpace() == colorSpace &&
|
||||
instance->GetActivePixelFormat() == pixelFormat && instance->GetActiveColorSpace() == colorSpace &&
|
||||
instance->GetActiveColorRange() == colorRange &&
|
||||
instance->GetActiveChannelFormat() == channelFormat &&
|
||||
instance->GetActiveSwapState() == swap)
|
||||
instance->GetActiveChannelFormat() == channelFormat && instance->GetActiveSwapState() == swap)
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -90,8 +81,7 @@ bool DeckLinkInput::Activate(DeckLinkDevice *device, long long modeId,
|
||||
return false;
|
||||
|
||||
if (GetDevice() == nullptr) {
|
||||
LOG(LOG_ERROR,
|
||||
"Tried to activate an input with nullptr device.");
|
||||
LOG(LOG_ERROR, "Tried to activate an input with nullptr device.");
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -101,8 +91,7 @@ bool DeckLinkInput::Activate(DeckLinkDevice *device, long long modeId,
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!instance->StartCapture(mode, allow10Bit, bmdVideoConnection,
|
||||
bmdAudioConnection)) {
|
||||
if (!instance->StartCapture(mode, allow10Bit, bmdVideoConnection, bmdAudioConnection)) {
|
||||
instance = nullptr;
|
||||
return false;
|
||||
}
|
||||
@@ -141,8 +130,7 @@ void DeckLinkInput::SaveSettings()
|
||||
obs_data_t *settings = obs_source_get_settings(source);
|
||||
|
||||
obs_data_set_string(settings, "device_hash", device->GetHash().c_str());
|
||||
obs_data_set_string(settings, "device_name",
|
||||
device->GetDisplayName().c_str());
|
||||
obs_data_set_string(settings, "device_name", device->GetDisplayName().c_str());
|
||||
obs_data_set_int(settings, "mode_id", instance->GetActiveModeId());
|
||||
obs_data_set_string(settings, "mode_name", mode->GetName().c_str());
|
||||
|
||||
|
||||
Reference in new issue
Block a user