Chapter 2 — Using the Filter Manager API
23
Common Encode Parameters: The Windows Registry
Changing Individual Registry Settings
The production release of version 2.6 of the Argus SDK contains source code for
a sample application that illustrates the loading, modification, and saving of each
of the individual Registry settings. This source code is installed in the
C:\Program
Files\Vela Research\Argus\SDK\RegCtrlPnl
folder. You'll probably find that you
can set most of the encoding properties once using a Registry editing tool like the
RegCtrlPnl application, then leave the settings untouched.
However, a few properties (for example, the output file name and the VTR
mark-in and mark-out) are likely to change with each encode. Using the source
code of the RegCtrlPnl application as an example, you can programmatically
change these settings before loading and cueing for each encoding session.
RegCtrlPnl includes source code for a Registry-management class, CRegistry,
that makes it easy for you to access and change Registry settings.
Registry-Access Methods Exposed Through Filter Manager
The Filter Manager interface exposes a
Load()
method that loads the full set of
encode parameters from the Registry into memory, as well as a
Save()
method
that writes all of the encoder's current property settings to the Registry. Before
calling the FilterManager
Cue()
method to set up for an encode, you should first
write to the Registry any individual property changes that you need to make, then
call
Load()
to load all of the encoder settings into memory. Refer to the source
code of our sample application, FMTestApp, for an example. You can preserve
the current encoder settings by calling
Save()
with each encode.
long Load() –
Loads all of the settings from the Registry locations listed above,
except for those in the EncoderConfig table (this table is read once only, dur-
ing the Filter Manager initialization process). If the Registry does not yet
exist, the
Load()
call creates it, enters all of the Registry keys, and assigns
their default values.
Note that the
Load()
method no longer takes an argument, as it did in version 2.2.
The
Load()
method returns 0 if it successfully loads encoding parameters from
the Registry. If it fails, it returns a negative number defined in Appendix C.
long Save() –
Saves to the appropriate Registry keys all of the encoding parame-
ters that are currently in memory, except for those in the EncoderConfig table.
It returns 0 if the save procedure finished successfully or a negative error code,
defined in Appendix C, if the procedure was unsuccessful.