MP4v2
Public Attributes | List of all members
MP4IOCallbacks_s Struct Reference

Structure of functions implementing custom I/O callbacks. More...

Public Attributes

int64_t(* size )(void *handle)
 
int(* seek )(void *handle, int64_t pos)
 
int(* read )(void *handle, void *buffer, int64_t size, int64_t *nin)
 
int(* write )(void *handle, const void *buffer, int64_t size, int64_t *nout)
 
int(* truncate )(void *handle, int64_t size)
 

Detailed Description

Structure of functions implementing custom I/O callbacks.

Except for size, all the functions must return 0 upon success or a non-zero value to indicate failure. The size function must return the size of the file/buffer or -1 in case of failure.

See also
MP4CreateCallbacks()
MP4ModifyCallbacks()
MP4ReadCallbacks()
Examples
example/callbacks/callbacks.c.