The "stream" file is a generic container that can hold any number of chunk types. The [[https://github.com/trapexit/3do-devkit/tree/master/examples/3dosdk/Toolkit 1.5/Streaming/2p1|DataStream library]] is a pretty open and generic library to allow arbitrary data types to be streamed via a consistent framework. Each type have a "subscriber" that handles the data chunks. ===== Subscribers ===== * [[https://github.com/trapexit/3do-devkit/tree/master/examples/3dosdk/Toolkit 1.5/Streaming/2p1/DataStream/Subscribers/ControlSubscriber|ControlSubscriber]] * [[https://github.com/trapexit/3do-devkit/tree/master/examples/3dosdk/Toolkit 1.5/Streaming/2p1/DataStream/Subscribers/CPakSubscriber|CPakSubscriber]] * [[https://github.com/trapexit/3do-devkit/tree/master/examples/3dosdk/Toolkit 1.5/Streaming/2p1/DataStream/Subscribers/CPakSubscriberS|CPakSubscriberS]] * [[https://github.com/trapexit/3do-devkit/tree/master/examples/3dosdk/Toolkit 1.5/Streaming/2p1/DataStream/Subscribers/JoinSubscriber|JoinSubscriber]] * [[https://github.com/trapexit/3do-devkit/tree/master/examples/3dosdk/Toolkit 1.5/Streaming/2p1/DataStream/Subscribers/ProtoSubscriber|ProtoSubscriber]] * [[https://github.com/trapexit/3do-devkit/tree/master/examples/3dosdk/Toolkit 1.5/Streaming/2p1/DataStream/Subscribers/SAnimSubscriber|SAnimSubscriber]] * [[https://github.com/trapexit/3do-devkit/tree/master/examples/3dosdk/Toolkit 1.5/Streaming/2p1/DataStream/Subscribers/SAudioSubscriber|SAudioSubscriber]] ===== Header ===== From [[https://github.com/trapexit/3do-devkit/blob/master/examples/3dosdk/Toolkit 1.5/Streaming/2p1/DataStream/DSStreamHeader.h|DSStreamHeader.h]] and [[https://github.com/trapexit/3do-devkit/blob/master/examples/3dosdk/Toolkit 1.5/Streaming/2p1/DataStream/SubsChunkCommon.h|SubChunkCommon.h]] #define DS_HDR_MAX_PRELOADINST 16 #define DS_HDR_MAX_SUBSCRIBER 16 /* Upto and including subChunkType are part of the SUBS_CHUNK_COMMON macro and the SubsChunkData struct. There is a macro (RELATIVE_BRANCHING) which if set will have 'short chunkFlags' and 'short channel' variables. If unset it has 'long channel'. */ long chunkType; /* chunk type */ long chunkSize; /* chunk size including header */ long time; /* position in stream time */ short chunkFlags; /* reserved for flags */ short channel; /* logical channel number */ long subChunkType; /* data sub-type */ long headerVersion; /* version of header data */ long streamBlockSize; /* size of stream buffers in this stream */ long streamBuffers; /* suggested number of stream buffers to use */ long streamerDeltaPri; /* delta priority for streamer thread */ long dataAcqDeltaPri; /* delta priority for data acquisition thread */ long numSubsMsgs; /* number of subscriber messages to allocate */ long audioClockChan; /* logical channel number of audio clock channel */ long enableAudioChan; /* mask of audio channels to enable */ long preloadInstList[DS_HDR_MAX_PRELOADINST]; /* NULL terminated preloaded instrument list */ DSHeaderSubs subscriberList[DS_HDR_MAX_SUBSCRIBER]; /* NULL terminated list of subscriber tags */