![]() |
ImFusion C++ SDK 4.4.0
|
#include <ImFusion/Stream/CompoundStreamData.h>
Container for StreamData from the individual Streams of a StreamGroup. More...
Container for StreamData from the individual Streams of a StreamGroup.
CompoundStreamData bundles the StreamData from a proxy stream and its substreams into a single object, enabling receivers to process data from all streams at once. This is particularly useful for multi-sensor systems where data from multiple sources needs to be handled together (e.g., synchronized camera and tracking data).
The StreamGroup takes care of distributing the CompoundStreamData via StreamGroupBase::signalNewStreamGroupData, while simultaneously emitting individual StreamData to each stream's Stream::signalStreamData. This dual emission strategy allows receivers to either process all streams together or handle individual streams independently.
Usage example in a StreamGroup with a proxy stream of type TrackingStream and a substream of type ImageSubstream:
Public Member Functions | |
| CompoundStreamData (std::shared_ptr< const StreamData > proxyStreamData, std::vector< std::shared_ptr< const StreamData > > substreamsStreamData) | |
| Constructs a CompoundStreamData object with StreamData for the proxy stream and its substreams. | |
| std::shared_ptr< const StreamData > | proxyStreamData () const |
| Returns the StreamData from the proxy stream, or nullptr if the proxy stream does not produce its own StreamData (e.g., when using Stream as the base class rather than a specialized type). | |
| std::vector< std::shared_ptr< const StreamData > > | substreamsStreamData () const |
| Returns all available StreamData of the substreams. | |
Protected Attributes | |
| std::shared_ptr< const StreamData > | m_proxyStreamData = nullptr |
| StreamData from the proxy stream (may be nullptr). | |
| std::vector< std::shared_ptr< const StreamData > > | m_substreamsStreamData |
| StreamData from the substreams (may be a subset of the substreams). | |
|
explicit |
Constructs a CompoundStreamData object with StreamData for the proxy stream and its substreams.
| proxyStreamData | StreamData from the proxy stream. May be nullptr for a StreamGroup where the proxy stream is of the base class type Stream and does not produce its own specialized StreamData. |
| substreamsStreamData | Vector of StreamData from the substreams. May contain StreamData for all or any subset of the substreams, depending on which streams have data available at the time of emission. |
| std::vector< std::shared_ptr< const StreamData > > ImFusion::CompoundStreamData::substreamsStreamData | ( | ) | const |
Returns all available StreamData of the substreams.
Not guaranteed to contain StreamData for all substreams; any subset is valid depending on which streams have data available.