Structure of functions implementing custom file provider. More...
#include <file.h>
Public Attributes | |
void *(* | open )(const char *name, MP4FileMode mode) |
int(* | seek )(void *handle, int64_t pos) |
int(* | read )(void *handle, void *buffer, int64_t size, int64_t *nin, int64_t maxChunkSize) |
int(* | write )(void *handle, const void *buffer, int64_t size, int64_t *nout, int64_t maxChunkSize) |
int(* | close )(void *handle) |
int(* | getSize )(void *handle, int64_t *nout) |
Structure of functions implementing custom file provider.
Except for open, all the functions must return a true value to indicate failure or false on success. The open function must return a pointer or handle which represents the open file, otherwise NULL.
maxChunkSize is a hint suggesting what the max size of data should be read as in underlying read/write operations. A value of 0 indicates there is no hint.