De-allocated memory
Return position and size for given sample from given track. The ‘sample’ is a
MP4 term for ‘frame’
Parse given input stream as MP4 file. Allocate and store data indexes.
return 1 on success, 0 on failure
The MP4 indexes may be stored at the end of stream, so this
function may parse all stream.
It is guaranteed that function will read/seek sequentially,
and will never jump back.
Helper functions to parse mp4.track[ntrack].dsi for H.264 SPS/PPS
Return pointer to internal mp4 memory, it must not be free()-ed
Add new track
The track_data parameter does not referred by the multiplexer after function
return, and may be allocated in short-time memory. The dsi member of
track_data parameter is mandatory.
Finalize MP4 file, de-allocated memory, and closes MP4 multiplexer.
The close operation takes a time and disk space, since it writes MP4 file
indexes. Please note that this function does not closes file handle,
which was passed to open function.
Allocates and initialize mp4 multiplexor
Given file handler is transparent to the MP4 library, and used only as
argument for given fwrite_callback() function. By appropriate definition
of callback function application may use any other file output API (for
example C++ streams, or Win32 file functions)
Add new sample to specified track
The tracks numbered starting with 0, according to order of MP4E_add_track() calls
‘kind’ is one of MP4E_SAMPLE_… defines
Set Decoder Specific Info (DSI)
Can be used for audio and private tracks.
MUST be used for AAC track.
Only one DSI can be set. It is an error to set DSI again
Set PPS data. MUST be used for AVC (H.264) track. Up to 256 different PPS can be used in one track.
Set SPS data. MUST be used for AVC (H.264) track. Up to 32 different SPS can be used in one track.
Set or replace ASCII test comment for the file. Set comment to NULL to remove comment.
Set VPS data. MUST be used for HEVC (H.265) track.