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

jpx_target::write_metadata

jp2_output_box * write_metadata( int * i_param=NULL, void ** addr_param=NULL)

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

Go to class description.


Synopsis

Use this function to write the metadata managed via jpx_meta_manager (see access_meta_manager) to the actual output file. You must not do this until after write_headers has been successfully completed, but you can otherwise choose to write metadata at any point in the file you like. Some applications may choose to write the metadata prior to embedded code-streams, while others might choose to write it all at the end of the file. The latter is probably a better choice form the perspective of editing flexibility.

The function may need to be called multiple times before the metadata is completely written. Exactly like write_headers the function will return with a non-NULL pointer whenever it encounters a breakpoint. A breakpoint is any jpx_metanode which was created using jpx_metanode::add_delayed.

You should not attempt to add any new metadata after the first call to this function.


Return Value

NULL if all of the available metadata has been written. Otherwise, the function has encountered a jpx_metadata node which was created using jpx_metanode::add_delayed. In this case, the function returns a pointer to an open jpx_output_box object which has the correct box type code — the one passed to jpx_metanode::add_delayed. You have only to write the box's contents.

Arguments

i_param [int *]

If non-NULL, the integer parameter supplied to jpx_metanode::add_delayed is written into * i_param.

addr_param [void **]

If non-NULL, the address parameter supplied to jpx_metanode::add_delayed is written into * addr_param.


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