| synopsis || return value || arguments || prev || next |

jpx_source::count_codestreams

Java: Jpx_source::Count_codestreams

bool count_codestreams( int & count)

Java: boolean Count_codestreams( int[] count)

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

Go to class description.


Synopsis

If the number of codestreams in the JPX/JP2 data source is already known, this function returns true, writing that number into count. Otherwise, the function attempts to parse further into the data source in order to count the number of codestreams which are available. If it encounters the end of the source, or is otherwise able to deduce that the number of codestreams is known, it again returns true, writing the number of codestreams into count.

If the function is unable to parse to a point at which the number of codestreams can be known, it returns false, writing the number of codestreams encountered up to that point into the count argument.

A codestream is considered to have been encountered once either its codestream header box is encountered or its contiguous codestream (jp2c) or fragment table (ftbl) box has been encountered. To actually access the codestream via the access_codestream function, more information is generally required. In particular, the codestream's main header must be available, and either its codestream header box must have been encountered, or the reader must be able to deduce that there will be none (normally, this can only be deduced once the end of the file has been encountered, so JPX writers are strongly advised to include codestream header boxes). However, these conditions need not all be met for the codestream's existence to be determined by the present function.


Return Value

False if it is possible that more codestreams remain in the data source, but the function is unable to parse any further into the source at this point. This generally means that the underlying jp2_family_src object is fueled by a dynamic cache (i.e., a kdu_cache object).

Arguments

count [int &]


| top || synopsis || return value || arguments || prev || next |