Vision Apps User Guide
OpenMAX Codec Wrapper APIs

Introduction

This section contains APIs to use OpenMAX CODEC Pipelines within demos.

Functions

int32_t appOMXInit (app_codec_wrapper_params_t *prm)
 Launches the OMXPipeline described by user defined parameters. More...
 
int32_t appOMXEncInit (void *data_ptr[CODEC_MAX_BUFFER_DEPTH][CODEC_MAX_NUM_CHANNELS][CODEC_MAX_NUM_PLANES])
 Initializes the Encode elements to be able to push buffers to the OMXPipeline. Wraps the given allocated memory as OMXBuffers to push. The input parameters (in_*) must be properly initialised. More...
 
int32_t appOMXDecInit (void *(*data_ptr)[CODEC_MAX_NUM_CHANNELS][CODEC_MAX_NUM_PLANES])
 Initializes the Decode elements to be able to pull buffers from the OMXPipeline. Registers the data_pointers that will map to the bufferpool of pulled OMXBuffers. The output parameters (out_*) must be properly initialised. More...
 
int32_t appOMXStart ()
 Starts the OMXPipeline that was launched previously. More...
 
int32_t appOMXEnqAppEnc (uint8_t idx)
 Push a buffer from the bufferpool to the Encode element. More...
 
int32_t appOMXDeqAppEnc (uint8_t idx)
 Wait for a previously pushed buffer to be consumed by the OMXPipeline. More...
 
int32_t appOMXEnqEosAppEnc ()
 Push EOS (End Of Stream) to the Encode element. Signals the elements to stop processing buffers after this. More...
 
int32_t appOMXDeqAppDec (uint8_t idx)
 Pull a buffer from the Decode element into the bufferpool. More...
 
int32_t appOMXEnqAppDec (uint8_t idx)
 Release a previously pulled OMXBuffer back to GStreamer and cleanup. More...
 
int32_t appOMXStop ()
 Stops the OMXPipeline that was in playing state. If there is no Decode element, waits to recieve EOS before cleaning up. More...
 
void appOMXDeInit ()
 Unmaps all buffers that were mapped and destroys all GStreamer objects. More...
 
void appOMXPrintStats ()
 Prints the current count of the numbers of buffers pushed/pulled to/from the OMXPipeline. Not multi-thread safe. More...
 

Function Documentation

◆ appOMXInit()

int32_t appOMXInit ( app_codec_wrapper_params_t prm)

Launches the OMXPipeline described by user defined parameters.

Parameters
[in]prmInit parameters

◆ appOMXEncInit()

int32_t appOMXEncInit ( void *  data_ptr[CODEC_MAX_BUFFER_DEPTH][CODEC_MAX_NUM_CHANNELS][CODEC_MAX_NUM_PLANES])

Initializes the Encode elements to be able to push buffers to the OMXPipeline. Wraps the given allocated memory as OMXBuffers to push. The input parameters (in_*) must be properly initialised.

Parameters
[in]data_ptrmemory that the OMXBuffers will map to

◆ appOMXDecInit()

int32_t appOMXDecInit ( void *(*)  data_ptr[CODEC_MAX_NUM_CHANNELS][CODEC_MAX_NUM_PLANES])

Initializes the Decode elements to be able to pull buffers from the OMXPipeline. Registers the data_pointers that will map to the bufferpool of pulled OMXBuffers. The output parameters (out_*) must be properly initialised.

Parameters
[in]data_ptrpointers to hold the pulled buffers

◆ appOMXStart()

int32_t appOMXStart ( )

Starts the OMXPipeline that was launched previously.

◆ appOMXEnqAppEnc()

int32_t appOMXEnqAppEnc ( uint8_t  idx)

Push a buffer from the bufferpool to the Encode element.

Parameters
[in]idxthe buffer id, from the bufferpool, to be pushed to the OMXPipeline

◆ appOMXDeqAppEnc()

int32_t appOMXDeqAppEnc ( uint8_t  idx)

Wait for a previously pushed buffer to be consumed by the OMXPipeline.

Parameters
[in]idxthe buffer id, from the bufferpool, to wait on

◆ appOMXEnqEosAppEnc()

int32_t appOMXEnqEosAppEnc ( )

Push EOS (End Of Stream) to the Encode element. Signals the elements to stop processing buffers after this.

◆ appOMXDeqAppDec()

int32_t appOMXDeqAppDec ( uint8_t  idx)

Pull a buffer from the Decode element into the bufferpool.

Parameters
[in]idxthe slot into which the pulled data is stored
in the pulled_data_ptr array, while maintaining a reference to the pulled OMXBuffer

◆ appOMXEnqAppDec()

int32_t appOMXEnqAppDec ( uint8_t  idx)

Release a previously pulled OMXBuffer back to GStreamer and cleanup.

Parameters
[in]idxthe slot from which the buffer is released back to OMXreamer. The data pointer for this slot is no longer valid

◆ appOMXStop()

int32_t appOMXStop ( )

Stops the OMXPipeline that was in playing state. If there is no Decode element, waits to recieve EOS before cleaning up.

◆ appOMXDeInit()

void appOMXDeInit ( )

Unmaps all buffers that were mapped and destroys all GStreamer objects.

◆ appOMXPrintStats()

void appOMXPrintStats ( )

Prints the current count of the numbers of buffers pushed/pulled to/from the OMXPipeline. Not multi-thread safe.