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

kdu_cache::set_read_scope

Java: Kdu_cache::Set_read_scope

virtual void set_read_scope( int databin_class, kdu_long codestream_id, kdu_long databin_id)

Java: void Set_read_scope( int databin_class, long codestream_id, long databin_id)

[Declared in "../apps/compressed_io/kdu_cache.h"]

Go to class description.


Synopsis

This function must be called at least once after the object is created or closed, before calling read. It identifies the particular data-bin from which reading will proceed. Reading always starts from the beginning of the relevant data-bin. Note, however, that the set_tileheader_scope and set_precinct_scope functions may both alter the read scope (they actually do so by calling this function). See add_to_databin for an explanation of data-bin classes.

It is not safe to call this function while any calls to the codestream management machinery accessed via kdu_codestream are in progress, since they may try to read from the caching data source themselves. For this reason, you will usually want to invoke this function from the same thread of execution as that used to access the code-stream and perform decompression tasks. Use of this function from within a jp2_input_box or jp2_source object is safe, even in multi-threaded applications (so long as the synchronization members of kdu_family_src are implemented by the application).

Before passing a kdu_cache object directly to kdu_codestream::create, you should first use the present function to set the read-scope to databin_class= KDU_MAIN_HEADER_DATABIN and databin_id=0.


Arguments

databin_class [int]

codestream_id [kdu_long]

databin_id [kdu_long]


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