| synopsis || arguments || prev || next |

kdu_serve::augment_cache_model

Java: Kdu_serve::Augment_cache_model

Overload navigation: 1, 2

void augment_cache_model( int databin_class, int stream_min, int stream_max, kdu_long bin_id, int available_bytes, int available_packets=0)

Java: void Augment_cache_model( int databin_class, int stream_min, int stream_max, long bin_id, int available_bytes, int available_packets)

[Declared in "../apps/kdu_server/kdu_serve.h"]

Go to class description.


Synopsis

The object maintains a model of the cache maintained by a client (real or hypothetical) which immediately caches all compressed data packaged up by the generate_increments function. The present function provides a mechanism for identifying additional data which are available in the client cache, even though they may not have been delivered by way of the generate_increments function.

This function informs the kdu_serve object that its cache model should include the initial available_bytes of the data-bin whose in-class identifier is bin_id, whose class is given by the databin_class argument, and whose code-stream lies within the range given by the stream_min and stream_max arguments. If the cache model already includes at least this number of bytes for the indicated data-bin, the function has no effect.

If available_bytes is negative the server is being informed that it should assume that the entire contents of the relevant data-bin are already available at the client.

If available_bytes=0 and available_packets>0, the server is instead being asked to augment its cache model to the whole packet boundary immediately following the first available_packets of a precinct data-bin. The available_packets argument is ignored if available_bytes is non-zero.

The stream_min and stream_max arguments identify a range of code-streams over which the cache model truncation statement should be applied. Frequently, this range will contain only one code-stream; however, it may contain a larger number of streams. The code-streams actually affected by the command are restricted to those which belong to the object's model set (the set of code-streams for which a cache model is currently being applied). Unless specific action is taken to alter the model set, it will include all code-streams which have been referenced by window commands (including this one), but not necessarily all code-streams referenced by cache model statements. This means that the function call may have no effect if the referenced code-stream or streams lie outside the current model set. Note, however, that the client may augment the server's model set by appropriately configuring the kdu_window object supplied to set_window. The present object may also alter the model set, removing some code-streams where its resources do not permit simultaneous modeling of all streams which might be in the client's model set. These changes will be reflected in the window returned via get_window.

If bin_id is negative, the function is automatically applied to all data-bins which belong to the current window. This necessarily means that the function's effects are limited to those code-streams which lie within the scope of the current window, in addition to the restrictions provided by the stream_min and stream_max arguments.


Arguments

databin_class [int]

Should be one of KDU_MAIN_HEADER_DATABIN, KDU_TILE_HEADER_DATABIN, KDU_PRECINCT_DATABIN, KDU_TILE_DATABIN or KDU_META_DATABIN.

stream_min [int]

Lower bound for the range of code-stream identifiers being referenced by this function. See notes above on the interaction between code-stream ranges and model sets. This argument is ignored if databin_class is KDU_META_DATABIN.

stream_max [int]

Upper bound for the range of code-stream identifiers being referenced by this function. See notes above on the interaction between code-stream ranges and model sets. This argument is ignored if databin_class is KDU_META_DATABIN.

bin_id [kdu_long]

Unique identifier of the data-bin within its class. If negative, all data-bins relevant to the current window are adjusted in accordance with the other arguments.

available_bytes [int]

Minimum number of bytes for this data-bin which should be reflected in the cache model. If negative, the client is to be treated as having a complete cached copy of the entire data-bin.

available_packets [int]

This argument is ignored unless databin_class is KDU_PRECINCT_DATABIN and available_bytes is 0. In this case, the server is being asked to advance its cache model for the relevant precinct to the point immediately after the first available_packets, unless the cache model already reflects a location beyond this point. A negative value is interpreted as if available_bytes were negative, meaning that the entire contents of the data-bin are to be marked as cached.


| top || synopsis || arguments || prev || next |