include/mp4v2/file.h Source File
12 #define MP4_CREATE_64BIT_DATA 0x01
14 #define MP4_CREATE_64BIT_TIME 0x02
16 #define MP4_CLOSE_DO_NOT_COMPUTE_BITRATE 0x01
38 void* ( *open )(
const char* name,
MP4FileMode mode );
39 int ( *seek )(
void* handle, int64_t pos );
40 int ( *read )(
void* handle,
void* buffer, int64_t size, int64_t* nin, int64_t maxChunkSize );
41 int ( *write )(
void* handle,
const void* buffer, int64_t size, int64_t* nout, int64_t maxChunkSize );
42 int ( *close )(
void* handle );
43 int ( *getSize )(
void* handle, int64_t* nout );
59 uint32_t flags DEFAULT(0) );
86 uint32_t flags DEFAULT(0) );
116 const char* fileName,
117 uint32_t flags DEFAULT(0),
118 int add_ftyp DEFAULT(1),
119 int add_iods DEFAULT(1),
120 char* majorBrand DEFAULT(0),
121 uint32_t minorVersion DEFAULT(0),
122 char** compatibleBrands DEFAULT(0),
123 uint32_t compatibleBrandsCount DEFAULT(0) );
152 const char* fileName,
153 uint32_t flags DEFAULT(0),
187 const char* fileName,
188 uint32_t flags DEFAULT(0),
190 int add_ftyp DEFAULT(1),
191 int add_iods DEFAULT(1),
192 char* majorBrand DEFAULT(0),
193 uint32_t minorVersion DEFAULT(0),
194 char** compatibleBrands DEFAULT(0),
195 uint32_t compatibleBrandsCount DEFAULT(0) );
221 bool dumpImplicits DEFAULT(0) );
261 const char* fileName,
273 MP4FileHandle hFile );
335 const char* fileName,
336 uint32_t flags DEFAULT(0) );
381 const char* fileName,
382 const char* newFileName DEFAULT(NULL) );
405 const char* fileName );
430 const char* fileName,
Structure of functions implementing custom file provider.
Definition: file.h:37
@ FILEMODE_READ
file may be read
Definition: file.h:22
char * MP4FileInfo(const char *fileName, MP4TrackId trackId=MP4_INVALID_TRACK_ID)
Return a textual summary of an mp4 file.
MP4FileMode_e
Enumeration of file modes for custom file provider.
Definition: file.h:20
MP4FileHandle MP4Create(const char *fileName, uint32_t flags=0)
Create a new mp4 file.
enum MP4FileMode_e MP4FileMode
Enumeration of file modes for custom file provider.
void MP4Close(MP4FileHandle hFile, uint32_t flags=0)
Close an mp4 file.
const char * MP4GetFilename(MP4FileHandle hFile)
Accessor for the filename associated with a file handle.
char * MP4Info(MP4FileHandle hFile, MP4TrackId trackId=MP4_INVALID_TRACK_ID)
Return a textual summary of an mp4 file.
MP4FileHandle MP4CreateEx(const char *fileName, uint32_t flags=0, int add_ftyp=1, int add_iods=1, char *majorBrand=0, uint32_t minorVersion=0, char **compatibleBrands=0, uint32_t compatibleBrandsCount=0)
Create a new mp4 file with extended options.
#define MP4_INVALID_TRACK_ID
Constant: invalid MP4TrackId.
Definition: general.h:49
@ FILEMODE_MODIFY
file may be read/written
Definition: file.h:23
MP4FileHandle MP4ReadProvider(const char *fileName, const MP4FileProvider *fileProvider=NULL)
Read an existing mp4 file.
@ FILEMODE_CREATE
file will be created/truncated for read/write
Definition: file.h:24
MP4FileHandle MP4CreateProviderEx(const char *fileName, uint32_t flags=0, const MP4FileProvider *fileProvider=NULL, int add_ftyp=1, int add_iods=1, char *majorBrand=0, uint32_t minorVersion=0, char **compatibleBrands=0, uint32_t compatibleBrandsCount=0)
Create a new mp4 file with extended options.
bool MP4Optimize(const char *fileName, const char *newFileName=NULL)
Optimize the layout of an mp4 file.
struct MP4FileProvider_s MP4FileProvider
Structure of functions implementing custom file provider.
MP4FileHandle MP4Modify(const char *fileName, uint32_t flags=0)
Modify an existing mp4 file.
bool MP4Dump(MP4FileHandle hFile, bool dumpImplicits=0)
Dump mp4 file contents as ASCII either to stdout or the log callback (see MP4SetLogCallback)
MP4FileHandle MP4Read(const char *fileName)
Read an existing mp4 file.
MP4FileHandle MP4CreateProvider(const char *fileName, uint32_t flags=0, const MP4FileProvider *fileProvider=NULL)
Create a new mp4 file.
@ FILEMODE_UNDEFINED
undefined
Definition: file.h:21