Writing a new libnopegl nodeΒΆ
The vast majority of the code is βnode codeβ, in files following the node_*.c
pattern. Since nodes need to be able to introspect each others, all their
respective βprivateβ context are declared in a common (not publicly exposed)
header internal.h. This header also contains the structures definitions and
prototypes required to implement a new node.
In order to add a node, you need to:
In
nopegl.h.in: declare a newNGL_NODE_*with an arbitrary unique FourCCCreate a
node_*.cfile declaring aconst struct node_class. Donβt forget the Copyright header. See other node files, such asnode_identity.cin
nodes_register.h: register the new nodeReference the source file node in
libnopegl/meson.buildRun
make nopegl-updatespecs(from the top-level Makefile) to updatenodes.specsevery time you update the parameters of the nodeRefer to internal.h for the available callbacks to implement in your class map