Lumiera
0.pre.03
»edit your freedom«
|
#include "steam/state.hpp"
Abstraction to access the state of a currently ongoing render/calculation process, as it is tied to the supporting facilities of the vault layer.
An State (subclass) instance is the sole connection for the render node to invoke services of the vault needed to carry out the calculations.
Public Member Functions | |
virtual BuffHandle | allocateBuffer (const lumiera::StreamType *)=0 |
allocate a new writable buffer with type and size according to the BufferDescriptor. More... | |
virtual BuffHandle | fetch (FrameID const &)=0 |
try to fetch an existing buffer containing the denoted frame from a cache or similar backing system (e.g. More... | |
virtual FrameID const & | genFrameID (NodeID const &, uint chanNo)=0 |
generate (or calculate) an ID denoting a media data frame appearing at the given position in the render network, for the time point this rendering process is currently calculating data for. More... | |
virtual BuffTableStorage & | getBuffTableStorage ()=0 |
necessary for creating a local BuffTableChunk | |
virtual void | is_calculated (BuffHandle const &)=0 |
declare the data contained in the Buffer to be ready. More... | |
virtual void | releaseBuffer (BuffHandle &)=0 |
resign control of the buffer denoted by the handle | |
Friends | |
class | engine::StateAdapter |
Protected Member Functions | |
virtual State & | getCurrentImplementation ()=0 |
resolves to the State object currently "in charge". More... | |
|
pure virtual |
allocate a new writable buffer with type and size according to the BufferDescriptor.
The actual provider of this buffer depends on the State implementation; it could be a temporary, located in the cache, used for feeding calculated frames over a network, etc.
Implemented in AllocBufferFromCache, AllocBufferFromParent, and StateProxy.
|
pure virtual |
declare the data contained in the Buffer to be ready.
The caller is required to restrain itself from modifying the data afterwards, as this buffer now can be used (readonly) by other calculation processes in parallel.
Implemented in StateAdapter, and StateProxy.
Referenced by StateAdapter::is_calculated().
generate (or calculate) an ID denoting a media data frame appearing at the given position in the render network, for the time point this rendering process is currently calculating data for.
NodeID | the unique identification of a specific node |
chanNo | the number of the output channel of this node |
Implemented in Invocation, and StateProxy.
|
pure virtual |
try to fetch an existing buffer containing the denoted frame from a cache or similar backing system (e.g.
network peer).
Implemented in StateAdapter, and StateProxy.
Referenced by StateAdapter::fetch().
|
protectedpure virtual |
resolves to the State object currently "in charge".
Intended as a performance shortcut to avoid calling up through a chain of virtual functions when deep down in chained ProcNode::pull() calls. This allows derived classes to proxy the state interface.
Implemented in StateAdapter, and StateProxy.