AJA NTV2 SDK
17.1.3.1410
NTV2 SDK 17.1.3.1410
|
If itʼs possible that your OEM application might coexist with another AJA-aware application on the host computer, itʼs likely neither application will run correctly if they both attempt to control the same AJA device at the same time.
Once your application has found the device it needs to use, AJA strongly recommends obtaining exclusive use of it to prevent collisions with other applications, including AJAʼs own utilities and applications.
When AJA’s “retail” software is installed, it provides an agent that manages device ownership and provides convenient device widget routing and configuration services to “retail” client applications (e.g., Adobe, Avid, QuickTime, etc.). It also configures attached devices to a reasonable default state, or to a preferred state as configured by the user via the AJA ControlPanel application.
The ControlPanel provides a user interface for end-users to set default routing, conversions, and other device settings. It communicates configuration changes to the AJA agent through a database stored on the hostʼs file system. The agent enforces the settings stored in the database in an “every frame” task that’s called at every VBI interval.
Prior to AJA software version 17.0, the agent was implemented as a separate process:
In AJA software version 17.0, the agent service was moved into the ControlPanel application.
If an application sets the task mode (using CNTV2Card::SetEveryFrameServices) to NTV2_OEM_TASKS for a particular device, the agent servicing that device bows out, and stops controlling it.
Some OEM developers require their application to operate on Linux or Windows without AJA “retail” software installed. This is still supported in version 17.0.
To determine if an AJA device is being used by another application, whether it be an OEM application, or one that uses the Control Panel services, application writers should call CNTV2Card::GetStreamingApplication.
To acquire and release exclusive use of an AJA device, OEM application writers must call CNTV2Card::AcquireStreamForApplication or CNTV2Card::ReleaseStreamForApplication, respectively.
In addition to ensuring that other applications wonʼt use use the same AJA device, many applications often need to configure the device differently than the Control Panel settings dictate. These applications must disable the retail (AJA ControlPanel) services by running in “OEM mode”, which is done by calling CNTV2Card::SetEveryFrameServices, passing it NTV2_OEM_TASKS. To be a good citizen, before changing this setting, the old setting should be saved (by calling CNTV2Card::GetEveryFrameServices) and restored when the device is released.
The demonstration applications all use these techniques, and can be used as “best practice” examples.
Some applications may require several programs that run concurrently, all using the same AJA device. For example, there may be one capture or playout process instance running for each AutoCirculate channel thatʼs available on the device.
In this case, AJA recommends using a controlling (parent) process that does the following: