ImFusion C++ SDK 4.4.0
ImFusion::Substream< BaseStream > Class Template Reference

#include <ImFusion/Stream/StreamGroup.h>

Template class for creating dummy substreams fully controlled by the proxy stream. More...

Inheritance diagram for ImFusion::Substream< BaseStream >:

Detailed Description

template<class BaseStream>
class ImFusion::Substream< BaseStream >

Template class for creating dummy substreams fully controlled by the proxy stream.

Substream provides a lightweight implementation that makes a stream type appear as a child of Key characteristics:

  • State synchronization: Automatically syncs its state with the proxy stream
  • No independent execution: doWork() is empty; the proxy stream handles all data acquisition
  • Lightweight: Minimal overhead as it's just a facade for the proxy stream's data

Use Substream when:

  • The proxy stream acquires data for all substreams (e.g., multi-sensor device) or processes data with multiple output types (e.g., tracking and images).
  • You want to expose different views or channels of the same data source (e.g., left and right camera images).
  • You need minimal overhead and coordinated execution

Use SubstreamWrapper instead when:

  • You need to bundle existing, independent streams (e.g., two camera streams).
  • Substreams have their own data acquisition logic

Available specializations: ImageSubstream, TrackingSubstream

Template Parameters
BaseStreamThe stream type to derive from (must derive from Stream, e.g., ImageStream, TrackingStream).
See also
ImageSubstream, TrackingSubstream, SubstreamWrapper

Public Member Functions

 Substream (StreamGroupBase *streamGroup, std::string name)
Public Member Functions inherited from ImFusion::SubstreamBase
 SubstreamBase (StreamGroupBase *streamGroup)
 Constructs a substream associated with the owning stream group.
StreamGroupBase * streamGroup () const
 Returns the stream group this substream belongs to.

Synchronization of stream state with the streamGroup stream.

bool openImpl () override final
bool closeImpl () override final
bool startImpl () override final
bool stopImpl () override final
bool pauseImpl () override final
bool resumeImpl () override final
bool supportsPausing () const override final
std::optional< Stream::WorkContinuationdoWork () override final
 Empty doWork job since it is performed in the streamGroup stream.
BaseStream * stream () override final
 Convenience method to return this pointer of the stream type the substream derived from.

Additional Inherited Members

Protected Attributes inherited from ImFusion::SubstreamBase
StreamGroupBase * m_streamGroup = nullptr

Member Function Documentation

◆ stream()

template<class BaseStream>
BaseStream * ImFusion::Substream< BaseStream >::stream ( )
inlinefinaloverridevirtual

Convenience method to return this pointer of the stream type the substream derived from.

Implements ImFusion::SubstreamBase.


The documentation for this class was generated from the following file:
  • ImFusion/Stream/StreamGroup.h
Search Tab / S to search, Esc to close