New upstream version 24.0.1+dfsg1

This commit is contained in:
Sebastian Ramacher 2019-09-22 23:19:10 +02:00
parent b14f9eae6d
commit 5a730d6ec3
842 changed files with 42245 additions and 33385 deletions

View file

@ -4,9 +4,7 @@
#include <util/threading.h>
DeckLinkDevice::DeckLinkDevice(IDeckLink *device_) : device(device_)
{
}
DeckLinkDevice::DeckLinkDevice(IDeckLink *device_) : device(device_) {}
DeckLinkDevice::~DeckLinkDevice(void)
{
@ -34,15 +32,15 @@ bool DeckLinkDevice::Init()
{
ComPtr<IDeckLinkAttributes> attributes;
const HRESULT result = device->QueryInterface(IID_IDeckLinkAttributes,
(void **)&attributes);
(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);
&detectable) == S_OK &&
!!detectable) {
DeckLinkDeviceMode *mode =
new DeckLinkDeviceMode("Auto", MODE_ID_AUTO);
inputModes.push_back(mode);
inputModeIdMap[MODE_ID_AUTO] = mode;
}
@ -50,7 +48,8 @@ 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) {
IDeckLinkDisplayModeIterator *modeIterator;
if (input->GetDisplayModeIterator(&modeIterator) == S_OK) {
IDeckLinkDisplayMode *displayMode;
@ -61,7 +60,8 @@ bool DeckLinkDevice::Init()
continue;
DeckLinkDeviceMode *mode =
new DeckLinkDeviceMode(displayMode, modeId);
new DeckLinkDeviceMode(displayMode,
modeId);
inputModes.push_back(mode);
inputModeIdMap[modeId] = mode;
displayMode->Release();
@ -74,19 +74,20 @@ bool DeckLinkDevice::Init()
// Get supported video connections
attributes->GetInt(BMDDeckLinkVideoInputConnections,
&supportedVideoInputConnections);
&supportedVideoInputConnections);
attributes->GetInt(BMDDeckLinkVideoOutputConnections,
&supportedVideoOutputConnections);
&supportedVideoOutputConnections);
// Get supported audio connections
attributes->GetInt(BMDDeckLinkAudioInputConnections,
&supportedAudioInputConnections);
&supportedAudioInputConnections);
attributes->GetInt(BMDDeckLinkAudioOutputConnections,
&supportedAudioOutputConnections);
&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) {
IDeckLinkDisplayModeIterator *modeIterator;
if (output->GetDisplayModeIterator(&modeIterator) == S_OK) {
@ -98,7 +99,8 @@ bool DeckLinkDevice::Init()
continue;
DeckLinkDeviceMode *mode =
new DeckLinkDeviceMode(displayMode, modeId);
new DeckLinkDeviceMode(displayMode,
modeId);
outputModes.push_back(mode);
outputModeIdMap[modeId] = mode;
displayMode->Release();
@ -111,9 +113,9 @@ bool DeckLinkDevice::Init()
// get keyer support
attributes->GetFlag(BMDDeckLinkSupportsExternalKeying,
&supportsExternalKeyer);
&supportsExternalKeyer);
attributes->GetFlag(BMDDeckLinkSupportsInternalKeying,
&supportsInternalKeyer);
&supportsInternalKeyer);
// Sub Device Counts
attributes->GetInt(BMDDeckLinkSubDeviceIndex, &subDeviceIndex);
@ -139,7 +141,8 @@ 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;
@ -149,7 +152,7 @@ bool DeckLinkDevice::Init()
* BMDDeckLinkPersistentID for newer ones */
int64_t value;
if (attributes->GetInt(BMDDeckLinkPersistentID, &value) != S_OK &&
if (attributes->GetInt(BMDDeckLinkPersistentID, &value) != S_OK &&
attributes->GetInt(BMDDeckLinkTopologicalID, &value) != S_OK)
return true;
@ -161,14 +164,15 @@ bool DeckLinkDevice::Init()
bool DeckLinkDevice::GetInput(IDeckLinkInput **input)
{
if (device->QueryInterface(IID_IDeckLinkInput, (void**)input) != S_OK)
if (device->QueryInterface(IID_IDeckLinkInput, (void **)input) != S_OK)
return false;
return true;
}
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;
@ -176,9 +180,10 @@ 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;
}
@ -205,22 +210,24 @@ DeckLinkDeviceMode *DeckLinkDevice::FindOutputMode(long long id)
return outputModeIdMap[id];
}
const std::string& DeckLinkDevice::GetDisplayName(void)
const std::string &DeckLinkDevice::GetDisplayName(void)
{
return displayName;
}
const std::string& DeckLinkDevice::GetHash(void) const
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;
}
@ -235,7 +242,6 @@ int64_t DeckLinkDevice::GetAudioInputConnections()
return supportedAudioInputConnections;
}
bool DeckLinkDevice::GetSupportsExternalKeyer(void) const
{
return supportsExternalKeyer;
@ -256,7 +262,7 @@ int64_t DeckLinkDevice::GetSubDeviceIndex()
return subDeviceIndex;
}
const std::string& DeckLinkDevice::GetName(void) const
const std::string &DeckLinkDevice::GetName(void) const
{
return name;
}