#include <cafe/mp4dmx.h> MP4DMXExecute(void *data, s32 control_flag, s32 track_id, s32 seek_direction, u64 end_time_stamp, u64 *time_stamp, u64 *next_offset, s32 *next_size, void *handle);
Flag specifying process (Input).
Specifies the track to be output. Specify the value
The direction in which to seek. This sets the direction in which to search for points to seek to from the specified point (Input).
If you have specified
The timestamp at which to stop. Data is output up to the specified timestamp (in
milliseconds). Use a value of
If you specify 0 as the final timestamp, the function returns
When getting the current position
The time (in milliseconds) to seek through the file. Use the time_stamp output by the header parsing function (
When getting samples
Use the time_stamp that was output when getting the current position.
When getting the current position
Time information for an accessible seek point.
If there are no samples (if the number of
(This does not depend on whether there is a seek point).
Time information for the next input chunk.
|next_offset||The next offset from the beginning of the MP4 data file to pass to the library (Output).|
|next_size||The next data size to pass to the library (Output).|
|handle||A pointer referencing an object handle (Input).|
||Success. This is returned when data could be processed up to
the timestamp specified by end_time_stamp.
This value is not returned if end_time_stamp is set to
||Success. When a seek operation has been specified (when control_flag is 1), get the samples at the specified timestamp. To get the samples, call this function with control_flag set to 0.|
Success. This is returned when no more data is being processed
or when a seek operation has been specified to a fragment other
than the one currently being processed. You need to read the
next data or the header for the seek position. The size and offset
from the beginning of the MP4 data file are set in next_size and next_offset for finding the next header. Read the
specified amount of data from the specified offset in the MP4 file
and then get the header's position (call
This is returned when moving to a
This value is only returned if one of the following has been specified:
||Warning. This warning is returned if a timestamp could not be guaranteed to be synchronized for a track while processing.|
Failure. This error is returned when the input timestamp exceeds
the stream's duration (the value of the
||Failure. This error is returned when you seek to a track that does not exist or is not configured to be output by the input parameters.|
||Failure. This error is returned when an argument is
||Failure. This error is returned when functions are not called in the correct order.|
Seeks and demultiplexes.
This function can only be called after parsing a header (
If the value input for end_time_stamp when calling this function is
MP4DMX_UNASSIGNED_END_TIME_STAMP, processing continues until all data is completed, so this
function will not return until processing has completed. However, the output data is divided by each
header, so this function can only consider the range indicated by the headers that have been parsed
as its range. It cannot tell whether the end is the end of the entire data file, or the end
indicated by a particular header, so when
MP4DMX_UNASSIGNED_END_TIME_STAMP is input, it
MP4DMX_RET_FIND_HEADER rather than
MP4DMX_RET_SUCCESS, even if the end of the
MP4 data file has been reached. When using
MP4DMX_UNASSIGNED_END_TIME_STAMP, the user
application must determine whether the true end of the file has been reached.
When calling this function with seek specified (control_flag is 1, getting the current position), the
sample maintained within the library is output, and the header data maintained by the library must be
updated with the seek target header data. For this reason, this function should be called every time
directly before starting (call to
MP4DMXBegin) when performing continuous processing, restarting
MP4DMXBegin) immediately after ending the previous (call to
MP4DMXEnd). (This is not
necessary when demultiplexing/getting samples, control_flag is 0.)
The value passed into time_stamp when calling this function sets the time information used for
seeking. However, if you called the header parsing function
MP4DMX_RET_READ_HEADER was returned when this function was called with seek specified (to get
the current header), you should use the time_stamp output by the header parsing function
MP4DMXReadHeader to continue getting the current position.
|Background||Do not call this function from the background.|
|Multiple threads||This function is not thread-safe.|
2014/07/29 Initial version.