Skip to main content

Module controller

Module controller 

Source
Expand description

Animated properties (M882), the gst-controller analog: a property’s value becomes a function of stream time instead of a constant set once at build time. A ControlSource is a keyframed curve, a ControlProgram binds curves to one node’s property names, and the runner samples the bindings at each frame’s PTS before handing that frame to the element.

The program is checked against the element’s own PropertySpec table when the graph starts (ControlProgram::resolve), so a misspelled or non-animatable property fails the run before any frame flows rather than animating nothing.

Structs§

ArmController
A ControlProgram resolved against its element, held by the arm that owns that element. The runner builds one per controlled node at startup and applys it before each DataFrame.
ControlFault
Why a ControlProgram could not be resolved or applied, and to which property. The runner logs it and fails the run (G2gError::ControlBinding).
ControlProgram
The animated properties of one graph node: property name -> curve. Attach it with Graph::set_node_control.

Enums§

ControlReason
ControlSource
A keyframed value curve, sampled by PTS. Values are f64 regardless of the property’s kind; the conversion to the property’s type happens at apply.

Constants§

CONTROL_CATEGORY
The log category a controller fault is reported on, so G2G_DEBUG=controller:debug follows the animation independently of element logging (as CAPS_CATEGORY does for the solver).

Traits§

ControlTarget
The property surface a controller drives. Implemented for the erased element traits the runner’s arms hold, so one sampling path serves a transform, a sink, and a fan-in element. Those traits are std-only (a no_std graph runs monomorphised elements), so the impls are too; an element type can implement this directly to be driven without them.