Skip to main content

graph Namespace

Definition

namespace simaai::neat::graph { ... }

Namespaces Index

namespacedsl
namespacehelpers
namespacenodes
namespaceruntime
namespacestrict_sync

Classes Index

structCompiledGraph

Result produced by Compiler::compile: pipelines, stages, edges, specs, and port names. More...

structCompiledPipelineSegment

Compiled view of a contiguous pipeline-backend segment in the runtime graph. More...

structCompiledStageNode

Compiled record for a single stage-backend node in the runtime graph. More...

classCompiler

Runtime-graph compiler that partitions a Graph into pipeline segments and stages. More...

structEdge

Directed connection from one node's output port to another node's input port. More...

structEdgeSpec

Per-edge spec captured by the compiler — the propagated OutputSpec and a completeness flag. More...

classGraph

Directed acyclic graph of hybrid nodes with named ports. More...

classGraphPrinter

Pretty-printer for runtime Graph instances; emits text, dot, or mermaid. More...

classGraphRun

Live runtime handle for a compiled Graph. More...

structGraphRunOptions

Tuning knobs for a GraphRun — queue capacities, push/pull timeouts, verbosity. More...

structGraphRunPullOptions

Tuning knobs for GraphRun::pull_until() / PullSession::run(). More...

structGraphRunStats

Per-node, per-stream telemetry collector for a running GraphRun. More...

classGraphSession

Builder for a runtime graph — compile a Graph into a runnable GraphRun. More...

classNode

Base class for hybrid graph nodes. More...

structPortDesc

Description of one input or output port on a graph node. More...

classStageEmitter

Runtime-owned output handle for stages that stream while on_input() is active. More...

classStageExecutor

Actor-style executor base class — implement to add a new runtime-graph stage. More...

structStageMsg

A single input message handed to a StageExecutor. More...

structStageOutMsg

A single output message produced by a StageExecutor. More...

structStagePorts

Resolved port-id table for a stage — populated by the runtime before start(). More...

structStreamMetadataDefaults

Defaults applied to a Sample by the StreamMetadata stage. More...

Typedefs Index

usingNodeId = std::size_t

Strongly-typed graph node identifier. More...

usingPortId = std::uint32_t

Strongly-typed graph port identifier (per-node). More...

Enumerations Index

enum classBackend { ... }

Backend a graph node executes on (legacy GStreamer pipeline vs hybrid Stage runtime). More...

Functions Index

voidensure_stream_metadata (Sample &sample, const StreamMetadataDefaults &defaults, std::unordered_map< std::string, int64_t > *next_seq=nullptr)

Apply StreamMetadataDefaults to a sample, filling in missing fields. More...

Variables Index

static constexpr NodeIdkInvalidNode = static_cast<NodeId>(-1)

Sentinel value for an unset/invalid NodeId. More...

static constexpr PortIdkInvalidPort = static_cast<PortId>(-1)

Sentinel value for an unset/invalid PortId. More...

Typedefs

NodeId

using simaai::neat::graph::NodeId = typedef std::size_t

Strongly-typed graph node identifier.

Definition at line 23 of file GraphTypes.h.

23using NodeId = std::size_t;

PortId

using simaai::neat::graph::PortId = typedef std::uint32_t

Strongly-typed graph port identifier (per-node).

Definition at line 25 of file GraphTypes.h.

25using PortId = std::uint32_t;

Enumerations

Backend

enum class simaai::neat::graph::Backend
strong

Backend a graph node executes on (legacy GStreamer pipeline vs hybrid Stage runtime).

Enumeration values
PipelineNode runs as a GStreamer element inside the pipeline backend
StageNode runs as a Stage in the hybrid graph runtime

Definition at line 17 of file GraphTypes.h.

17enum class Backend {
19 Stage,
20};

Functions

ensure_stream_metadata()

void simaai::neat::graph::ensure_stream_metadata (Sample & sample, const StreamMetadataDefaults & defaults, std::unordered_map< std::string, int64_t > * next_seq=nullptr)
inline

Apply StreamMetadataDefaults to a sample, filling in missing fields.

Fills stream_id, sequence numbers, caps string, labels, media type, format, and payload tag on sample from defaults where the sample lacks values. The optional next_seq map is used to mint per-stream input_seq values when neither the sample nor defaults supply one.

Parameters
sample

Sample to mutate in place.

defaults

Defaults source.

next_seq

Optional per-stream sequence counter, keyed by stream id.

Definition at line 53 of file GraphMetadata.h.

53inline void ensure_stream_metadata(Sample& sample, const StreamMetadataDefaults& defaults,
54 std::unordered_map<std::string, int64_t>* next_seq = nullptr) {
55 if (sample.stream_id.empty() && defaults.fill_stream_id) {
56 if (!defaults.stream_id.empty()) {
57 sample.stream_id = defaults.stream_id;
58 } else {
59 sample.stream_id = "stream0";
60 }
61 }
62
63 if (defaults.fill_input_seq && sample.input_seq < 0) {
64 if (sample.orig_input_seq >= 0) {
65 sample.input_seq = sample.orig_input_seq;
66 } else if (next_seq) {
67 auto& next = (*next_seq)[sample.stream_id];
68 sample.input_seq = next++;
69 } else {
70 sample.input_seq = 0;
71 }
72 }
73
74 if (defaults.fill_orig_input_seq && sample.orig_input_seq < 0) {
75 sample.orig_input_seq = sample.input_seq;
76 }
77
78 if (sample.caps_string.empty() && !defaults.caps_string.empty()) {
79 sample.caps_string = defaults.caps_string;
80 }
81 if (sample.stream_label.empty()) {
82 if (!defaults.stream_label.empty()) {
83 sample.stream_label = defaults.stream_label;
84 } else if (!defaults.port_name.empty()) {
85 sample.stream_label = defaults.port_name;
86 }
87 }
88 if (sample.port_name.empty() && !defaults.port_name.empty()) {
89 sample.port_name = defaults.port_name;
90 }
91 if (sample.media_type.empty() && !defaults.media_type.empty()) {
92 sample.media_type = defaults.media_type;
93 }
94 if (sample.format.empty() && !defaults.format.empty()) {
95 sample.format = defaults.format;
96 }
97 if (sample.payload_tag.empty() && !defaults.payload_tag.empty()) {
98 sample.payload_tag = defaults.payload_tag;
99 }
100}

Variables

kInvalidNode

constexpr NodeId simaai::neat::graph::kInvalidNode = static_cast<NodeId>(-1)
constexpr static

Sentinel value for an unset/invalid NodeId.

Definition at line 28 of file GraphTypes.h.

28static constexpr NodeId kInvalidNode = static_cast<NodeId>(-1);

kInvalidPort

constexpr PortId simaai::neat::graph::kInvalidPort = static_cast<PortId>(-1)
constexpr static

Sentinel value for an unset/invalid PortId.

Definition at line 30 of file GraphTypes.h.

30static constexpr PortId kInvalidPort = static_cast<PortId>(-1);

The documentation for this namespace was generated from the following files:


Generated via doxygen2docusaurus 2.0.0 by Doxygen 1.9.8.