Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion AJA.noscfg
Original file line number Diff line number Diff line change
Expand Up @@ -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.",
Expand Down
2 changes: 1 addition & 1 deletion External/libajantv2
16 changes: 9 additions & 7 deletions Source/AJADevice.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Copy link

Copilot AI Jan 8, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Inconsistent indentation: this line uses tabs while the surrounding code uses spaces for indentation. This should match the indentation style of the rest of the file.

Copilot uses AI. Check for mistakes.
}
Comment on lines 1019 to +1024
Copy link

Copilot AI Jan 8, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The logic for handling device acquisition has been changed incorrectly. Previously, the warning was logged when the device was acquired by ANY other application (curPid != 0, and after the early return check, this meant curPid != nosPid). Now the warning is only logged when curPid == nosPid (same process), which is contradictory to the message saying "Trying to reclaim it". The warning should be logged when the device is acquired by a DIFFERENT application, not the same one. The condition should be 'if (curPid != nosPid)' instead of wrapping the warning in the 'if (curPid == nosPid)' block.

Copilot uses AI. Check for mistakes.
}

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)
Copy link

Copilot AI Jan 8, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing space after 'if' keyword. The code style should have a space between 'if' and the opening parenthesis for consistency with the rest of the codebase.

Suggested change
if(nosPid != curPid)
if (nosPid != curPid)

Copilot uses AI. Check for mistakes.
nosEngine.LogD("Device %s acquired by Nodos.", GetDisplayName().c_str());
return true;
}

Expand All @@ -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());
Expand Down