|
mpeghdec
FraunhoferIISMPEG-HDecoderLibrary
|
MPEG-H 3DA decoder library interface header file. More...
#include <stdint.h>#include <stdbool.h>#include "mpeghexport.h"Go to the source code of this file.
Classes | |
| struct | MPEGH_DECODER_OUTPUT_INFO |
| This structure gives information about the currently decoded audio data. All fields are read-only. More... | |
Typedefs | |
| typedef struct MPEGH_DECODER_CONTEXT * | HANDLE_MPEGH_DECODER_CONTEXT |
| typedef struct MPEGH_DECODER_OUTPUT_INFO | MPEGH_DECODER_OUTPUT_INFO |
| This structure gives information about the currently decoded audio data. All fields are read-only. | |
Enumerations | |
| enum | MPEGH_DECODER_ERROR { MPEGH_DEC_OK, MPEGH_DEC_FEED_DATA, MPEGH_DEC_NULLPTR_ERROR, MPEGH_DEC_OUT_OF_MEMORY, MPEGH_DEC_BUFFER_ERROR, MPEGH_DEC_PROCESS_ERROR, MPEGH_DEC_UNSUPPORTED_PARAM, MPEGH_DEC_NEEDS_RESTART } |
| MPEG-H decoder error codes. More... | |
| enum | MPEGH_DECODER_PARAMETER { MPEGH_DEC_PARAM_TARGET_REFERENCE_LEVEL, MPEGH_DEC_PARAM_EFFECT_TYPE, MPEGH_DEC_PARAM_BOOST_FACTOR, MPEGH_DEC_PARAM_ATTENUATION_FACTOR, MPEGH_DEC_PARAM_ALBUM_MODE } |
| Options for handling of Dynamic Range Control (DRC) parameters. More... | |
Functions | |
| MPEGHDEC_EXPORT HANDLE_MPEGH_DECODER_CONTEXT | mpeghdecoder_init (int32_t cicpSetup) |
| Open an MPEG-H decoder instance. More... | |
| MPEGHDEC_EXPORT MPEGH_DECODER_ERROR | mpeghdecoder_setMhaConfig (HANDLE_MPEGH_DECODER_CONTEXT hCtx, const uint8_t *config, uint32_t configSize) |
| Explicitly configure the decoder by passing the MHA config contained in a binary buffer. This is required for MPEG-H MHA format bitstreams which have no in-band config. More... | |
| MPEGHDEC_EXPORT void | mpeghdecoder_destroy (HANDLE_MPEGH_DECODER_CONTEXT hCtx) |
| De-allocate all resources of an MPEG-H decoder instance. More... | |
| MPEGHDEC_EXPORT MPEGH_DECODER_ERROR | mpeghdecoder_process (HANDLE_MPEGH_DECODER_CONTEXT hCtx, const uint8_t *inData, uint32_t inLength, uint64_t timestamp) |
| Fill MPEG-H decoder's internal input buffer with bitstream data from the external input buffer and adds the corresponding timestamp to a timestamp queue. Furthermore, it decodes as many frames as possible and pushes the decoded samples into a samples queue. The decoded PCM samples can then be obtained by calling the mpeghdecoder_getSamples() function. More... | |
| MPEGHDEC_EXPORT MPEGH_DECODER_ERROR | mpeghdecoder_processTimescale (HANDLE_MPEGH_DECODER_CONTEXT hCtx, const uint8_t *inData, uint32_t inLength, uint64_t timestamp, uint32_t timescale) |
| Fill MPEG-H decoder's internal input buffer with bitstream data from the external input buffer and adds the corresponding timestamp to a timestamp queue. Furthermore, it decodes as many frames as possible and pushes the decoded samples into a samples queue. The decoded PCM samples can then be obtained by calling the mpeghdecoder_getSamples() function. More... | |
| MPEGHDEC_EXPORT MPEGH_DECODER_ERROR | mpeghdecoder_getSamples (HANDLE_MPEGH_DECODER_CONTEXT hCtx, int32_t *outData, uint32_t outLength, MPEGH_DECODER_OUTPUT_INFO *outInfo) |
| Get a decoded audio frame. More... | |
| MPEGHDEC_EXPORT MPEGH_DECODER_ERROR | mpeghdecoder_flushAndGet (HANDLE_MPEGH_DECODER_CONTEXT hCtx) |
| Flush the decoder and push the flushed PCM samples into a samples queue. The decoded PCM samples can then be obtained by calling the mpeghdecoder_getSamples() function. This function should only be used to trigger the output of all pending samples in the EOF/EOS case. More... | |
| MPEGHDEC_EXPORT MPEGH_DECODER_ERROR | mpeghdecoder_flush (HANDLE_MPEGH_DECODER_CONTEXT hCtx) |
| Flush the decoder and discard all pending samples in the samples queue. This function should be used in case of seeking operations. More... | |
| MPEGHDEC_EXPORT MPEGH_DECODER_ERROR | mpeghdecoder_setParam (HANDLE_MPEGH_DECODER_CONTEXT hCtx, MPEGH_DECODER_PARAMETER param, int value) |
| Set decoder parameter. More... | |
MPEG-H 3DA decoder library interface header file.
Definition in file mpeghdecoder.h.
| typedef struct MPEGH_DECODER_CONTEXT* HANDLE_MPEGH_DECODER_CONTEXT |
Pointer to a MPEG-H decoder instance.
Definition at line 165 of file mpeghdecoder.h.
| enum MPEGH_DECODER_ERROR |
MPEG-H decoder error codes.
Definition at line 103 of file mpeghdecoder.h.
Options for handling of Dynamic Range Control (DRC) parameters.
| Enumerator | |
|---|---|
| MPEGH_DEC_PARAM_TARGET_REFERENCE_LEVEL |
MPEG-D DRC: Target reference level / decoder target loudness. |
| MPEGH_DEC_PARAM_EFFECT_TYPE |
MPEG-D DRC: Request a DRC effect type for selection of a DRC set. |
| MPEGH_DEC_PARAM_BOOST_FACTOR |
MPEG-D DRC: Scaling factor for boosting gain values. |
| MPEGH_DEC_PARAM_ATTENUATION_FACTOR |
MPEG-D DRC: Scaling factor for attenuating gain values. |
| MPEGH_DEC_PARAM_ALBUM_MODE |
MPEG-D DRC: Enable album mode. |
Definition at line 120 of file mpeghdecoder.h.
| MPEGHDEC_EXPORT void mpeghdecoder_destroy | ( | HANDLE_MPEGH_DECODER_CONTEXT | hCtx | ) |
De-allocate all resources of an MPEG-H decoder instance.
| [in] | hCtx | MPEG-H decoder handle. |
| MPEGHDEC_EXPORT MPEGH_DECODER_ERROR mpeghdecoder_flush | ( | HANDLE_MPEGH_DECODER_CONTEXT | hCtx | ) |
Flush the decoder and discard all pending samples in the samples queue. This function should be used in case of seeking operations.
| [in] | hCtx | MPEG-H decoder handle. |
| MPEGHDEC_EXPORT MPEGH_DECODER_ERROR mpeghdecoder_flushAndGet | ( | HANDLE_MPEGH_DECODER_CONTEXT | hCtx | ) |
Flush the decoder and push the flushed PCM samples into a samples queue. The decoded PCM samples can then be obtained by calling the mpeghdecoder_getSamples() function. This function should only be used to trigger the output of all pending samples in the EOF/EOS case.
| [in] | hCtx | MPEG-H decoder handle. |
| MPEGHDEC_EXPORT MPEGH_DECODER_ERROR mpeghdecoder_getSamples | ( | HANDLE_MPEGH_DECODER_CONTEXT | hCtx, |
| int32_t * | outData, | ||
| uint32_t | outLength, | ||
| MPEGH_DECODER_OUTPUT_INFO * | outInfo | ||
| ) |
Get a decoded audio frame.
| [in] | hCtx | MPEG-H decoder handle. |
| [out] | outData | Pointer to external output buffer where the decoded PCM samples will be stored into. Needs space to hold up to 3072 samples per rendered output channel. |
| [in] | outLength | Size of external output buffer in samples. Needs space to hold up to 3072 samples per rendered output channel. The amount of valid bytes after invocation, can be otained from the outInfo. |
| [out] | outInfo | Pointer to an OUTPUT_INFO structure holding information about the current output frame. |
| MPEGHDEC_EXPORT HANDLE_MPEGH_DECODER_CONTEXT mpeghdecoder_init | ( | int32_t | cicpSetup | ) |
Open an MPEG-H decoder instance.
| [in] | cicpSetup | The CICP index of the desired target layout. |
| MPEGHDEC_EXPORT MPEGH_DECODER_ERROR mpeghdecoder_process | ( | HANDLE_MPEGH_DECODER_CONTEXT | hCtx, |
| const uint8_t * | inData, | ||
| uint32_t | inLength, | ||
| uint64_t | timestamp | ||
| ) |
Fill MPEG-H decoder's internal input buffer with bitstream data from the external input buffer and adds the corresponding timestamp to a timestamp queue. Furthermore, it decodes as many frames as possible and pushes the decoded samples into a samples queue. The decoded PCM samples can then be obtained by calling the mpeghdecoder_getSamples() function.
| [in] | hCtx | MPEG-H decoder handle. |
| [in] | inData | Pointer to external input buffer. |
| [in] | inLength | Size of external input buffer. |
| [in] | timestamp | Presentation timestamp of the external input buffer (in nano seconds). |
| MPEGHDEC_EXPORT MPEGH_DECODER_ERROR mpeghdecoder_processTimescale | ( | HANDLE_MPEGH_DECODER_CONTEXT | hCtx, |
| const uint8_t * | inData, | ||
| uint32_t | inLength, | ||
| uint64_t | timestamp, | ||
| uint32_t | timescale | ||
| ) |
Fill MPEG-H decoder's internal input buffer with bitstream data from the external input buffer and adds the corresponding timestamp to a timestamp queue. Furthermore, it decodes as many frames as possible and pushes the decoded samples into a samples queue. The decoded PCM samples can then be obtained by calling the mpeghdecoder_getSamples() function.
| [in] | hCtx | MPEG-H decoder handle. |
| [in] | inData | Pointer to external input buffer. |
| [in] | inLength | Size of external input buffer. |
| [in] | timestamp | Presentation timestamp of the external input buffer (in ticks of timescale). |
| [in] | timescale | Timescale of the presentation timestamp. |
| MPEGHDEC_EXPORT MPEGH_DECODER_ERROR mpeghdecoder_setMhaConfig | ( | HANDLE_MPEGH_DECODER_CONTEXT | hCtx, |
| const uint8_t * | config, | ||
| uint32_t | configSize | ||
| ) |
Explicitly configure the decoder by passing the MHA config contained in a binary buffer. This is required for MPEG-H MHA format bitstreams which have no in-band config.
| [in] | hCtx | MPEG-H decoder handle. |
| [in] | config | Pointer to an unsigned char buffer containing the MHA configuration buffer. |
| [in] | configSize | Length of the configuration buffer in bytes. |
| MPEGHDEC_EXPORT MPEGH_DECODER_ERROR mpeghdecoder_setParam | ( | HANDLE_MPEGH_DECODER_CONTEXT | hCtx, |
| MPEGH_DECODER_PARAMETER | param, | ||
| int | value | ||
| ) |
Set decoder parameter.
| [in] | hCtx | MPEG-H decoder handle. |
| [in] | param | Parameter to be set. |
| [in] | value | Parameter value. |
1.8.10