diff options
Diffstat (limited to 'domx/domx/omx_proxy_common.h')
-rwxr-xr-x | domx/domx/omx_proxy_common.h | 78 |
1 files changed, 75 insertions, 3 deletions
diff --git a/domx/domx/omx_proxy_common.h b/domx/domx/omx_proxy_common.h index 8eb21e5..7c7d6c8 100755 --- a/domx/domx/omx_proxy_common.h +++ b/domx/domx/omx_proxy_common.h @@ -80,7 +80,7 @@ extern "C" #define OMX_VER_MAJOR 0x1 #define OMX_VER_MINOR 0x1 -#define MAX_NUM_PROXY_BUFFERS 32 +#define MAX_NUM_PROXY_BUFFERS 100 #define MAX_COMPONENT_NAME_LENGTH 128 #define PROXY_MAXNUMOFPORTS 8 @@ -94,7 +94,7 @@ extern "C" #define PROXY_paramCheck(C, V, S) do {\ if (!(C)) { eError = V;\ if(S) DOMX_ERROR("failed check:" #C" - returning error: 0x%x - %s",V,S);\ - else DOMX_ERROR("failed check:" #C" - returning error: 0x%x",C, V); \ + else DOMX_ERROR("failed check:" #C" - returning error: 0x%x",V); \ goto EXIT; }\ } while(0) @@ -110,6 +110,38 @@ extern "C" OMX_ErrorVersionMismatch, NULL); \ } while(0) +#define PROXY_checkRpcError() do { \ + if (eRPCError == RPC_OMX_ErrorNone) \ + { \ + DOMX_DEBUG("Corresponding RPC function executed successfully"); \ + eError = eCompReturn; \ + PROXY_assert((eError == OMX_ErrorNone) || (eError == OMX_ErrorNoMore), eError, "Error returned from OMX API in ducati"); \ + } else \ + { \ + DOMX_ERROR("RPC function returned error 0x%x", eRPCError); \ + switch (eRPCError) \ + { \ + case RPC_OMX_ErrorHardware: \ + eError = OMX_ErrorHardware; \ + break; \ + case RPC_OMX_ErrorInsufficientResources: \ + eError = OMX_ErrorInsufficientResources; \ + break; \ + case RPC_OMX_ErrorBadParameter: \ + eError = OMX_ErrorBadParameter; \ + break; \ + case RPC_OMX_ErrorUnsupportedIndex: \ + eError = OMX_ErrorUnsupportedIndex; \ + break; \ + case RPC_OMX_ErrorTimeout: \ + eError = OMX_ErrorTimeout; \ + break; \ + default: \ + eError = OMX_ErrorUndefined; \ + } \ + PROXY_assert((eError == OMX_ErrorNone), eError, "Error returned from OMX API in ducati"); \ + } \ +} while(0) typedef OMX_ERRORTYPE(*PROXY_EMPTYBUFFER_DONE) (OMX_HANDLETYPE hComponent, OMX_U32 remoteBufHdr, OMX_U32 nfilledLen, @@ -134,6 +166,12 @@ extern "C" * @param pBufHeader : This is a pointer to the A9 bufferheader. * * @param pBufHeaderRemote : This is pointer to Ducati side bufferheader. + * + * @param pRegisteredAufBux0 + * @param pRegisteredAufBux1 + * @param pRegisteredAufBux2 : These are pointers to buffers registered with rpc driver + * They will assigned when registering and used when + * unregistering the buffer */ /*===============================================================*/ typedef struct PROXY_BUFFER_INFO @@ -145,6 +183,9 @@ extern "C" #ifdef USE_ION int mmap_fd; int mmap_fd_metadata_buff; + OMX_PTR pRegisteredAufBux0; + OMX_PTR pRegisteredAufBux1; + OMX_PTR pRegisteredAufBux2; #endif } PROXY_BUFFER_INFO; @@ -158,7 +199,8 @@ extern "C" VirtualPointers, /*Used when buffer pointers come from the normal A9 virtual space */ GrallocPointers, /*Used when buffer pointers come from Gralloc allocations */ IONPointers, /*Used when buffer pointers come from ION allocations */ - EncoderMetadataPointers /*Used when buffer pointers come from Stagefright in camcorder usecase */ + EncoderMetadataPointers, /*Used when buffer pointers come from Stagefright in camcorder usecase */ + BufferDescriptorVirtual2D /*Virtual unpacked buffers passed via OMX_TI_BUFFERDESCRIPTOR_TYPE */ } PROXY_BUFFER_TYPE; /*===============================================================*/ @@ -172,6 +214,33 @@ extern "C" OMX_U32 IsBuffer2D; /*Used when buffer pointers come from Gralloc allocations */ } PROXY_PORT_TYPE; +#ifdef ENABLE_RAW_BUFFERS_DUMP_UTILITY +/*===============================================================*/ +/** DebugFrame_Dump : Structure holding the info about frames to dump + * @param fromFrame: From which frame to start dumping + * @param toFrame: till which frame to dump + * @param frame_width: Width of the frame + * @param frame_height: Height of the frame + * @param padded_width: Width of the buffer + * @param padded_height: Height of the buffer + * @param stride: Stride of the Buffer + * @param runningFrame: running counter to track the frames + */ +/*===============================================================*/ + typedef struct DebugFrame_Dump + { + OMX_S32 fromFrame; + OMX_S32 toFrame; + OMX_U32 frame_width; + OMX_U32 frame_height; + OMX_U32 frame_xoffset; + OMX_U32 frame_yoffset; + OMX_U32 stride; + OMX_S32 runningFrame; + OMX_U32 *y_uv[2]; + }DebugFrame_Dump; +#endif + /* ========================================================================== */ /** * PROXY_COMPONENT_PRIVATE @@ -207,6 +276,9 @@ extern "C" OMX_BOOL bUseIon; OMX_BOOL bMapIonBuffers; #endif +#ifdef ENABLE_RAW_BUFFERS_DUMP_UTILITY + DebugFrame_Dump debugframeInfo; +#endif int secure_misc_drv_fd; } PROXY_COMPONENT_PRIVATE; |