MP4DMXGetDecoderSpecificInf

Syntax

#include <cafe/mp4dmx.h>

s32
MP4DMXGetDecoderSpecificInf(
    s32    trackID,
    s32    sample_index,
    void   *data,
    s32    *size,
    void   *handle
);

Parameters

trackID The track ID (Input).
sample_index Set to a value of 1 (Input).
data A pointer to memory storing the DecoderSpecificInfo. If NULL is specified, the DecoderSpecificInfo is not obtained or stored, but only the size of the DecoderSpecificInfo is calculated, and only *data is output (Output).
size The size of the memory storing the DecoderSpecificInfo (Input). The library stores and returns the actual data size or the required size in this parameter (Output).
handle A pointer referencing an object handle (Input).

Return Values

MP4DMX_RET_SUCCESS Success.
MP4DMX_RET_INVALID_TRACK_ID Failure. This error is returned when a nonexistent track ID is specified.
MP4DMX_RET_NOT_FOUND Failure. This error is returned when DecoderSpecificInfo does not exist in the specified track.
MP4DMX_RET_ERROR_NOT_ENOUGH_MEMORY Failure. This error is returned when the necessary memory could not be allocated.
MP4DMX_RET_ERROR_INVALID_POINTER Failure. This error is returned when an argument is NULL.
MP4DMX_RET_ERROR_FATAL Failure. This error is returned when functions are not called in the correct order.

Description

Gets the DecoderSpecificInfo within the specified track's ESDBox. For AAC audio (AAC-LC, HEAAC v1, HE-AAC v2), this is AudioSpecificConfig (binary data).

This function can only be called after a header has been parsed (call to MP4DMXReadHeader).

The size of DecoderSpecificInfo is variable, so always retrieve the size of DecoderSpecificInfo first, and then retrieve the data.

If there is a chance that the DecoderSpecificInfo size may exceed the storage area allocated, the user application should restrict the value used in data to avoid causing an access violation.

Do Not Call From

Background Do not call this function from the background.
Multiple threads This function is not thread-safe.

See Also

MP4DMXGetHeaderInf
MP4DMXGetTrackInf
MP4DMXGetVideoTrackInf
MP4DMXGetAudioTrackInf
MP4DMXGetAVCSpecificInf

Revision History

2014/07/30 Initial version.


CONFIDENTIAL