Skip to main content

SimaPluginStaticManifestAbi.h File

Included Headers

#include <gst/gst.h>

Classes Index

structSimaPluginStaticManifestAbiHeader
structSimaPluginStaticManifestAccessorV1

Typedefs Index

typedefstruct SimaPluginStaticManifestAbiHeader SimaPluginStaticManifestAbiHeader
typedefstruct SimaPluginStaticManifestAccessorV1 SimaPluginStaticManifestAccessorV1

Functions Index

static gbooleansima_plugin_manifest_context_matches (const GstContext *context)
static const GstStructure *sima_plugin_manifest_context_structure (const GstContext *context)
static const SimaPluginStaticManifestAccessorV1 *sima_plugin_manifest_context_accessor (const GstContext *context)
static const gchar *sima_plugin_manifest_lookup_stage_by_element_name (const SimaPluginStaticManifestAccessorV1 *accessor, const gchar *element_name)
static const gchar *sima_plugin_manifest_lookup_stage_by_logical_id (const SimaPluginStaticManifestAccessorV1 *accessor, const gchar *logical_stage_id)

Macro Definitions Index

#defineSIMA_PLUGIN_STATIC_MANIFEST_CONTEXT_TYPE   "sima.model.manifest.v1"
#defineSIMA_PLUGIN_STATIC_MANIFEST_ABI_VERSION   ((guint)1)
#defineSIMA_PLUGIN_STATIC_MANIFEST_KEY_VERSION   "manifest_version"
#defineSIMA_PLUGIN_STATIC_MANIFEST_KEY_JSON   "manifest_json"
#defineSIMA_PLUGIN_STATIC_MANIFEST_KEY_SESSION_ID   "session_id"
#defineSIMA_PLUGIN_STATIC_MANIFEST_KEY_MODEL_ID   "model_id"
#defineSIMA_PLUGIN_STATIC_MANIFEST_KEY_ACCESSOR_V1   "manifest_accessor_v1"

Typedefs

SimaPluginStaticManifestAbiHeader

typedef struct SimaPluginStaticManifestAbiHeader SimaPluginStaticManifestAbiHeader

Definition at line 41 of file SimaPluginStaticManifestAbi.h.

SimaPluginStaticManifestAccessorV1

typedef struct SimaPluginStaticManifestAccessorV1 SimaPluginStaticManifestAccessorV1

Definition at line 60 of file SimaPluginStaticManifestAbi.h.

Functions

sima_plugin_manifest_context_accessor()

const SimaPluginStaticManifestAccessorV1* sima_plugin_manifest_context_accessor (const GstContext * context)
inline static

Definition at line 79 of file SimaPluginStaticManifestAbi.h.

79sima_plugin_manifest_context_accessor(const GstContext* context) {
80 const GstStructure* structure = sima_plugin_manifest_context_structure(context);
81 if (!structure) {
82 return NULL;
83 }
84 const GValue* accessor_val =
85 gst_structure_get_value(structure, SIMA_PLUGIN_STATIC_MANIFEST_KEY_ACCESSOR_V1);
86 if (!accessor_val || !G_VALUE_HOLDS_POINTER(accessor_val)) {
87 return NULL;
88 }
90 (const SimaPluginStaticManifestAccessorV1*)g_value_get_pointer(accessor_val);
91 if (!accessor || accessor->abi_version != SIMA_PLUGIN_STATIC_MANIFEST_ABI_VERSION) {
92 return NULL;
93 }
94 return accessor;
95}

sima_plugin_manifest_context_matches()

gboolean sima_plugin_manifest_context_matches (const GstContext * context)
inline static

Definition at line 62 of file SimaPluginStaticManifestAbi.h.

62static inline gboolean sima_plugin_manifest_context_matches(const GstContext* context) {
63 if (!context) {
64 return FALSE;
65 }
66 return g_strcmp0(gst_context_get_context_type(context),
68}

sima_plugin_manifest_context_structure()

const GstStructure* sima_plugin_manifest_context_structure (const GstContext * context)
inline static

Definition at line 71 of file SimaPluginStaticManifestAbi.h.

71sima_plugin_manifest_context_structure(const GstContext* context) {
72 if (!sima_plugin_manifest_context_matches(context)) {
73 return NULL;
74 }
75 return gst_context_get_structure(context);
76}

sima_plugin_manifest_lookup_stage_by_element_name()

const gchar* sima_plugin_manifest_lookup_stage_by_element_name (const SimaPluginStaticManifestAccessorV1 * accessor, const gchar * element_name)
inline static

Definition at line 97 of file SimaPluginStaticManifestAbi.h.

97static inline const gchar* sima_plugin_manifest_lookup_stage_by_element_name(
98 const SimaPluginStaticManifestAccessorV1* accessor, const gchar* element_name) {
99 if (!accessor || !accessor->stage_json_by_element_name || !element_name || !*element_name) {
100 return NULL;
101 }
102 return accessor->stage_json_by_element_name(accessor->user_data, element_name);
103}

sima_plugin_manifest_lookup_stage_by_logical_id()

const gchar* sima_plugin_manifest_lookup_stage_by_logical_id (const SimaPluginStaticManifestAccessorV1 * accessor, const gchar * logical_stage_id)
inline static

Definition at line 106 of file SimaPluginStaticManifestAbi.h.

106sima_plugin_manifest_lookup_stage_by_logical_id(const SimaPluginStaticManifestAccessorV1* accessor,
107 const gchar* logical_stage_id) {
108 if (!accessor || !accessor->stage_json_by_logical_stage_id || !logical_stage_id ||
109 !*logical_stage_id) {
110 return NULL;
111 }
112 return accessor->stage_json_by_logical_stage_id(accessor->user_data, logical_stage_id);
113}

Macro Definitions

SIMA_PLUGIN_STATIC_MANIFEST_ABI_VERSION

#define SIMA_PLUGIN_STATIC_MANIFEST_ABI_VERSION   ((guint)1)

Definition at line 30 of file SimaPluginStaticManifestAbi.h.

30#define SIMA_PLUGIN_STATIC_MANIFEST_ABI_VERSION ((guint)1)

SIMA_PLUGIN_STATIC_MANIFEST_CONTEXT_TYPE

#define SIMA_PLUGIN_STATIC_MANIFEST_CONTEXT_TYPE   "sima.model.manifest.v1"

Definition at line 29 of file SimaPluginStaticManifestAbi.h.

29#define SIMA_PLUGIN_STATIC_MANIFEST_CONTEXT_TYPE "sima.model.manifest.v1"

SIMA_PLUGIN_STATIC_MANIFEST_KEY_ACCESSOR_V1

#define SIMA_PLUGIN_STATIC_MANIFEST_KEY_ACCESSOR_V1   "manifest_accessor_v1"

Definition at line 36 of file SimaPluginStaticManifestAbi.h.

36#define SIMA_PLUGIN_STATIC_MANIFEST_KEY_ACCESSOR_V1 "manifest_accessor_v1"

SIMA_PLUGIN_STATIC_MANIFEST_KEY_JSON

#define SIMA_PLUGIN_STATIC_MANIFEST_KEY_JSON   "manifest_json"

Definition at line 33 of file SimaPluginStaticManifestAbi.h.

33#define SIMA_PLUGIN_STATIC_MANIFEST_KEY_JSON "manifest_json"

SIMA_PLUGIN_STATIC_MANIFEST_KEY_MODEL_ID

#define SIMA_PLUGIN_STATIC_MANIFEST_KEY_MODEL_ID   "model_id"

Definition at line 35 of file SimaPluginStaticManifestAbi.h.

35#define SIMA_PLUGIN_STATIC_MANIFEST_KEY_MODEL_ID "model_id"

SIMA_PLUGIN_STATIC_MANIFEST_KEY_SESSION_ID

#define SIMA_PLUGIN_STATIC_MANIFEST_KEY_SESSION_ID   "session_id"

Definition at line 34 of file SimaPluginStaticManifestAbi.h.

34#define SIMA_PLUGIN_STATIC_MANIFEST_KEY_SESSION_ID "session_id"

SIMA_PLUGIN_STATIC_MANIFEST_KEY_VERSION

#define SIMA_PLUGIN_STATIC_MANIFEST_KEY_VERSION   "manifest_version"

Definition at line 32 of file SimaPluginStaticManifestAbi.h.

32#define SIMA_PLUGIN_STATIC_MANIFEST_KEY_VERSION "manifest_version"

File Listing

The file content with the documentation metadata removed is:

1#pragma once
2
3#include <gst/gst.h>
4
5#ifdef __cplusplus
6extern "C" {
7#endif
8
9/*
10 * Pipeline-level static manifest context contract for SIMA model plugins.
11 * This is an ABI contract header; plugin/dispatcher repos should carry a synced
12 * copy and must not link against framework internals.
13 *
14 * Context type:
15 * "sima.model.manifest.v1"
16 *
17 * Required fields in GstContext structure:
18 * - "manifest_version" (uint)
19 *
20 * Runtime transport fields:
21 * - "manifest_accessor_v1" (pointer to ABI-safe accessor table), preferred
22 * - "manifest_json" (string), legacy fallback payload
23 *
24 * Optional fields:
25 * - "session_id" (string)
26 * - "model_id" (string)
27 */
28
29#define SIMA_PLUGIN_STATIC_MANIFEST_CONTEXT_TYPE "sima.model.manifest.v1"
30#define SIMA_PLUGIN_STATIC_MANIFEST_ABI_VERSION ((guint)1)
31
32#define SIMA_PLUGIN_STATIC_MANIFEST_KEY_VERSION "manifest_version"
33#define SIMA_PLUGIN_STATIC_MANIFEST_KEY_JSON "manifest_json"
34#define SIMA_PLUGIN_STATIC_MANIFEST_KEY_SESSION_ID "session_id"
35#define SIMA_PLUGIN_STATIC_MANIFEST_KEY_MODEL_ID "model_id"
36#define SIMA_PLUGIN_STATIC_MANIFEST_KEY_ACCESSOR_V1 "manifest_accessor_v1"
37
42
43/*
44 * ABI-safe accessor table carried via GstContext as a pointer.
45 *
46 * Lifetime:
47 * - The owner of this table must outlive pipeline/plugin usage.
48 * - Plugins must treat returned string pointers as borrowed; copy if needed.
49 */
52 gpointer user_data;
53
54 guint (*manifest_version)(gpointer user_data);
55 const gchar* (*manifest_json)(gpointer user_data);
56 const gchar* (*session_id)(gpointer user_data);
57 const gchar* (*model_id)(gpointer user_data);
58 const gchar* (*stage_json_by_element_name)(gpointer user_data, const gchar* element_name);
59 const gchar* (*stage_json_by_logical_stage_id)(gpointer user_data, const gchar* logical_stage_id);
61
62static inline gboolean sima_plugin_manifest_context_matches(const GstContext* context) {
63 if (!context) {
64 return FALSE;
65 }
66 return g_strcmp0(gst_context_get_context_type(context),
68}
69
70static inline const GstStructure*
71sima_plugin_manifest_context_structure(const GstContext* context) {
72 if (!sima_plugin_manifest_context_matches(context)) {
73 return NULL;
74 }
75 return gst_context_get_structure(context);
76}
77
78static inline const SimaPluginStaticManifestAccessorV1*
79sima_plugin_manifest_context_accessor(const GstContext* context) {
80 const GstStructure* structure = sima_plugin_manifest_context_structure(context);
81 if (!structure) {
82 return NULL;
83 }
84 const GValue* accessor_val =
85 gst_structure_get_value(structure, SIMA_PLUGIN_STATIC_MANIFEST_KEY_ACCESSOR_V1);
86 if (!accessor_val || !G_VALUE_HOLDS_POINTER(accessor_val)) {
87 return NULL;
88 }
90 (const SimaPluginStaticManifestAccessorV1*)g_value_get_pointer(accessor_val);
91 if (!accessor || accessor->abi_version != SIMA_PLUGIN_STATIC_MANIFEST_ABI_VERSION) {
92 return NULL;
93 }
94 return accessor;
95}
96
97static inline const gchar* sima_plugin_manifest_lookup_stage_by_element_name(
98 const SimaPluginStaticManifestAccessorV1* accessor, const gchar* element_name) {
99 if (!accessor || !accessor->stage_json_by_element_name || !element_name || !*element_name) {
100 return NULL;
101 }
102 return accessor->stage_json_by_element_name(accessor->user_data, element_name);
103}
104
105static inline const gchar*
106sima_plugin_manifest_lookup_stage_by_logical_id(const SimaPluginStaticManifestAccessorV1* accessor,
107 const gchar* logical_stage_id) {
108 if (!accessor || !accessor->stage_json_by_logical_stage_id || !logical_stage_id ||
109 !*logical_stage_id) {
110 return NULL;
111 }
112 return accessor->stage_json_by_logical_stage_id(accessor->user_data, logical_stage_id);
113}
114
115#ifdef __cplusplus
116} /* extern "C" */
117#endif

Generated via doxygen2docusaurus 2.0.0 by Doxygen 1.9.1.