Stream structures

  • NB: last update for OpenViBE 1.0.0 (mar-2015). An updated version compliant to OpenViBE 2.x.x is available

Introduction

All the streams are defined using EBML (Extensible Binary Meta-Language). They are all structured in 3 sections:

  • HEADER: that part is the first ever sent and received on the stream, when the user presses “play” in a scenario. It usually contains the stream description used by the boxes and algorithms to initialize everything properly (e.g. size of an internal buffer)
  • BUFFERS: the number of buffers that may then transit through the stream is unlimited. Buffers contain the payload, e.g. the current signal matrix.
  • END: that last part is received once, when the user presses “stop” in a scenario. This mechanism is not concretely used in existing boxes, however everything is implemented to handle it.

Hierarchy

The stream hierarchy is displayed on figure 1 below. Every lower stream also contains the information specific to the upper stream. The color of the corresponding input and output in the Designer are also displayed.

Fig.1 The OpenViBE stream hierarchy.

As you can see every stream is an EBML stream. Then the EBML container is specialized in 3 streams : experiment information, stimulations or streamed matrices.

The Streamed Matrix stream can be used as is, or as one of its 4 derived streams : channel localisation, channel units, feature vector, signal or spectrum.

The corresponding OpenViBE identifiers are listed below.

 #define OVTK_TypeId_EBMLStream                                   OpenViBE::CIdentifier(0x434F6587, 0x2EFD2B7E)
 #define   OVTK_TypeId_ExperimentInformation                      OpenViBE::CIdentifier(0x403488E7, 0x565D70B6)
 #define   OVTK_TypeId_Stimulations                               OpenViBE::CIdentifier(0x6F752DD0, 0x082A321E)
 #define   OVTK_TypeId_StreamedMatrix                             OpenViBE::CIdentifier(0x544A003E, 0x6DCBA5F6)
 #define     OVTK_TypeId_FeatureVector                            OpenViBE::CIdentifier(0x17341935, 0x152FF448)
 #define     OVTK_TypeId_Signal                                   OpenViBE::CIdentifier(0x5BA36127, 0x195FEAE1)
 #define     OVTK_TypeId_Spectrum                                 OpenViBE::CIdentifier(0x1F261C0A, 0x593BF6BD)
 #define     OVTK_TypeId_ChannelLocalisation                      OpenViBE::CIdentifier(0x1E4C0D6E, 0x5204EEB2)
 #define     OVTK_TypeId_ChannelUnits                             OpenViBE::CIdentifier(0x5E330216, 0x2C09724C)

The following sections will describe each stream type.

Standard EBML stream

Description

EBML stream description (November 6th 2006, version 1).

From any standard EBML stream header, you can retrieve the stream type identifier, and the stream version.

EBML description & identifiers

 * STREAM STRUCTURE
 * ----------------
 * OVTK_NodeId_Header
 *   OVTK_NodeId_Header_StreamType (integer:)
 *   OVTK_NodeId_Header_StreamVersion (integer:)
 * OVTK_NodeId_Buffer
 * OVTK_NodeId_Buffer
 * ...
 * OVTK_NodeId_End
 *


 * NODE IDENTIFIERS
 * ----------------
 #define OVTK_NodeId_Header                                           EBML::CIdentifier(0x002B395F, 0x108ADFAE)
 #define OVTK_NodeId_Header_StreamType                                EBML::CIdentifier(0x00CDD0F7, 0x46B0278D)
 #define OVTK_NodeId_Header_StreamVersion                             EBML::CIdentifier(0x006F5A08, 0x7796EBC5)
 #define OVTK_NodeId_Buffer                                           EBML::CIdentifier(0x00CF2101, 0x02375310)
 #define OVTK_NodeId_End                                              EBML::CIdentifier(0x00D9DDC3, 0x0B12873A)

Streamed matrix stream

Description

Streamed matrix stream description (November 6th 2006, version 1).

The streamed matrix stream is an EBML Stream that also contains a matrix descriptor in the header, and a matrix of float64