| synopsis || arguments || prev || next |
void get_frame_info( jx_frame * frame_ref, int & num_instructions, int & duration, int & repeat_count, bool & is_persistent)
[Declared in "../apps/compressed_io/jpx.h"]
Returns overview information concerning a single frame. The opaque frame_ref pointer may have been obtained by a previous call to get_next_frame or get_last_persistent_frame. It may not be NULL.
Each frame may need to be repeated some number of times, as returned via the repeat_count argument, before moving to the next frame. Repetition does not mean that exactly the same composited image is played over and over again. Instead, the actual layer indices associated with compositing instructions in the frame may need to be incremented between repeated frames.
Each frame consists of a sequence of compositing instructions which must be performed in order to build up a single composited image. Consecutive frames represent distinct composited images to be displayed at distinct time instants.
Used to return the number of compositing instructions used to compose the current frame. Use get_instruction to examine the details of each instruction.
Used to return the number of milliseconds between this frame and the next. This value cannot be zero, except possibly in the last frame — this should only be possible when the global looping count is 1, but some crazy content creator could do something weird.
Used to return the number of times (in addition to the first time) which the frame should be repeated. If 0, the frame is not repeated. If negative, the frame is repeated indefinitely. Repeated frames are separated by duration milliseconds. Repeated frames do not necessarily use the same compositing layers in their instructions. See get_instruction for more on the adjustment of compositing layer indices between repeatitions of a frame.
Used to return an indication of whether or not the effects of compositing this frame should be used as a background for all future composition operations. To render any given frame, one must compose all preceding persistent frames in sequence, followed by the frame of interest.
Although this seems like a simple idea, in some circumstances (e.g., dynamic region-of-interest rendering) it can create an enormous amount of work. For this reason, persistent frames are best avoided. The kdu_region_compositor object goes to a lot of effort to figure out which persistent frames are actually visible (i.e., not completely covered by new opaque layers) so as to avoid composing hundreds or thousands of layers together where frame persistence has been misused. Unfortunately, the visibility of persistent frames in later frames cannot properly be figured out within the kdu_composition object, since composition information (e.g., to figure out which layers are needed) may be required before the opacity of compositing layers has become available from a dynamic cache.