NVIDIA DeepStream SDK API Reference

9.2 Release
ModelMuxBin Struct Reference

Detailed Description

Collaboration diagram for ModelMuxBin:

Data Fields

GstElement * bin
 
GstElement * parent_pipeline
 ModelMuxBin GstBin. More...
 
const ModelMuxConfig * config
 parent pipeline More...
 
guint max_streams
 multimodel config More...
 
gboolean unified
 max concurrent streams batch cap More...
 
gint active_streams
 flag to enable unified A/B display batch More...
 
GHashTable * stream_names
 lock-free mirror of g_hash_table_size(streams), kept in sync under lock. More...
 
GHashTable * stream_cam_ids
 stream_id(GINT) -> gchar* ROUTABLE camera_id (stream/add's camera_id). More...
 
GHashTable * stream_wiring
 stream_id(GINT) -> ModelMuxStreamEntry
More...
 
GPtrArray * retired_names
 
GHashTable * streams_pending
 retired name_slot strings (lazy-allocated)
More...
 
GHashTable * streams_cancelled
 SET stream_id(GINT) -> 1: a detach arrived while the attach was still pending -> the attach aborts on completion instead of going live
More...
 
GMutex lock
 guards streams/pools for the periodic dump
More...
 
GMutex free_lock
 guards pending_frees ONLY (separate from lock so a deferred-free idle can deregister even when the scheduler already holds lock)
More...
 
gboolean log_enabled
 MM_DEBUG: single switch for ALL debug logs
More...
 
guint debug_interval
 MM_DEBUG_INTERVAL: dump cadence in frames
More...
 
GstPad * sink_ghost
 
GstElement * in_demux
 ModelMuxBin batched sink (entry)
More...
 
GstElement * out_mux
 splits the batched input -> per-stream
More...
 
GstPad * src_ghost
 combined display nvstreammux
More...
 
GQueue * col_free_idx
 recycled DISPLAY columns [0,max_streams)
More...
 
ModelPool * primary_pool
 
ModelPool * shadow_pool
 
GHashTable * limbo_models
 canonical key "name@version" -> ModelBin* (warm, role Unknown; promoted into a role pool on first use – the map ENTRY moves, the bin lives on)
More...
 
guint next_limbo_gie
 gie-unique-id allocator for limbo models
More...
 
gchar * name_slot [MM_ACCT_MAX]
 lock-free mirror of stream_names: source_id -> name, atomically published under ib->lock; read lock-free by the per-frame provenance probes (the hash is for LOCKED readers only). More...
 
GList * pending_frees
 ModelMuxFreeCtx* deferred branch-teardowns awaiting g_idle; cancelled in _free() so a queued idle never derefs a freed bin (teardown-race UAF guard)
More...
 
GList * pending_sources
 ModelMuxTrackedSource* deferred dynamic-op idles/timeouts; guarded by free_lock and cancelled before graph teardown. More...
 
guint compact_poll_id
 debounce g_timeout id for shard compaction (0=none) More...
 
guint dump_source_id
 pending debug dump source id, under free_lock More...
 
guint perf_timer_id
 perf-metric tick g_timeout id (0=none/off)
More...
 
guint64 routing_revision
 monotonic; bumps on every APPLIED model/routing, default switch or model/update (under ib->lock); surfaced by model/status for if_revision CAS. More...
 
ModelMuxRevShared * rev_shared
 the PIPELINE-WIDE revision, shared with every other nvmodelmux stage through a GstContext (see MODELMUX_CONTEXT_TYPE_ROUTING). More...
 
GPtrArray * pending_routes
 ModelMuxPendingRouteNote*: routes ACCEPTED but still waiting on a warming target, mirrored from the control layer under ib->lock (NULL = none queued). More...
 
void(* ota_rollback_cb )(gpointer owner, const gchar *from_key, const gchar *to_key)
 
gpointer ota_rollback_owner
 
gint shutting_down
 set before free so async sources stop rescheduling More...
 
gboolean ever_attached
 TRUE once any stream has attached. More...
 
gint frame_count
 batches seen on the combined-mux src; written atomically by the streaming thread (probe) and reset to 0 on the main loop (drain-to-zero teardown) – use g_atomic_int_{add,set,get} at every access. More...
 
ModelMuxAcct acct [MM_ACCT_MAX]
 MM_DEBUG per-(source,role) frame accounting. More...
 
ModelMuxPerfCounter thru_perf [MM_ACCT_MAX]
 

Field Documentation

◆ acct

ModelMuxAcct ModelMuxBin::acct

MM_DEBUG per-(source,role) frame accounting.

Definition at line 1014 of file sources/gst-plugins/gst-nvmodelmux/gstnvmodelmux_priv.h.

◆ active_streams

gint ModelMuxBin::active_streams

flag to enable unified A/B display batch

Definition at line 910 of file sources/gst-plugins/gst-nvmodelmux/gstnvmodelmux_priv.h.

◆ bin

GstElement * ModelMuxBin::bin

◆ col_free_idx

GQueue * ModelMuxBin::col_free_idx

recycled DISPLAY columns [0,max_streams)

Definition at line 950 of file sources/gst-plugins/gst-nvmodelmux/gstnvmodelmux_priv.h.

◆ compact_poll_id

guint ModelMuxBin::compact_poll_id

debounce g_timeout id for shard compaction (0=none)

Definition at line 978 of file sources/gst-plugins/gst-nvmodelmux/gstnvmodelmux_priv.h.

◆ config

const ModelMuxConfig * ModelMuxBin::config

parent pipeline

Definition at line 906 of file sources/gst-plugins/gst-nvmodelmux/gstnvmodelmux_priv.h.

◆ debug_interval

guint ModelMuxBin::debug_interval

MM_DEBUG_INTERVAL: dump cadence in frames

Definition at line 943 of file sources/gst-plugins/gst-nvmodelmux/gstnvmodelmux_priv.h.

◆ dump_source_id

guint ModelMuxBin::dump_source_id

pending debug dump source id, under free_lock

Definition at line 979 of file sources/gst-plugins/gst-nvmodelmux/gstnvmodelmux_priv.h.

◆ ever_attached

gboolean ModelMuxBin::ever_attached

TRUE once any stream has attached.

Distinguishes the FIRST-EVER attach (fresh elements -> no flush needed) from a REFILL after drain-to-zero (stale state -> flush). Gating the flush-refill to refills only removes a sticky-event race on the common first-attach path.

Definition at line 1003 of file sources/gst-plugins/gst-nvmodelmux/gstnvmodelmux_priv.h.

◆ frame_count

gint ModelMuxBin::frame_count

batches seen on the combined-mux src; written atomically by the streaming thread (probe) and reset to 0 on the main loop (drain-to-zero teardown) – use g_atomic_int_{add,set,get} at every access.

Typed gint (not guint) so g_atomic_int_* needs no aliasing cast

Definition at line 1008 of file sources/gst-plugins/gst-nvmodelmux/gstnvmodelmux_priv.h.

◆ free_lock

GMutex ModelMuxBin::free_lock

guards pending_frees ONLY (separate from lock so a deferred-free idle can deregister even when the scheduler already holds lock)

Definition at line 938 of file sources/gst-plugins/gst-nvmodelmux/gstnvmodelmux_priv.h.

◆ in_demux

GstElement * ModelMuxBin::in_demux

ModelMuxBin batched sink (entry)

Definition at line 946 of file sources/gst-plugins/gst-nvmodelmux/gstnvmodelmux_priv.h.

◆ limbo_models

GHashTable * ModelMuxBin::limbo_models

canonical key "name@version" -> ModelBin* (warm, role Unknown; promoted into a role pool on first use – the map ENTRY moves, the bin lives on)

Definition at line 959 of file sources/gst-plugins/gst-nvmodelmux/gstnvmodelmux_priv.h.

◆ lock

GMutex ModelMuxBin::lock

guards streams/pools for the periodic dump

Definition at line 937 of file sources/gst-plugins/gst-nvmodelmux/gstnvmodelmux_priv.h.

◆ log_enabled

gboolean ModelMuxBin::log_enabled

MM_DEBUG: single switch for ALL debug logs

Definition at line 942 of file sources/gst-plugins/gst-nvmodelmux/gstnvmodelmux_priv.h.

◆ max_streams

guint ModelMuxBin::max_streams

multimodel config

Definition at line 907 of file sources/gst-plugins/gst-nvmodelmux/gstnvmodelmux_priv.h.

◆ name_slot

gchar * ModelMuxBin::name_slot

lock-free mirror of stream_names: source_id -> name, atomically published under ib->lock; read lock-free by the per-frame provenance probes (the hash is for LOCKED readers only).

Superseded strings are RETIRED (a probe may still hold the old pointer) and freed only at bin teardown, after the graph is quiesced. Bounded by attach/detach churn.

Definition at line 964 of file sources/gst-plugins/gst-nvmodelmux/gstnvmodelmux_priv.h.

◆ next_limbo_gie

guint ModelMuxBin::next_limbo_gie

gie-unique-id allocator for limbo models

Definition at line 962 of file sources/gst-plugins/gst-nvmodelmux/gstnvmodelmux_priv.h.

◆ ota_rollback_cb

void(* ModelMuxBin::ota_rollback_cb)(gpointer owner, const gchar *from_key, const gchar *to_key)

◆ ota_rollback_owner

gpointer ModelMuxBin::ota_rollback_owner

◆ out_mux

GstElement * ModelMuxBin::out_mux

splits the batched input -> per-stream

Definition at line 947 of file sources/gst-plugins/gst-nvmodelmux/gstnvmodelmux_priv.h.

◆ parent_pipeline

GstElement * ModelMuxBin::parent_pipeline

◆ pending_frees

GList * ModelMuxBin::pending_frees

ModelMuxFreeCtx* deferred branch-teardowns awaiting g_idle; cancelled in _free() so a queued idle never derefs a freed bin (teardown-race UAF guard)

Definition at line 973 of file sources/gst-plugins/gst-nvmodelmux/gstnvmodelmux_priv.h.

◆ pending_routes

GPtrArray * ModelMuxBin::pending_routes

ModelMuxPendingRouteNote*: routes ACCEPTED but still waiting on a warming target, mirrored from the control layer under ib->lock (NULL = none queued).

Read-only here – status surfaces it, nothing routes off it.

Definition at line 990 of file sources/gst-plugins/gst-nvmodelmux/gstnvmodelmux_priv.h.

◆ pending_sources

GList * ModelMuxBin::pending_sources

ModelMuxTrackedSource* deferred dynamic-op idles/timeouts; guarded by free_lock and cancelled before graph teardown.

Definition at line 976 of file sources/gst-plugins/gst-nvmodelmux/gstnvmodelmux_priv.h.

◆ perf_timer_id

guint ModelMuxBin::perf_timer_id

perf-metric tick g_timeout id (0=none/off)

Definition at line 980 of file sources/gst-plugins/gst-nvmodelmux/gstnvmodelmux_priv.h.

◆ primary_pool

ModelPool * ModelMuxBin::primary_pool

◆ retired_names

GPtrArray * ModelMuxBin::retired_names

◆ rev_shared

ModelMuxRevShared * ModelMuxBin::rev_shared

the PIPELINE-WIDE revision, shared with every other nvmodelmux stage through a GstContext (see MODELMUX_CONTEXT_TYPE_ROUTING).

Owns a ref; set by the element at build. NULL until negotiated.

Definition at line 986 of file sources/gst-plugins/gst-nvmodelmux/gstnvmodelmux_priv.h.

◆ routing_revision

guint64 ModelMuxBin::routing_revision

monotonic; bumps on every APPLIED model/routing, default switch or model/update (under ib->lock); surfaced by model/status for if_revision CAS.

FALLBACK only: used when @rev_shared is NULL (a bin built before the context was negotiated).

Definition at line 981 of file sources/gst-plugins/gst-nvmodelmux/gstnvmodelmux_priv.h.

◆ shadow_pool

ModelPool * ModelMuxBin::shadow_pool

◆ shutting_down

gint ModelMuxBin::shutting_down

set before free so async sources stop rescheduling

Definition at line 1002 of file sources/gst-plugins/gst-nvmodelmux/gstnvmodelmux_priv.h.

◆ sink_ghost

GstPad * ModelMuxBin::sink_ghost

◆ src_ghost

GstPad * ModelMuxBin::src_ghost

combined display nvstreammux

ModelMuxBin batched src

Definition at line 948 of file sources/gst-plugins/gst-nvmodelmux/gstnvmodelmux_priv.h.

◆ stream_cam_ids

GHashTable * ModelMuxBin::stream_cam_ids

stream_id(GINT) -> gchar* ROUTABLE camera_id (stream/add's camera_id).

Kept SEPARATE from stream_names on purpose. stream_names holds the DISPLAY name (stream/add's camera_name, falling back to camera_id when the host supplied only one), which is what the overlay and model/status show – but a display name is NOT routable: POST /api/v1/model/routing resolves its streams scope by camera_id and rejects a display name with STREAM_UNKNOWN. Storing only the merged name is why the routing READ had to be assembled in nvmultiurisrcbin, joining this element's answer against the source manager's sensor list under a different lock.

Holding the real id here lets the routing snapshot be built where the routing state already lives. Populated and torn down in lockstep with stream_names; NULL entry when the host supplied no camera_id at all.

Definition at line 929 of file sources/gst-plugins/gst-nvmodelmux/gstnvmodelmux_priv.h.

◆ stream_names

GHashTable * ModelMuxBin::stream_names

lock-free mirror of g_hash_table_size(streams), kept in sync under lock.

Read by the input drain-guard probe on the streaming thread to swallow the upstream mux's idle "clear" buffer when 0 streams are attached (see drain-guard probe). stream_id(GINT) -> gchar* name (for overlay)

Definition at line 914 of file sources/gst-plugins/gst-nvmodelmux/gstnvmodelmux_priv.h.

◆ stream_wiring

GHashTable * ModelMuxBin::stream_wiring

◆ streams_cancelled

GHashTable * ModelMuxBin::streams_cancelled

SET stream_id(GINT) -> 1: a detach arrived while the attach was still pending -> the attach aborts on completion instead of going live

Definition at line 934 of file sources/gst-plugins/gst-nvmodelmux/gstnvmodelmux_priv.h.

◆ streams_pending

GHashTable * ModelMuxBin::streams_pending

retired name_slot strings (lazy-allocated)

SET stream_id(GINT) -> 1: attach (or detach) in flight; guards against double attach/detach

Definition at line 932 of file sources/gst-plugins/gst-nvmodelmux/gstnvmodelmux_priv.h.

◆ thru_perf

ModelMuxPerfCounter ModelMuxBin::thru_perf

◆ unified

gboolean ModelMuxBin::unified

max concurrent streams batch cap

Definition at line 908 of file sources/gst-plugins/gst-nvmodelmux/gstnvmodelmux_priv.h.


The documentation for this struct was generated from the following file: