Vision Apps User Guide
omax_wrapper.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2021 Texas Instruments Incorporated - http://www.ti.com/
3  *
4  * Redistribution and use in source and binary forms, with or without
5  * modification, are permitted provided that the following conditions
6  * are met:
7  *
8  * Redistributions of source code must retain the above copyright
9  * notice, this list of conditions and the following disclaimer.
10  *
11  * Redistributions in binary form must reproduce the above copyright
12  * notice, this list of conditions and the following disclaimer in the
13  * documentation and/or other materials provided with the
14  * distribution.
15  *
16  * Neither the name of Texas Instruments Incorporated nor the names of
17  * its contributors may be used to endorse or promote products derived
18  * from this software without specific prior written permission.
19  *
20  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
21  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
22  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
23  * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
24  * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
25  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
26  * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
27  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
28  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
29  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
30  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31  */
32 
33 #ifndef _TI_OMAX_WRAPPER_H_
34 #define _TI_OMAX_WRAPPER_H_
35 
37 
56 
67 
77 int32_t appOMXDecInit(void* (*data_ptr)[CODEC_MAX_NUM_CHANNELS][CODEC_MAX_NUM_PLANES]);
78 
84 int32_t appOMXStart();
85 
93 int32_t appOMXEnqAppEnc(uint8_t idx);
94 
102 int32_t appOMXDeqAppEnc(uint8_t idx);
103 
110 int32_t appOMXEnqEosAppEnc();
111 
121 int32_t appOMXDeqAppDec(uint8_t idx);
122 
132 int32_t appOMXEnqAppDec(uint8_t idx);
133 
140 int32_t appOMXStop();
141 
147 void appOMXDeInit();
148 
149 
156 void appOMXPrintStats();
157 
158 /* @} */
159 
160 #endif /* _TI_OMAX_WRAPPER_H_ */
161 
#define CODEC_MAX_BUFFER_DEPTH
Definition: codec_wrapper.h:55
void appOMXPrintStats()
Prints the current count of the numbers of buffers pushed/pulled to/from the OMXPipeline. Not multi-thread safe.
#define CODEC_MAX_NUM_CHANNELS
Definition: codec_wrapper.h:59
#define CODEC_MAX_NUM_PLANES
Definition: codec_wrapper.h:54
int32_t appOMXStop()
Stops the OMXPipeline that was in playing state. If there is no Decode element, waits to recieve EOS ...
int32_t appOMXEnqAppDec(uint8_t idx)
Release a previously pulled OMXBuffer back to GStreamer and cleanup.
int32_t appOMXStart()
Starts the OMXPipeline that was launched previously.
int32_t appOMXEnqAppEnc(uint8_t idx)
Push a buffer from the bufferpool to the Encode element.
int32_t appOMXInit(app_codec_wrapper_params_t *prm)
Launches the OMXPipeline described by user defined parameters.
void appOMXDeInit()
Unmaps all buffers that were mapped and destroys all GStreamer objects.
int32_t appOMXDeqAppDec(uint8_t idx)
Pull a buffer from the Decode element into the bufferpool.
int32_t appOMXDeqAppEnc(uint8_t idx)
Wait for a previously pushed buffer to be consumed by the OMXPipeline.
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_p...
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 alloca...
int32_t appOMXEnqEosAppEnc()
Push EOS (End Of Stream) to the Encode element. Signals the elements to stop processing buffers after...
Init parameters.
Definition: codec_wrapper.h:66