I'm trying to check, and possibly set the value of a setting, in particular the SDI video format to match a frame rate known from the environment rv is launched in. I have a MinorMode which applies rv session modifications to the various "fps" values (for image sequences) via callback from the new-source event. This works fine for the desktop, but when viewing in presentation via rvsdi it appears the videoFormat setting needs to be tweaked for frame-rate too.
More simply, this python test code works:
readSetting = \
r'''{
let SettingsValue.Int vf = readSetting("OpenExr", "iosize", SettingsValue.Int(-1));
vf;
}'''
print("INFO: %s" % rv.runtime.eval(readSetting, ["commands"]))
which outputs INFO: 61440
With my RV.conf containing
[NVIDIA-SDI]
0\dataFormat=8
0\videoFormat=34
0\syncMode=1
0\syncSource=0
I would also like to be able to query and set the videoFormat at initialization, but can't figure out how to get something like the following to work:
readSetting = \
r'''{
let SettingsValue.Int vf = readSetting("NVIDIA-SDI", "0\videoFormat", SettingsValue.Int(-1));
vf;
}'''
print("INFO: %s" % readSetting)
which incorrectly outputs INFO: -1
and
writeSetting = \
r'''{
writeSetting("NVIDIA-SDI", "0\videoFormat", SettingsValue.Int(%s));
}''' % 32
rv.runtime.eval(writeSetting, ["commands"])
which modifies with the wrong name in my RV.conf
[NVIDIA-SDI]
0\dataFormat=8
0\videoFormat=34
0\syncMode=1
0\syncSource=0
0%5CvideoFormat=32
Several permutations of backslashes tried, to no avail.
Is there a way (simpler even) to achieve my goal?