From 4e778778ed5637270d94a2ee16fd61d6e16effd2 Mon Sep 17 00:00:00 2001 From: Caner Date: Thu, 8 Jan 2026 13:24:25 +0300 Subject: [PATCH 1/2] Fix aja in not working correctly in linux This was probably caused by aja driver resetting the device state after an application releases the device. Fixed by acquiring/releasing with refcounting provided by aja sdk itself. --- AJA.noscfg | 2 +- Source/AJADevice.cpp | 16 +++++++++------- 2 files changed, 10 insertions(+), 8 deletions(-) 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/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()); From bb1499d086a64edc7341280e879b01665aae589a Mon Sep 17 00:00:00 2001 From: Caner Date: Thu, 8 Jan 2026 16:24:20 +0300 Subject: [PATCH 2/2] Fix ref counting on windows --- External/libajantv2 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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