Skip to main content

SessionOptions.h File

Runtime options and core Sample/Pull types. More...

Included Headers

#include "pipeline/SessionReport.h" #include "pipeline/TensorTypes.h" #include "pipeline/Tensor.h" #include "pipeline/TensorCore.h" #include <cstddef> #include <functional> #include <initializer_list> #include <optional> #include <string> #include <vector>

Namespaces Index

namespacesimaai
namespaceneat

Classes Index

structRtspServerOptions
structValidateOptions
structSessionOptions
structOutputTensorOptions
structPullError
structSample

Description

Runtime options and core Sample/Pull types.

File Listing

The file content with the documentation metadata removed is:

1
6#pragma once
7
10#include "pipeline/Tensor.h"
12
13#include <cstddef>
14#include <functional>
15#include <initializer_list>
16#include <optional>
17#include <string>
18#include <vector>
19
20namespace simaai::neat {
21
23 std::string mount = "image";
24 int port = 8554;
25 // Optional RTP/RTCP UDP port range. When set, the RTSP server will only
26 // allocate ports within [rtp_port_base, rtp_port_base + rtp_port_count - 1].
27 int rtp_port_base = -1;
29};
30
32 bool parse_launch = true; // build gst pipeline and verify element naming contract
33 bool enforce_names = true; // ensure no unnamed/foreign elements exist
34};
35
36enum class RunMode {
37 Async,
38 Sync,
39};
40
43 // Optional element name prefix/suffix applied per session (for uniqueness).
44 // Prefix/suffix are sanitized to valid element-name characters.
45 std::string element_name_prefix;
46 std::string element_name_suffix;
47};
48
50 std::string format = "RGB";
52
53 int target_width = -1;
54 int target_height = -1;
55 int target_fps = -1;
56};
57
58enum class SampleKind {
59 Tensor,
60 Bundle,
62};
63
64enum class PullStatus {
65 Ok,
67 Closed,
68 Error,
69};
70
71struct PullError {
72 // User-facing message. Should include [code] prefix when code is available.
73 std::string message;
74 // Canonical machine-triage code. Prefer values from pipeline/ErrorCodes.h.
75 std::string code;
76 // Optional structured report for runtime/plugin failures.
77 std::optional<SessionReport> report;
78};
79
80struct Sample {
82 bool owned = true;
83
84 std::optional<simaai::neat::Tensor> tensor;
85 std::vector<Sample> fields;
86
87 std::string caps_string;
88 std::string media_type;
89 std::string payload_tag;
90 std::string format; // Deprecated: use payload_tag.
91
92 int64_t frame_id = -1;
93 std::string stream_id;
94 std::string port_name;
95 int output_index = -1;
96 int64_t input_seq = -1;
97 int64_t orig_input_seq = -1;
98 int64_t pts_ns = -1;
99 int64_t dts_ns = -1;
100 int64_t duration_ns = -1;
101};
102
103inline Sample make_tensor_sample(const std::string& port_name, simaai::neat::Tensor tensor) {
104 Sample out;
106 out.port_name = port_name;
107 out.tensor = std::move(tensor);
108 return out;
109}
110
111inline Sample make_bundle_sample(std::initializer_list<Sample> fields) {
112 Sample out;
114 out.fields = fields;
115 return out;
116}
117
118} // namespace simaai::neat

Generated via doxygen2docusaurus 2.0.0 by Doxygen 1.9.1.