Scene parameters, Selected and active scene graph – Grass Valley K2 Edge Protocol Manual v1.0 User Manual

Page 13

Advertising
background image

K2 Edge Protocol Manual – document version 1.0 – Page 13

4.6. Scene parameters

Some sub commands accept scene parameters, plug-in values similar to arguments for a function call.

Scene parameters come in two parts: the parameter name and parameter value. Sub commands that

accept scene parameters, allow (re-)definition of one or more of these parameters.

In the example below, two scene parameters named 'id' and 'count' are given a value, along with sub

command preload:

{cmd=nre; subcmd=preload; template=ShowLogo; spname0=id; spvalue0=a0001;

spname1=count; spvalue1=42;}

Note how each of the scene parameters is defined over two numbered fields; a matching

spnameN and

spvalueN field.

These are the rules for specifying scene parameters in the command string:

The parameter name is defined as the value of a spnameN field, while the parameter value is

defined as the value of a spvalueN field with identical value for N.

N is '0' (and not '00' or '000') for the first scene parameter, and increments in steps of 1.

Breaking the sequence is interpreted as end-of-parameters.

For example, a sequence of

spname0 spname1 spname3 is seen as just two parameters

because the sequence is broken after spname1.

Any number of scene parameters can be defined (as long as the sequence is kept intact).

Order of definition of scene parameters is not important.

Scene parameters are global variables shared by all NRE instances.

The scene parameter values used by a template instance are fetched and stored as local copies

at the start of the preload phase. Changing scene parameter values during the preload or

playback phase of an instance will have no effect.

4.7. Selected and active scene graph

It is important here to understand the following two concepts:

1. The selected scene graph is the one receiving NRE commands.

2. The active scene graph is the one being used for actual rendering. Or in other words, the scene

graph that produces output.

In the normally simple situation there is only one scene graph in use, and is both the selected- and active

scene graph.

Selecting a scene graph using sub command

sg-select (or using the sg-select field) makes it the

new target for all following NRE commands. Note however that the selected scene graph will not

immediately be made the active one. Instead, this will only happen the moment the first template running

on the selected scene graph has finished preloading and starts the playback phase.

Switching active scene graphs is performed with a hard cut from the old- to the new scene graph. The

switch will abruptly stop all templates still running on the older scene graph.

Advertising