RIO-7762: OMX_UseBuffer support buffers allocated in MIO.
The change depends on
     https://android-git.corp.google.com/g/30984
diff --git a/android/author/android_camera_input.cpp b/android/author/android_camera_input.cpp
index 943cbca..b5a5160 100644
--- a/android/author/android_camera_input.cpp
+++ b/android/author/android_camera_input.cpp
@@ -37,13 +37,22 @@
 // Define entry point for this DLL
 OSCL_DLL_ENTRY_POINT_DEFAULT()
 
+PVRefBufferAlloc::~PVRefBufferAlloc()
+{
+    if(numAllocated != 0)
+    {
+        LOGE("Ln %d ERROR PVRefBufferAlloc numAllocated %d",__LINE__, numAllocated );
+    }
+}
+
 // camera MIO
 AndroidCameraInput::AndroidCameraInput()
     : OsclTimerObject(OsclActiveObject::EPriorityNominal, "AndroidCameraInput"),
     iWriteState(EWriteOK),
     iAuthorClock(NULL),
     iClockNotificationsInf(NULL),
-    iAudioFirstFrameTs(0)
+    iAudioFirstFrameTs(0),
+    pPmemInfo(NULL)
 {
     LOGV("constructor(%p)", this);
     iCmdIdCounter = 0;
@@ -107,6 +116,11 @@
     }
     iFrameQueueMutex.Close();
     mListener.clear();
+    if(pPmemInfo)
+    {
+        delete pPmemInfo;
+        pPmemInfo = NULL;
+    }
 }
 
 PVMFStatus AndroidCameraInput::connect(PvmiMIOSession& aSession,
@@ -547,6 +561,23 @@
         // TODO:
         // is it okay to hardcode this as the timescale?
         params[0].value.uint32_value = 1000;
+    } else if (!pv_mime_strcmp(identifier, PVMF_BUFFER_ALLOCATOR_KEY)) {
+        /*
+         * if( camera MIO does NOT allocate YUV buffers )
+         * {
+         *      OSCL_LEAVE(OsclErrNotSupported);
+         *      return PVMFErrNotSupported;
+         * }
+         */
+
+        params = (PvmiKvp*)oscl_malloc(sizeof(PvmiKvp));
+        if (!params )
+        {
+            OSCL_LEAVE(OsclErrNoMemory);
+            return PVMFErrNoMemory;
+        }
+        params [0].value.key_specific_value = (PVInterface*)&mbufferAlloc;
+        status = PVMFSuccess;
     }
 
     return status;
@@ -994,6 +1025,11 @@
     mCamera->setListener(NULL);
     mCamera->stopRecording();
     ReleaseQueuedFrames();
+    if(pPmemInfo)
+    {
+        delete pPmemInfo;
+        pPmemInfo = NULL;
+    }
     }
     iState = STATE_STOPPED;
     return PVMFSuccess;
@@ -1175,6 +1211,28 @@
     data.iXferHeader.flags = 0;
     data.iXferHeader.duration = 0;
     data.iXferHeader.stream_id = 0;
+
+    {//compose private data
+        //could size be zero?
+        if(NULL == pPmemInfo)
+        {
+            int iCalculateNoOfCameraPreviewBuffer = heap->getSize() / size;
+            LOGV("heap->getSize() = %d, size of each frame= %d, iCalculateNoOfCameraPreviewBuffer = %d", heap->getSize(), size, iCalculateNoOfCameraPreviewBuffer);
+            pPmemInfo = new CAMERA_PMEM_INFO[iCalculateNoOfCameraPreviewBuffer];
+            if(NULL == pPmemInfo)
+            {
+                LOGE("Failed to allocate the camera pmem info buffer array. iCalculateNoOfCameraPreviewBuffer %d",iCalculateNoOfCameraPreviewBuffer);
+                return PVMFFailure;
+            }
+        }
+
+        int iIndex = offset / size;
+        pPmemInfo[iIndex].pmem_fd = heap->getHeapID();
+        pPmemInfo[iIndex].offset = offset;
+        data.iXferHeader.private_data_ptr = ((OsclAny*)(&pPmemInfo[iIndex]));
+        LOGV("struct size %d, pmem_info - %x, &pmem_info[iIndex] - %x, iIndex =%d, pmem_info.pmem_fd = %d, pmem_info.offset = %d", sizeof(CAMERA_PMEM_INFO), pPmemInfo, &pPmemInfo[iIndex], iIndex, pPmemInfo[iIndex].pmem_fd, pPmemInfo[iIndex].offset );
+    }
+
     data.iFrameBuffer = frame;
     data.iFrameSize = size;
 
diff --git a/android/author/android_camera_input.h b/android/author/android_camera_input.h
index 2a0719b..ba83a54 100644
--- a/android/author/android_camera_input.h
+++ b/android/author/android_camera_input.h
@@ -190,6 +190,99 @@
     AndroidCameraInput* mCameraInput;
 };
 
+#ifndef PVMF_FIXEDSIZE_BUFFER_ALLOC_H_INCLUDED
+#include "pvmf_fixedsize_buffer_alloc.h"
+#endif
+
+/* A MIO allocater class for two purposes:
+ * 1. Provide the number of buffers MIO will use;
+ * 2. Allocate the buffers for OMX_UseBuffer for "buffer pre-announcement". In case MIO cannot
+ * provide the buffer address, a dummy address is used. The OMX component has to support
+ * movable buffer(iOMXComponentSupportsMovableInputBuffers) in that case.
+ */
+class PVRefBufferAlloc: public PVInterface, public PVMFFixedSizeBufferAlloc
+{
+    public:
+        PVRefBufferAlloc()
+            :refCount(0),
+            bufferSize(0),
+            maxBuffers(4), //QCOM camera will use 4 buffers, although it actually only has 3 right now.
+            numAllocated(0),
+            pMagicAddr( (OsclAny*)0xDEADBEEF )
+        {
+        }
+
+        virtual ~PVRefBufferAlloc();
+
+        virtual void addRef() {++refCount;};
+
+        virtual void removeRef()
+        {
+            --refCount;
+            if (refCount <= 0)
+            {//cleanup
+                LOGW("refCount %d", refCount );
+            }
+        }
+
+        virtual bool queryInterface(const PVUuid& uuid, PVInterface*& aInterface)
+        {
+            aInterface = NULL; // initialize aInterface to NULL in case uuid is not supported
+
+            if (PVMFFixedSizeBufferAllocUUID == uuid)
+            {
+                // Send back ptr to the allocator interface object
+                PVMFFixedSizeBufferAlloc* myInterface   = OSCL_STATIC_CAST(PVMFFixedSizeBufferAlloc*, this);
+                refCount++; // increment interface refcount before returning ptr
+                aInterface = OSCL_STATIC_CAST(PVInterface*, myInterface);
+                return true;
+            }
+
+            return false;
+        }
+
+        virtual OsclAny* allocate()
+        {
+            if (numAllocated < maxBuffers)
+            {
+                //MIO does NOT provide mem allocator impl.
+                //return dummy address for OMX buffer pre-announcement.
+                ++numAllocated;
+                return (OsclAny*)pMagicAddr;
+            }
+            return NULL;
+        }
+
+        virtual void deallocate(OsclAny* ptr)
+        {
+            if( pMagicAddr == ptr )
+            {
+                --numAllocated;
+            }
+            else
+            {
+                LOGE("Ln %d ERROR PVRefBufferAlloc ptr corrupted 0x%x numAllocated %d", __LINE__, ptr, numAllocated );
+            }
+        }
+
+        virtual uint32 getBufferSize()
+        {
+            return bufferSize;
+        }
+
+        virtual uint32 getNumBuffers()
+        {
+            return maxBuffers;
+        }
+
+    private:
+        int32 refCount;
+        int32 bufferSize;
+        int32 maxBuffers;
+        int32 numAllocated;
+        const OsclAny *pMagicAddr;
+};
+
 class AndroidCameraInput
     : public OsclTimerObject,
       public PvmiMIOControl,
@@ -438,6 +531,16 @@
     PVMFMediaClockNotificationsInterface *iClockNotificationsInf;
 
     uint32 iAudioFirstFrameTs;
+    PVRefBufferAlloc    mbufferAlloc;
+
+    // data structures for tunneling buffers
+    struct CAMERA_PMEM_INFO
+    {
+        /* pmem file descriptor */
+        uint32 pmem_fd;
+        uint32 offset;
+    } *pPmemInfo;
+
 };
 
 #ifdef HIDE_MIO_SYMBOLS
diff --git a/nodes/pvmediainputnode/src/pvmf_media_input_node.h b/nodes/pvmediainputnode/src/pvmf_media_input_node.h
index e2b0c69..d7731ef 100644
--- a/nodes/pvmediainputnode/src/pvmf_media_input_node.h
+++ b/nodes/pvmediainputnode/src/pvmf_media_input_node.h
@@ -211,6 +211,11 @@
 
         // function used in getParametersSync of capability class
         PVMFStatus GetConfigParameter(PvmiKvp*& aParameters, int& aNumParamElements, int32 aIndex, PvmiKvpAttr reqattr);
+        // To support config interface
+        void QueryInterface(const PVUuid &aUuid, OsclAny*&aPtr)
+        {
+            aPtr = (aUuid == PVMI_CAPABILITY_AND_CONFIG_PVUUID) ? ((PvmiCapabilityAndConfig*)this) : NULL;
+        }
     private:
         typedef enum
         {
diff --git a/nodes/pvmediainputnode/src/pvmf_media_input_node_outport.cpp b/nodes/pvmediainputnode/src/pvmf_media_input_node_outport.cpp
index 628cd1e..f53cd64 100644
--- a/nodes/pvmediainputnode/src/pvmf_media_input_node_outport.cpp
+++ b/nodes/pvmediainputnode/src/pvmf_media_input_node_outport.cpp
@@ -65,6 +65,9 @@
     iMediaDataMemPool = OSCL_NEW(OsclMemPoolFixedChunkAllocator, (PVMIO_MEDIADATA_POOLNUM));
     iMediaDataAlloc = OSCL_NEW(PvmfMediaInputDataBufferAlloc, (iMediaDataAllocMemPool));
     iDataPathLogger = PVLogger::GetLoggerObject("datapath.sourcenode");
+
+    //OSCL_TRY(err, iPrivateDataFsiFragmentAlloc.size(4, sizeof(OsclAny *))); //TODO REMOVE THE HARDCODED VALUE
+    iPrivateDataFsiFragmentAlloc.size(4, sizeof(OsclAny *)); //TODO REMOVE THE HARDCODED VALUE
 #ifdef _TEST_AE_EROR_HANDLING
     iTimeStampJunk = 0x000FFFFF;
 #endif
@@ -405,6 +408,27 @@
             mediaData->setMediaFragFilledLen(0, data_len);
             mediaData->setStreamID(data_header_info.stream_id);
 
+            PVMFStatus status = PVMFFailure;
+            {
+                OsclRefCounterMemFrag privatedataFsiMemFrag;
+                OsclLeaveCode fsiErrorCode = OsclErrNone;
+
+                OSCL_TRY(fsiErrorCode, privatedataFsiMemFrag = iPrivateDataFsiFragmentAlloc.get(););
+
+                OSCL_FIRST_CATCH_ANY(fsiErrorCode,
+                        LOG_ERR((0, "Failed to allocate memory for  FSI for private data"));
+                        status = PVMFErrNoMemory;
+                        iNode->ReportErrorEvent(PVMFErrPortProcessing, (OsclAny*)status);
+                        OSCL_LEAVE(OsclErrNoMemory);
+                        return -1; // this is going to make everything go out of scope
+                        );
+
+                uint8 *fsiptr = (uint8*) privatedataFsiMemFrag.getMemFragPtr();
+                privatedataFsiMemFrag.getMemFrag().len = sizeof(OsclAny*);
+                oscl_memcpy(fsiptr, &(data_header_info.private_data_ptr), sizeof(OsclAny *)); // store ptr data into fsi
+                mediaData->setFormatSpecificInfo(privatedataFsiMemFrag);
+            }
+
             LOGDATATRAFFIC((0, "PvmfMediaInputNodeOutPort::writeAsync:"
                             "StreamID=%d, TS=%d, Len=%d, SN=%d, MimeType=%s",
                             data_header_info.stream_id,  data_header_info.timestamp, data_len,
@@ -412,7 +436,6 @@
             // Convert media data to MediaMsg
             PVMFSharedMediaMsgPtr mediaMsg;
             convertToPVMFMediaMsg(mediaMsg, mediaData);
-            PVMFStatus status;
 #ifdef _TEST_AE_ERROR_HANDLING
 
             if ((iNode->iErrorTrackID > 0) && (data_header_info.stream_id == (uint32)iNode->iErrorTrackID))
diff --git a/nodes/pvmediainputnode/src/pvmf_media_input_node_outport.h b/nodes/pvmediainputnode/src/pvmf_media_input_node_outport.h
index ca1ddad..3cff691 100644
--- a/nodes/pvmediainputnode/src/pvmf_media_input_node_outport.h
+++ b/nodes/pvmediainputnode/src/pvmf_media_input_node_outport.h
@@ -59,6 +59,8 @@
 #include "pvmf_media_input_data_buffer.h"
 #endif
 
+#include "pvmf_pool_buffer_allocator.h"
+
 // Forward declaration
 class PvmfMediaInputNode;
 
@@ -183,6 +185,7 @@
         //logging
         OSCL_HeapString<OsclMemAllocator> iMimeType;
         PVLogger* iDataPathLogger;
+        PVMFBufferPoolAllocator iPrivateDataFsiFragmentAlloc;
 };
 
 #endif // PVMF_MEDIA_INPUT_NODE_INPORT_H_INCLUDED
diff --git a/nodes/pvomxencnode/include/pvmf_omx_enc_port.h b/nodes/pvomxencnode/include/pvmf_omx_enc_port.h
index 59979d0..4155f6e 100644
--- a/nodes/pvomxencnode/include/pvmf_omx_enc_port.h
+++ b/nodes/pvomxencnode/include/pvmf_omx_enc_port.h
@@ -81,6 +81,8 @@
         }
 
         bool pvmiSetPortFormatSpecificInfoSync(OsclRefCounterMemFrag& aMemFrag);
+        bool pvmiGetBufferAllocatorSpecificInfoSync(PvmiKeyType aIdentifier, PvmiKvp*& aParameters, int& aNumParamElements);
+        bool releaseParametersSync(PvmiKvp*& aParameters, int& aNumParamElements);
 
         PVMFStatus Connect(PVMFPortInterface* aPort);
         void setParametersSync(PvmiMIOSession aSession,
diff --git a/nodes/pvomxencnode/src/pvmf_omx_enc_node.cpp b/nodes/pvomxencnode/src/pvmf_omx_enc_node.cpp
index 77b1b5c..f648d5a 100644
--- a/nodes/pvomxencnode/src/pvmf_omx_enc_node.cpp
+++ b/nodes/pvomxencnode/src/pvmf_omx_enc_node.cpp
@@ -339,6 +339,14 @@
         iOutBufMemoryPool->removeRef();
         iOutBufMemoryPool = NULL;
     }
+
+    ipFixedSizeBufferAlloc = NULL;
+    if(ipExternalInputBufferAllocatorInterface)
+    {
+        ipExternalInputBufferAllocatorInterface->removeRef();
+        ipExternalInputBufferAllocatorInterface = NULL;
+    }
+
     if (iInBufMemoryPool)
     {
         iInBufMemoryPool->removeRef();
@@ -658,7 +666,9 @@
         iAvgBitrateValue(0),
         iResetInProgress(false),
         iResetMsgSent(false),
-        iStopInResetMsgSent(false)
+        iStopInResetMsgSent(false),
+        ipExternalInputBufferAllocatorInterface(NULL),
+        ipFixedSizeBufferAlloc(NULL)
 {
     iInterfaceState = EPVMFNodeCreated;
 
@@ -2198,11 +2208,81 @@
         iNumInputBuffers = iParamPort.nBufferCountMin;
 
 
+    /*  OMX_UseBuffer, ie. if OMX client instead of OMX component is to allocate buffers,
+    *   if the buffers are allocated in MIO, check MIO allocator the max number of buffers;
+    *   else (the buffer is allocated by OMX client itself) floor the number of buffers to  NUMBER_INPUT_BUFFER
+    *   validate with OMX component whether it is ok with the number decided above.
+    *   Note: the spec says in OMX_UseBuffer, the OMX client can decide number of input buffers.
+    */
+    if(iOMXComponentSupportsExternalInputBufferAlloc)
+    {
+        ipExternalInputBufferAllocatorInterface = NULL;
+        PvmiKvp* kvp = NULL;
+        int numKvp = 0;
+        PvmiKeyType aIdentifier = (PvmiKeyType)PVMF_BUFFER_ALLOCATOR_KEY;
+        int32 err, err1;
+        OSCL_TRY(err, ((PVMFOMXEncPort*)iInPort)->pvmiGetBufferAllocatorSpecificInfoSync(aIdentifier, kvp, numKvp););
+
+        if ((err == OsclErrNone) && (NULL != kvp))
+        {
+            ipExternalInputBufferAllocatorInterface = (PVInterface*) kvp->value.key_specific_value;
+
+            if (ipExternalInputBufferAllocatorInterface)
+            {
+                PVInterface* pTempPVInterfacePtr = NULL;
+
+                OSCL_TRY(err, ipExternalInputBufferAllocatorInterface->queryInterface(PVMFFixedSizeBufferAllocUUID, pTempPVInterfacePtr););
+
+                OSCL_TRY(err1, ((PVMFOMXEncPort*)iInPort)->releaseParametersSync(kvp, numKvp););
+                OSCL_FIRST_CATCH_ANY(err1,
+                        PVLOGGER_LOGMSG(PVLOGMSG_INST_LLDBG, iLogger, PVLOGMSG_DEBUG,
+                            (0, "PVMFOMXEncNode-%s::NegotiateComponentParameters() - Unable to Release Parameters", iNodeTypeId));
+                        );
+
+                if ((err == OsclErrNone) && (NULL != pTempPVInterfacePtr))
+                {
+                    ipFixedSizeBufferAlloc = OSCL_STATIC_CAST(PVMFFixedSizeBufferAlloc*, pTempPVInterfacePtr);
+
+                    uint32 iNumBuffers = ipFixedSizeBufferAlloc->getNumBuffers();
+                    uint32 iBufferSize = ipFixedSizeBufferAlloc->getBufferSize();
+
+                    PVLOGGER_LOGMSG(PVLOGMSG_INST_LLDBG, iLogger, PVLOGMSG_DEBUG,
+                            (0, "PVMFOMXEncNode-%s iNumBuffers %d iBufferSize %d iOMXComponentInputBufferSize %d iParamPort.nBufferCountMin %d", iNodeTypeId, iNumBuffers , iBufferSize , iOMXComponentInputBufferSize, iParamPort.nBufferCountMin ) );
+
+                    //TODO should let camera decide number of buffers.
+                    if ((iNumBuffers < iParamPort.nBufferCountMin) || (iBufferSize < iOMXComponentInputBufferSize ))
+                    {
+                        PVLOGGER_LOGMSG(PVLOGMSG_INST_LLDBG, iLogger, PVLOGMSG_ERR,
+                            (0, "PVMFOMXEncNode-%s::NegotiateComponentParameters() - not enough buffer. Got %d x %d. Require %d x %d", iNodeTypeId, iNumBuffers , iBufferSize , iOMXComponentInputBufferSize, iParamPort.nBufferCountMin));
+                        ipFixedSizeBufferAlloc = NULL;
+
+                        ipExternalInputBufferAllocatorInterface->removeRef();
+                        ipExternalInputBufferAllocatorInterface = NULL;
+                    }
+                    else
+                    {
+                        iNumInputBuffers = iNumBuffers;
+                        iOMXComponentInputBufferSize = iBufferSize;
+                    }
+                }
+                else
+                {
+                    ipExternalInputBufferAllocatorInterface->removeRef();
+                    ipExternalInputBufferAllocatorInterface = NULL;
+
+                }
+            }
+        }
+    }
+
     // if component allows us to allocate buffers, we'll decide how many to allocate
     if (iOMXComponentSupportsExternalInputBufferAlloc && (iParamPort.nBufferCountMin < NUMBER_INPUT_BUFFER))
     {
+        if(NULL == ipFixedSizeBufferAlloc)
+        {
         // preset the number of input buffers
         iNumInputBuffers = NUMBER_INPUT_BUFFER;
+        }
     }
 
     // set the number of input buffer
@@ -3905,6 +3985,17 @@
             // set pointer to the data, length, offset
             input_buf->pBufHdr->pBuffer = (uint8 *)frag.getMemFragPtr();
             input_buf->pBufHdr->nFilledLen = frag.getMemFragSize();
+            {//TODO: check whether addRef() is needed for fsi
+                OsclRefCounterMemFrag fsifrag;
+                iDataIn->getFormatSpecificInfo(fsifrag);
+                if(sizeof(OsclAny*) != fsifrag.getMemFrag().len )
+                {
+                    PVLOGGER_LOGMSG(PVLOGMSG_INST_LLDBG, iLogger, PVLOGMSG_STACK_ERR,
+                            (0, "PVMFOMXEncNode-%s::SendInputBufferToOMXComponent() - ERROR buffer size %d", iNodeTypeId, fsifrag.getMemFrag().len ));
+                    return false;
+                }
+                oscl_memcpy(&(input_buf->pBufHdr->pPlatformPrivate), fsifrag.getMemFragPtr(), sizeof(OsclAny*) ); // restore ptr data from fsi
+            }
 
             PVLOGGER_LOGMSG(PVLOGMSG_INST_LLDBG, iLogger, PVLOGMSG_STACK_TRACE,
                             (0, "PVMFOMXEncNode-%s::SendInputBufferToOMXComponent() - Buffer 0x%x of size %d, %d frag out of tot. %d, TS=%d, Ticks=%L", iNodeTypeId, input_buf->pBufHdr->pBuffer, frag.getMemFragSize(), iCurrFragNum + 1, iDataIn->getNumFragments(), iInTimestamp, iOMXTicksTimestamp));
@@ -3996,8 +4087,13 @@
 
         // in case of encoder, all input frames should be marked
         input_buf->pBufHdr->nFlags |= OMX_BUFFERFLAG_ENDOFFRAME;
-        OMX_EmptyThisBuffer(iOMXEncoder, input_buf->pBufHdr);
-
+        OMX_ERRORTYPE myret = OMX_EmptyThisBuffer(iOMXEncoder, input_buf->pBufHdr);
+        if(OMX_ErrorNone != myret )
+        {
+            PVLOGGER_LOGMSG(PVLOGMSG_INST_LLDBG, iLogger, PVLOGMSG_STACK_TRACE,
+                    (0, "PVMFOMXEncNode-%s::SendInputBufferToOMXComponent() OMX_EmptyThisBuffer ERROR %d", iNodeTypeId, myret));
+            return false;
+        }
 
         // if we sent all fragments to OMX component, decouple the input message from iDataIn
         // Input message is "decoupled", so that we can get a new message for processing into iDataIn
@@ -4432,6 +4528,11 @@
             iNumOutstandingInputBuffers++;
             // get the buf hdr pointer
             InputBufCtrlStruct *temp = (InputBufCtrlStruct *) ctrl_struct_ptr[ii];
+
+            if(ipExternalInputBufferAllocatorInterface && ipFixedSizeBufferAlloc)
+            {
+                ipFixedSizeBufferAlloc->deallocate((OsclAny*) temp->pBufHdr->pBuffer);
+            }
             err = OMX_FreeBuffer(iOMXEncoder,
                                  aPortIndex,
                                  temp->pBufHdr);
@@ -4474,6 +4575,12 @@
         in_ctrl_struct_ptr = NULL;
         in_buff_hdr_ptr = NULL;
         iInputBuffersFreed = true;
+
+        if(ipExternalInputBufferAllocatorInterface)
+        {
+            ipExternalInputBufferAllocatorInterface->removeRef();
+            ipExternalInputBufferAllocatorInterface = NULL;
+        }
     }
     else
     {
diff --git a/nodes/pvomxencnode/src/pvmf_omx_enc_node.h b/nodes/pvomxencnode/src/pvmf_omx_enc_node.h
index 49ceece..e132d88 100644
--- a/nodes/pvomxencnode/src/pvmf_omx_enc_node.h
+++ b/nodes/pvomxencnode/src/pvmf_omx_enc_node.h
@@ -49,6 +49,10 @@
 #include "pvmf_mempool.h"
 #endif
 
+#ifndef PVMF_FIXEDSIZE_BUFFER_ALLOC_H_INCLUDED
+#include "pvmf_fixedsize_buffer_alloc.h"
+#endif
+
 #ifndef PVMF_SIMPLE_MEDIA_BUFFER_H_INCLUDED
 #include "pvmf_simple_media_buffer.h"
 #endif
@@ -1407,7 +1411,8 @@
         OMX_TICKS ConvertTimestampIntoOMXTicks(const MediaClockConverter &src);
         uint32 ConvertOMXTicksIntoTimestamp(const OMX_TICKS &src);
 
-
+        PVInterface* ipExternalInputBufferAllocatorInterface;
+        PVMFFixedSizeBufferAlloc* ipFixedSizeBufferAlloc;
 
 #ifdef _TEST_AE_ERROR_HANDLING
         bool   iErrorHandlingInit;
diff --git a/nodes/pvomxencnode/src/pvmf_omx_enc_port.cpp b/nodes/pvomxencnode/src/pvmf_omx_enc_port.cpp
index 07b9ae9..9a0d583 100644
--- a/nodes/pvomxencnode/src/pvmf_omx_enc_port.cpp
+++ b/nodes/pvomxencnode/src/pvmf_omx_enc_port.cpp
@@ -1117,3 +1117,45 @@
     return err;
 }
 
+bool PVMFOMXEncPort::pvmiGetBufferAllocatorSpecificInfoSync(PvmiKeyType aIdentifier, PvmiKvp*& aParameters, int& aNumParamElements)
+{
+    if ((iConnectedPort) && (iTag == PVMF_OMX_ENC_NODE_PORT_TYPE_INPUT))
+    {
+        OsclAny* temp = NULL;
+        iConnectedPort->QueryInterface(PVMI_CAPABILITY_AND_CONFIG_PVUUID, temp);
+
+        if (temp != NULL)
+        {
+            PvmiCapabilityAndConfig *config = (PvmiCapabilityAndConfig*)temp;
+
+            PVMFStatus status =
+                config->getParametersSync(NULL, (PvmiKeyType)aIdentifier, aParameters, aNumParamElements, NULL);
+
+            if (PVMFSuccess == status)
+            {
+                return true;
+            }
+        }
+    }
+    return false;
+}
+
+bool PVMFOMXEncPort::releaseParametersSync(PvmiKvp*& aParameters, int& aNumParamElements)
+{
+    if ((iConnectedPort) && (iTag == PVMF_OMX_ENC_NODE_PORT_TYPE_INPUT))
+    {
+        OsclAny* temp = NULL;
+        iConnectedPort->QueryInterface(PVMI_CAPABILITY_AND_CONFIG_PVUUID, temp);
+
+        if (temp != NULL)
+        {
+            PvmiCapabilityAndConfig *config = (PvmiCapabilityAndConfig*)temp;
+
+            if (PVMFSuccess == config->releaseParameters(NULL, aParameters, aNumParamElements) )
+            {
+                return true;
+            }
+        }
+    }
+    return false;
+}