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

@ -9,7 +9,7 @@
class DeckLinkDevice;
typedef void (*DeviceChangeCallback)(void *param, DeckLinkDevice *device,
bool added);
bool added);
struct DeviceChangeInfo {
DeviceChangeCallback callback;
@ -19,11 +19,11 @@ struct DeviceChangeInfo {
class DeckLinkDeviceDiscovery : public IDeckLinkDeviceNotificationCallback {
protected:
ComPtr<IDeckLinkDiscovery> discovery;
long refCount = 1;
bool initialized = false;
long refCount = 1;
bool initialized = false;
std::recursive_mutex deviceMutex;
std::vector<DeckLinkDevice*> devices;
std::vector<DeckLinkDevice *> devices;
std::vector<DeviceChangeInfo> callbacks;
public:
@ -44,8 +44,7 @@ public:
info.param = param;
for (DeviceChangeInfo &curCB : callbacks) {
if (curCB.callback == callback &&
curCB.param == param)
if (curCB.callback == callback && curCB.param == param)
return;
}
@ -60,7 +59,7 @@ public:
DeviceChangeInfo &curCB = callbacks[i];
if (curCB.callback == callback &&
curCB.param == param) {
curCB.param == param) {
callbacks.erase(callbacks.begin() + i);
return;
}
@ -69,9 +68,9 @@ public:
DeckLinkDevice *FindByHash(const char *hash);
inline void Lock() {deviceMutex.lock();}
inline void Unlock() {deviceMutex.unlock();}
inline const std::vector<DeckLinkDevice*> &GetDevices() const
inline void Lock() { deviceMutex.lock(); }
inline void Unlock() { deviceMutex.unlock(); }
inline const std::vector<DeckLinkDevice *> &GetDevices() const
{
return devices;
}