diff --git a/AJA.noscfg b/AJA.noscfg index bd53c08..162df08 100644 --- a/AJA.noscfg +++ b/AJA.noscfg @@ -2,7 +2,7 @@ "info": { "id": { "name": "nos.aja", - "version": "2.7.0" + "version": "2.7.1" }, "display_name": "AJA", "description": "Video I/O plugin for AJA cards.", diff --git a/External/libajantv2 b/External/libajantv2 index e6f9bac..6b8f73f 160000 --- a/External/libajantv2 +++ b/External/libajantv2 @@ -1 +1 @@ -Subproject commit e6f9bac269e5730c82f6a0873f9a1b98ed80300a +Subproject commit 6b8f73ff364c52e9ca248cb1da5a39d11444fb07 diff --git a/Source/AJADevice.cpp b/Source/AJADevice.cpp index 870a190..98e183d 100644 --- a/Source/AJADevice.cpp +++ b/Source/AJADevice.cpp @@ -1017,18 +1017,20 @@ bool AJADevice::AcquireDevice() if (GetStreamingApplication(curAppFourCC, curPid)) { if (curPid == nosPid) - return true; - auto curApp = FourCCToString(curAppFourCC); - if (curPid != 0) - nosEngine.LogW("Device %s is already acquired by application %s (PID %d). Trying to reclaim it.", GetDisplayName().c_str(), curApp.c_str(), curPid); + { + auto curApp = FourCCToString(curAppFourCC); + if (curPid != 0) + nosEngine.LogW("Device %s is already acquired by application %s (PID %d). Trying to reclaim it.", GetDisplayName().c_str(), curApp.c_str(), curPid); + } } - if (!AcquireStreamForApplication(NOS_FOURCC, nosPid)) + if (!AcquireStreamForApplicationWithReference(NOS_FOURCC, nosPid)) { nosEngine.LogE("Failed to acquire device %s for Nodos.", GetDisplayName().c_str()); return false; } - nosEngine.LogD("Device %s acquired by Nodos.", GetDisplayName().c_str()); + if(nosPid != curPid) + nosEngine.LogD("Device %s acquired by Nodos.", GetDisplayName().c_str()); return true; } @@ -1052,7 +1054,7 @@ void AJADevice::ReleaseDevice() return; } - if (ReleaseStreamForApplication(NOS_FOURCC, nosPid)) + if (ReleaseStreamForApplicationWithReference(NOS_FOURCC, nosPid)) nosEngine.LogD("Device %s released by Nodos", GetDisplayName().c_str()); else nosEngine.LogE("Failed to release device %s", GetDisplayName().c_str());