obsproject / obsproject/obs-studio
aja: Avoid unconfiguring an aja device if it is in use
Nobody has claimed this yet.
- Dominant language
- C
- Stars
- 76.4k
- Forks
- 10.2k
- Avg merge
- 4d 23h
- Merged PRs (30d)
- 12
Description
Operating System Info
Windows 10
Other OS
No response
OBS Studio Version
28.0.3
OBS Studio Version (Other)
No response
OBS Studio Log URL
OBS Studio Crash Log URL
No response
Expected Behavior
If the aja device is already in use by other application, I would expect obs not changes anything from the current configuration. Not sure if the solution would be avoiding loading itself, or continuing the execution but not clearing the configuration.
Current Behavior
If the driver is installed, execution will run to CardEntry::Initialize, where it executes the following:
mCard->SetSuspendHostAudio(true);
mCard->ClearRouting();
if (NTV2DeviceCanDoMultiFormat(deviceID)) {
mCard->SetMultiFormatMode(true);
}
mCard->SetReference(NTV2_REFERENCE_FREERUN);
Among other commands. If OBS integration needs the current card to be in an explicit state, then the obs_module_load probably should return false if any installed card is in use (probably with AcquireStreamForApplication?):
pinging @paulh-aja here.
Thanks,
Steps to Reproduce
- Configure an aja output with another application
- Launch obs
- Check aja output is unconfigured
Anything else we should know?
No response
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in plugins/aja/main.cpp and trace the CardEntry::Initialize path described in the report, including AcquireStreamForApplication. Reproduce the case with an AJA output configured by another application and determine how OBS can avoid clearing the device configuration. Done means launching OBS no longer unconfigures an in-use AJA device.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- audio-video-rtc
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100