Sample Struct
Typed payload returned by Run::pull() and consumed by Run::push(). More...
Declaration
Included Headers
Public Member Attributes Index
| SampleKind | kind = SampleKind::Unknown |
|
Discriminator: which payload field is meaningful. More... | |
| bool | owned = ... |
|
If false, the framework holds a borrowed reference to the underlying buffer. More... | |
| std::optional< simaai::neat::Tensor > | tensor |
| TensorList | tensors |
|
Set when kind == TensorSet. More... | |
| std::vector< Sample > | fields |
|
Set when kind == Bundle (recursive multi-logical-output). More... | |
| std::string | caps_string |
|
Caps string from the source GStreamer buffer (for media-typed payloads). More... | |
| std::string | media_type |
|
MIME-style media type (e.g., "video/x-raw", "application/vnd.simaai.tensor"). More... | |
| std::string | payload_tag |
|
Subformat tag (e.g., "NV12", "FP32", "INT8"). More... | |
| std::string | format |
|
Subformat tag for the payload. More... | |
| int64_t | frame_id = -1 |
|
Source-assigned frame ID, when carried. More... | |
| std::string | stream_id |
|
Stream identifier (multi-stream pipelines). More... | |
| std::string | stream_label |
|
Human-readable stream label. More... | |
| std::string | port_name |
|
Ingress port name (multi-input models). More... | |
| int | output_index = -1 |
|
Logical output index this sample corresponds to. More... | |
| int | logical_output_index = -1 |
|
Logical output index this sample corresponds to. More... | |
| int | memory_index = -1 |
|
Underlying memory segment index (advanced; for zero-copy routing). More... | |
| int | route_slot = -1 |
|
Route-graph slot identifier (advanced). More... | |
| std::string | segment_name |
|
Memory segment name (advanced). More... | |
| int64_t | input_seq = -1 |
|
Input sequence number assigned at push time (lets pull match push). More... | |
| int64_t | orig_input_seq = ... |
|
Original input sequence (when re-numbered through a sub-pipeline). More... | |
| int64_t | pts_ns = -1 |
|
Presentation timestamp in nanoseconds (-1 if absent). More... | |
| int64_t | dts_ns = -1 |
|
Decoding timestamp in nanoseconds (-1 if absent). More... | |
| int64_t | duration_ns = -1 |
Description
Typed payload returned by Run::pull() and consumed by Run::push().
A Sample is a tagged union: depending on kind, exactly one of tensor, tensors, or fields is meaningful. Includes per-buffer metadata: stream/port labels, timestamps, frame IDs, and routing slot information. Use make_tensor_sample(), make_image_sample(), or make_bundle_sample() to construct typed Samples ergonomically.
Definition at line 379 of file SessionOptions.h.
Public Member Attributes
caps_string
|
Caps string from the source GStreamer buffer (for media-typed payloads).
Definition at line 389 of file SessionOptions.h.
dts_ns
|
Decoding timestamp in nanoseconds (-1 if absent).
Definition at line 413 of file SessionOptions.h.
duration_ns
|
Sample duration in nanoseconds (-1 if absent).
Definition at line 414 of file SessionOptions.h.
fields
|
Set when kind == Bundle (recursive multi-logical-output).
Definition at line 386 of file SessionOptions.h.
format
|
Subformat tag for the payload.
- Deprecated
-
Use payload_tag. Kept for transition.
Definition at line 396 of file SessionOptions.h.
frame_id
|
Source-assigned frame ID, when carried.
Definition at line 398 of file SessionOptions.h.
input_seq
|
Input sequence number assigned at push time (lets pull match push).
Definition at line 409 of file SessionOptions.h.
kind
|
Discriminator: which payload field is meaningful.
Definition at line 380 of file SessionOptions.h.
logical_output_index
|
Logical output index this sample corresponds to.
Definition at line 405 of file SessionOptions.h.
media_type
|
MIME-style media type (e.g., "video/x-raw", "application/vnd.simaai.tensor").
Definition at line 390 of file SessionOptions.h.
memory_index
|
Underlying memory segment index (advanced; for zero-copy routing).
Definition at line 406 of file SessionOptions.h.
orig_input_seq
|
Original input sequence (when re-numbered through a sub-pipeline).
- Initialiser
-
= -1
Definition at line 410 of file SessionOptions.h.
output_index
|
Logical output index this sample corresponds to.
- Deprecated
-
Legacy alias for logical_output_index.
Definition at line 404 of file SessionOptions.h.
owned
|
If false, the framework holds a borrowed reference to the underlying buffer.
- Initialiser
-
= true
Definition at line 381 of file SessionOptions.h.
payload_tag
|
Subformat tag (e.g., "NV12", "FP32", "INT8").
Replaces deprecated format.
Definition at line 392 of file SessionOptions.h.
port_name
|
Ingress port name (multi-input models).
Definition at line 401 of file SessionOptions.h.
pts_ns
|
Presentation timestamp in nanoseconds (-1 if absent).
Definition at line 412 of file SessionOptions.h.
route_slot
|
Route-graph slot identifier (advanced).
Definition at line 407 of file SessionOptions.h.
segment_name
|
Memory segment name (advanced).
Definition at line 408 of file SessionOptions.h.
stream_id
|
Stream identifier (multi-stream pipelines).
Definition at line 399 of file SessionOptions.h.
stream_label
|
Human-readable stream label.
Definition at line 400 of file SessionOptions.h.
tensor
|
Set when kind == Tensor.
Definition at line 384 of file SessionOptions.h.
tensors
|
Set when kind == TensorSet.
Definition at line 385 of file SessionOptions.h.
The documentation for this struct was generated from the following file:
Generated via doxygen2docusaurus 2.0.0 by Doxygen 1.9.8.