SetSCelMemoryFcns
Sets subscriber memory allocation functions.
Synopsis
long SetSCelMemoryFcns( SCelContextPtr ctx, SCelNewPtrFcn newPtrFcn, SCelFreePtrFcn freePtrFcn)
Description
Sets the memory allocation and deallocation functions used by the SCel subscriber. At present, the subscriber allocates memory on only one occasion: when a data chunk (type CLST) arrives with its copy flag set, the subscriber copies the chunk out of the stream buffer and into allocated memory.
The memory function arguments include the sub-type, channel, and presentation timestamp of the data chunk that has triggered the memory operation. This information is provided so the handler knows something about the state of the data stream at the time of the memory operation.
Arguments
- ctx
- Pointer to context structure for the SCel subscriber.
- newPtrFcn
- Pointer to memory allocation function.
- freePtrFcn
- Pointer to memory deallocation function.
Return Value
Returns an error code, or zero if there was no error.
Caveat
This function is part of the Subscriber.lib library file that can currently (Toolkit1.5) be found in Attic:Streaming:2p1:DataStream:Subscribers:Subscriber.lib. It will later be integrated into the main Streaming tree.
Associated Files
SCelSubscriber.h