SetTextMemoryFcns

Sets subscriber memory allocation functions.

Synopsis

int32 SetSCelMemoryFcns (TextContextPtr ctx, TextNewPtrFcn newPtrFcn, TextFreePtrFcn freePtrFcn)

Description

Sets the memory allocation and deallocation functions used by the Text subscriber. The Text subscriber allocates memory when: a string chunk (CHAR) arrives with its "copy" flag (COPY_TEXT_FROM_STREAM) set, a 3DO font chunk (FONT) arrives.

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 Text 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

TextSubscriber.h