Module

Inheritance diagram of Module

Module inheritance diagram

class savant.config.schema.Module(name, parameter_init_priority=<factory>, parameters=<factory>, dynamic_parameters=<factory>, pipeline='???')

Module configuration template. Top-level configuration entity, validates all entries in a module config file. For example,

name: module_name
parameters:
pipeline:
    source:
        element: uridecodebin
        properties:
            uri: file:///data/test.mp4
    elements:
    sink:
        - element: console_sink
name: str

Module name.

parameter_init_priority: Dict[str, int]

Priority of use for various sources during module’s parameters initialization through initializer resolver. Lower numbers mean higher priority. Example:

parameter_init_priority:
    environment: 20
    etcd: 10

Two init sources are configured, etcd (higher priority) and environment (lower priority). For every parameter that is configured to use initializer resolver, eg

parameters:
    frame:
        width: ${initializer:frame_width,1280}

Etcd storage will be polled for the current value first, in the event etcd is unavailable resolver will try to get frame_width environment variable, and if that is not set, then default value of 1280 will be used.

parameters: Dict[str, Any]

Module parameters.

dynamic_parameters: Dict[str, Any]

Those module parameters current value of which is dependent on remote storage and can be updated at runtime.

For example, roi config node in

dynamic_parameters:
    # (x_center, y_center, width, height, angle)
    roi: [960, 540, 1920, 1080, 0]
pipeline: Pipeline = '???'

Pipeline configuration.