OpenMAXBellagio 0.9.3
omx_video_scheduler_component.c
Go to the documentation of this file.
00001 
00026 #include <omxcore.h>
00027 #include <omx_video_scheduler_component.h>
00028 
00029 #define DEFAULT_WIDTH   352
00030 #define DEFAULT_HEIGHT  288
00031 #define CLOCKPORT_INDEX 2
00032 
00034 #define DEFAULT_VIDEO_INPUT_BUF_SIZE DEFAULT_WIDTH*DEFAULT_HEIGHT*3/2
00035 
00040 OMX_ERRORTYPE omx_video_scheduler_component_Constructor(OMX_COMPONENTTYPE *openmaxStandComp, OMX_STRING cComponentName) {
00041   OMX_ERRORTYPE                                err = OMX_ErrorNone;
00042   omx_video_scheduler_component_PrivateType*   omx_video_scheduler_component_Private;
00043   omx_base_video_PortType       *inPort,*outPort;
00044   OMX_U32                                      i;
00045 
00046 
00047     RM_RegisterComponent(VIDEO_SCHEDULER_COMP_NAME, MAX_VIDEOSCHED_COMPONENTS);
00048   if (!openmaxStandComp->pComponentPrivate) {
00049     DEBUG(DEB_LEV_FUNCTION_NAME, "In %s, allocating component\n", __func__);
00050     openmaxStandComp->pComponentPrivate = calloc(1, sizeof(omx_video_scheduler_component_PrivateType));
00051     if(openmaxStandComp->pComponentPrivate == NULL) {
00052       return OMX_ErrorInsufficientResources;
00053     }
00054   } else {
00055     DEBUG(DEB_LEV_FUNCTION_NAME, "In %s, Error Component %p Already Allocated\n", __func__, openmaxStandComp->pComponentPrivate);
00056   }
00057 
00058   omx_video_scheduler_component_Private        = openmaxStandComp->pComponentPrivate;
00059   omx_video_scheduler_component_Private->ports = NULL;
00060 
00064   err = omx_base_filter_Constructor(openmaxStandComp, cComponentName);
00065 
00066   omx_video_scheduler_component_Private->sPortTypesParam[OMX_PortDomainVideo].nStartPortNumber = 0;
00067   omx_video_scheduler_component_Private->sPortTypesParam[OMX_PortDomainVideo].nPorts = 2;
00068 
00069   omx_video_scheduler_component_Private->sPortTypesParam[OMX_PortDomainOther].nStartPortNumber = CLOCKPORT_INDEX;
00070   omx_video_scheduler_component_Private->sPortTypesParam[OMX_PortDomainOther].nPorts = 1;
00071 
00073  if ((omx_video_scheduler_component_Private->sPortTypesParam[OMX_PortDomainVideo].nPorts
00074        + omx_video_scheduler_component_Private->sPortTypesParam[OMX_PortDomainOther].nPorts)
00075        && !omx_video_scheduler_component_Private->ports) {
00076     omx_video_scheduler_component_Private->ports = calloc((omx_video_scheduler_component_Private->sPortTypesParam[OMX_PortDomainVideo].nPorts
00077                                                            + omx_video_scheduler_component_Private->sPortTypesParam[OMX_PortDomainOther].nPorts),
00078                                                            sizeof(omx_base_PortType *));
00079     if (!omx_video_scheduler_component_Private->ports) {
00080       return OMX_ErrorInsufficientResources;
00081     }
00082     for (i=0; i < omx_video_scheduler_component_Private->sPortTypesParam[OMX_PortDomainVideo].nPorts; i++) {
00083       omx_video_scheduler_component_Private->ports[i] = calloc(1, sizeof(omx_base_video_PortType));
00084       if (!omx_video_scheduler_component_Private->ports[i]) {
00085         return OMX_ErrorInsufficientResources;
00086       }
00087     }
00088     base_video_port_Constructor(openmaxStandComp, &omx_video_scheduler_component_Private->ports[OMX_BASE_FILTER_INPUTPORT_INDEX], 0, OMX_TRUE);
00089     base_video_port_Constructor(openmaxStandComp, &omx_video_scheduler_component_Private->ports[OMX_BASE_FILTER_OUTPUTPORT_INDEX], 1, OMX_FALSE);
00090 
00091     omx_video_scheduler_component_Private->ports[CLOCKPORT_INDEX] = calloc(1, sizeof(omx_base_clock_PortType));
00092     if (!omx_video_scheduler_component_Private->ports[CLOCKPORT_INDEX]) {
00093       return OMX_ErrorInsufficientResources;
00094     }
00095     base_clock_port_Constructor(openmaxStandComp, &omx_video_scheduler_component_Private->ports[CLOCKPORT_INDEX], 2, OMX_TRUE);
00096     omx_video_scheduler_component_Private->ports[CLOCKPORT_INDEX]->sPortParam.bEnabled = OMX_TRUE;
00097   }
00098 
00099   inPort = (omx_base_video_PortType *) omx_video_scheduler_component_Private->ports[OMX_BASE_FILTER_INPUTPORT_INDEX];
00100   outPort= (omx_base_video_PortType *) omx_video_scheduler_component_Private->ports[OMX_BASE_FILTER_OUTPUTPORT_INDEX];
00101 
00104   //input port parameter settings
00105   inPort->sVideoParam.eColorFormat             = OMX_COLOR_Format24bitRGB888;
00106   inPort->sPortParam.format.video.nFrameWidth  = DEFAULT_WIDTH;
00107   inPort->sPortParam.format.video.nFrameHeight = DEFAULT_HEIGHT;
00108   inPort->sPortParam.nBufferSize               = DEFAULT_VIDEO_INPUT_BUF_SIZE * 2 ;
00109   inPort->sPortParam.format.video.eColorFormat = OMX_COLOR_Format24bitRGB888;
00110 
00111   outPort->sVideoParam.eColorFormat             = OMX_COLOR_Format24bitRGB888;
00112   outPort->sPortParam.format.video.nFrameWidth  = DEFAULT_WIDTH;
00113   outPort->sPortParam.format.video.nFrameHeight = DEFAULT_HEIGHT;
00114   outPort->sPortParam.nBufferSize               = DEFAULT_VIDEO_INPUT_BUF_SIZE * 2;
00115   outPort->sPortParam.format.video.eColorFormat = OMX_COLOR_Format24bitRGB888;
00116 
00117   omx_video_scheduler_component_Private->destructor         = omx_video_scheduler_component_Destructor;
00118   omx_video_scheduler_component_Private->BufferMgmtCallback = omx_video_scheduler_component_BufferMgmtCallback;
00119 
00120   inPort->FlushProcessingBuffers  = omx_video_scheduler_component_port_FlushProcessingBuffers;
00121   openmaxStandComp->SetParameter  = omx_video_scheduler_component_SetParameter;
00122   openmaxStandComp->GetParameter  = omx_video_scheduler_component_GetParameter;
00123 
00124   /* resource management special section */
00125   omx_video_scheduler_component_Private->nqualitylevels = VIDEOSCHED_QUALITY_LEVELS;
00126   omx_video_scheduler_component_Private->currentQualityLevel = 1;
00127   omx_video_scheduler_component_Private->multiResourceLevel = malloc(sizeof(multiResourceDescriptor *) * VIDEOSCHED_QUALITY_LEVELS);
00128   for (i = 0; i<VIDEOSCHED_QUALITY_LEVELS; i++) {
00129       omx_video_scheduler_component_Private->multiResourceLevel[i] = malloc(sizeof(multiResourceDescriptor));
00130       omx_video_scheduler_component_Private->multiResourceLevel[i]->CPUResourceRequested = videoSchedQualityLevels[i * 2];
00131       omx_video_scheduler_component_Private->multiResourceLevel[i]->MemoryResourceRequested = videoSchedQualityLevels[i * 2 + 1];
00132   }
00133 
00134   return err;
00135 }
00136 
00139 OMX_ERRORTYPE omx_video_scheduler_component_Destructor(OMX_COMPONENTTYPE *openmaxStandComp) {
00140   omx_video_scheduler_component_PrivateType*   omx_video_scheduler_component_Private = openmaxStandComp->pComponentPrivate;
00141   OMX_U32                                      i;
00142 
00143   DEBUG(DEB_LEV_FUNCTION_NAME, "In %s\n", __func__);
00144 
00145   /* frees port/s */
00146   if (omx_video_scheduler_component_Private->ports) {
00147   for(i=0; i < (omx_video_scheduler_component_Private->sPortTypesParam[OMX_PortDomainVideo].nPorts +
00148                    omx_video_scheduler_component_Private->sPortTypesParam[OMX_PortDomainOther].nPorts); i++) {
00149     if(omx_video_scheduler_component_Private->ports[i])
00150        omx_video_scheduler_component_Private->ports[i]->PortDestructor(omx_video_scheduler_component_Private->ports[i]);
00151     }
00152     free(omx_video_scheduler_component_Private->ports);
00153     omx_video_scheduler_component_Private->ports=NULL;
00154   }
00155 
00156   omx_base_filter_Destructor(openmaxStandComp);
00157   DEBUG(DEB_LEV_FUNCTION_NAME, "Out of %s\n", __func__);
00158 
00159   return OMX_ErrorNone;
00160 }
00161 
00162 
00168 OMX_ERRORTYPE omx_video_scheduler_component_port_SendBufferFunction(omx_base_PortType *openmaxStandPort, OMX_BUFFERHEADERTYPE* pBuffer) {
00169 
00170   OMX_ERRORTYPE                   err;
00171   int                             errQue;
00172   OMX_U32                         portIndex;
00173   OMX_COMPONENTTYPE*              omxComponent = openmaxStandPort->standCompContainer;
00174   omx_base_component_PrivateType* omx_base_component_Private = (omx_base_component_PrivateType*)omxComponent->pComponentPrivate;
00175   OMX_BOOL                        SendFrame;
00176   omx_base_clock_PortType*        pClockPort;
00177 #if NO_GST_OMX_PATCH
00178   unsigned int i;
00179 #endif
00180 
00181   portIndex = (openmaxStandPort->sPortParam.eDir == OMX_DirInput)?pBuffer->nInputPortIndex:pBuffer->nOutputPortIndex;
00182   DEBUG(DEB_LEV_FUNCTION_NAME, "In %s portIndex %lu\n", __func__, portIndex);
00183 
00184   if (portIndex != openmaxStandPort->sPortParam.nPortIndex) {
00185     DEBUG(DEB_LEV_ERR, "In %s: wrong port for this operation portIndex=%d port->portIndex=%d\n",
00186            __func__, (int)portIndex, (int)openmaxStandPort->sPortParam.nPortIndex);
00187     return OMX_ErrorBadPortIndex;
00188   }
00189 
00190   if(omx_base_component_Private->state == OMX_StateInvalid) {
00191     DEBUG(DEB_LEV_ERR, "In %s: we are in OMX_StateInvalid\n", __func__);
00192     return OMX_ErrorInvalidState;
00193   }
00194 
00195   if(omx_base_component_Private->state != OMX_StateExecuting &&
00196     omx_base_component_Private->state != OMX_StatePause &&
00197     omx_base_component_Private->state != OMX_StateIdle) {
00198     DEBUG(DEB_LEV_ERR, "In %s: we are not in executing/paused/idle state, but in %d\n", __func__, omx_base_component_Private->state);
00199     return OMX_ErrorIncorrectStateOperation;
00200   }
00201   if (!PORT_IS_ENABLED(openmaxStandPort) || (PORT_IS_BEING_DISABLED(openmaxStandPort) && !PORT_IS_TUNNELED_N_BUFFER_SUPPLIER(openmaxStandPort)) ||
00202       (omx_base_component_Private->transientState == OMX_TransStateExecutingToIdle &&
00203       (PORT_IS_TUNNELED(openmaxStandPort) && !PORT_IS_BUFFER_SUPPLIER(openmaxStandPort)))) {
00204     DEBUG(DEB_LEV_ERR, "In %s: Port %d is disabled comp = %s \n", __func__, (int)portIndex,omx_base_component_Private->name);
00205     return OMX_ErrorIncorrectStateOperation;
00206   }
00207 
00208   /* Temporarily disable this check for gst-openmax */
00209 #if NO_GST_OMX_PATCH
00210   {
00211   OMX_BOOL foundBuffer = OMX_FALSE;
00212   if(pBuffer!=NULL && pBuffer->pBuffer!=NULL) {
00213     for(i=0; i < openmaxStandPort->sPortParam.nBufferCountActual; i++){
00214     if (pBuffer->pBuffer == openmaxStandPort->pInternalBufferStorage[i]->pBuffer) {
00215       foundBuffer = OMX_TRUE;
00216       break;
00217     }
00218     }
00219   }
00220   if (!foundBuffer) {
00221     return OMX_ErrorBadParameter;
00222   }
00223   }
00224 #endif
00225 
00226   if ((err = checkHeader(pBuffer, sizeof(OMX_BUFFERHEADERTYPE))) != OMX_ErrorNone) {
00227     DEBUG(DEB_LEV_ERR, "In %s: received wrong buffer header on input port\n", __func__);
00228     return err;
00229   }
00230 
00231   pClockPort  = (omx_base_clock_PortType*)omx_base_component_Private->ports[CLOCKPORT_INDEX];
00232   if(PORT_IS_TUNNELED(pClockPort) && !PORT_IS_BEING_FLUSHED(openmaxStandPort) &&
00233       (omx_base_component_Private->transientState != OMX_TransStateExecutingToIdle) &&
00234       ((pBuffer->nFlags & OMX_BUFFERFLAG_EOS) != OMX_BUFFERFLAG_EOS)){
00235     SendFrame = omx_video_scheduler_component_ClockPortHandleFunction((omx_video_scheduler_component_PrivateType*)omx_base_component_Private, pBuffer);
00236     if(!SendFrame) pBuffer->nFilledLen=0;
00237   }
00238 
00239   /* And notify the buffer management thread we have a fresh new buffer to manage */
00240   if(!PORT_IS_BEING_FLUSHED(openmaxStandPort) && !(PORT_IS_BEING_DISABLED(openmaxStandPort) && PORT_IS_TUNNELED_N_BUFFER_SUPPLIER(openmaxStandPort))
00241       && omx_base_component_Private->transientState != OMX_TransStateExecutingToIdle){
00242       errQue = queue(openmaxStandPort->pBufferQueue, pBuffer);
00243       if (errQue) {
00244           /* /TODO the queue is full. This can be handled in a fine way with
00245            * some retrials, or other checking. For the moment this is a critical error
00246            * and simply causes the failure of this call
00247            */
00248           return OMX_ErrorInsufficientResources;
00249       }
00250       tsem_up(openmaxStandPort->pBufferSem);
00251       DEBUG(DEB_LEV_FULL_SEQ, "In %s Signalling bMgmtSem Port Index=%d\n",__func__, (int)portIndex);
00252       tsem_up(omx_base_component_Private->bMgmtSem);
00253   }else if(PORT_IS_BUFFER_SUPPLIER(openmaxStandPort)){
00254       DEBUG(DEB_LEV_FULL_SEQ, "In %s: Comp %s received io:%d buffer\n", __func__,omx_base_component_Private->name,(int)openmaxStandPort->sPortParam.nPortIndex);
00255       errQue = queue(openmaxStandPort->pBufferQueue, pBuffer);
00256       if (errQue) {
00257           /* /TODO the queue is full. This can be handled in a fine way with
00258            * some retrials, or other checking. For the moment this is a critical error
00259            * and simply causes the failure of this call
00260            */
00261           return OMX_ErrorInsufficientResources;
00262       }
00263       tsem_up(openmaxStandPort->pBufferSem);
00264   } else { // If port being flushed and not tunneled then return error
00265     DEBUG(DEB_LEV_FULL_SEQ, "In %s \n", __func__);
00266     return OMX_ErrorIncorrectStateOperation;
00267   }
00268   return OMX_ErrorNone;
00269 }
00270 
00271 
00272 OMX_BOOL omx_video_scheduler_component_ClockPortHandleFunction(
00273   omx_video_scheduler_component_PrivateType* omx_video_scheduler_component_Private,
00274   OMX_BUFFERHEADERTYPE* pInputBuffer){
00275   omx_base_clock_PortType               *pClockPort;
00276   OMX_HANDLETYPE                        hclkComponent;
00277   OMX_BUFFERHEADERTYPE*                 clockBuffer;
00278   OMX_TIME_MEDIATIMETYPE*               pMediaTime;
00279   OMX_TIME_CONFIG_TIMESTAMPTYPE         sClientTimeStamp;
00280   OMX_ERRORTYPE                         err;
00281   OMX_BOOL                              SendFrame;
00282   omx_base_video_PortType               *pInputPort;
00283 
00284   pClockPort    = (omx_base_clock_PortType*) omx_video_scheduler_component_Private->ports[CLOCKPORT_INDEX];
00285   pInputPort    = (omx_base_video_PortType *) omx_video_scheduler_component_Private->ports[0];
00286   hclkComponent = pClockPort->hTunneledComponent;
00287 
00288   SendFrame = OMX_TRUE;
00289 
00290   DEBUG(DEB_LEV_FULL_SEQ, "In %s Clock Port is Tunneled. Sending Request\n", __func__);
00291   /* if first time stamp is received then notify the clock component */
00292   if((pInputBuffer->nFlags & OMX_BUFFERFLAG_STARTTIME) == OMX_BUFFERFLAG_STARTTIME) {
00293     DEBUG(DEB_LEV_FULL_SEQ," In %s  first time stamp = %llx \n", __func__,pInputBuffer->nTimeStamp);
00294     pInputBuffer->nFlags = 0;
00295     hclkComponent = pClockPort->hTunneledComponent;
00296     setHeader(&sClientTimeStamp, sizeof(OMX_TIME_CONFIG_TIMESTAMPTYPE));
00297     sClientTimeStamp.nPortIndex = pClockPort->nTunneledPort;
00298     sClientTimeStamp.nTimestamp = pInputBuffer->nTimeStamp;
00299     err = OMX_SetConfig(hclkComponent, OMX_IndexConfigTimeClientStartTime, &sClientTimeStamp);
00300     if(err!=OMX_ErrorNone) {
00301      DEBUG(DEB_LEV_ERR,"Error %08x In OMX_SetConfig in func=%s \n",err,__func__);
00302     }
00303     tsem_down(pClockPort->pBufferSem); /* wait for state change notification */
00304 
00305     /* update the clock state and clock scale info into the fbdev private data */
00306     if(pClockPort->pBufferQueue->nelem > 0) {
00307       clockBuffer=dequeue(pClockPort->pBufferQueue);
00308       pMediaTime  = (OMX_TIME_MEDIATIMETYPE*)clockBuffer->pBuffer;
OMX_IndexConfigTimeClientStartTime, &sClientTimeStamp);
00300     if(err!=OMX_ErrorNone) {
00301      DEBUG(DEB_LEV_ERR,"Error %08x In OMX_SetConfig in func=%s \n",err,__func__);
00302     }
00303     tsem_down(pClockPort->pBufferSem); /* wait for state change notification */
00304 
00305     /* update the clock state and clock scale info into the fbdev private data */
00306     if(pClockPort->pBufferQueue->nelem > 0) {
00307       clockBuffer=dequeue(pClockPort->pBufferQueue);
00308       pMediaTime  = (OMX_TIME_MEDIATIMETYPE*)clockBuffer->pBuffer;
OMX_IndexConfigTimeClientStartTime, &sClientTimeStamp);
00300     if(err!=OMX_ErrorNone) {
00301      DEBUG(DEB_LEV_ERR,"Error %08x In OMX_SetConfig in func=%s \n",err,__func__);
00302     }
00303     tsem_down(pClockPort->pBufferSem); /* wait for state change notification */
00304 
00305     /* update the clock state and clock scale info into the fbdev private data */
00306     if(pClockPort->pBufferQueue->nelem > 0) {
00307       clockBuffer=dequeue(pClockPort->pBufferQueue);
00308       pMediaTime  = (OMX_TIME_MEDIATIMETYPE*)clockBuffer->pBuffer;
OMX_IndexConfigTimeClientStartTime, &sClientTimeStamp);
00300     if(err!=OMX_ErrorNone) {
00301      DEBUG(DEB_LEV_ERR,"Error %08x In OMX_SetConfig in func=%s \n",err,__func__);
00302     }
00303     tsem_down(pClockPort->pBufferSem); /* wait for state change notification */
00304 
00305     /* update the clock state and clock scale info into the fbdev private data */
00306     if(pClockPort->pBufferQueue->nelem > 0) {
00307       clockBuffer=dequeue(pClockPort->pBufferQueue);
00308       pMediaTime  = (OMX_TIME_MEDIATIMETYPE*)clockBuffer->pBuffer;
OMX_IndexConfigTimeClientStartTime, &sClientTimeStamp);
00300     if(err!=OMX_ErrorNone) {
00301      DEBUG(DEB_LEV_ERR,"Error %08x In OMX_SetConfig in func=%s \n",err,__func__);
00302     }
00303     tsem_down(pClockPort->pBufferSem); /* wait for state change notification */
00304 
00305     /* update the clock state and clock scale info into the fbdev private data */
00306     if(pClockPort->pBufferQueue->nelem > 0) {
00307       clockBuffer=dequeue(pClockPort->pBufferQueue);
00308       pMediaTime  = (OMX_TIME_MEDIATIMETYPE*)clockBuffer->pBuffer;
OMX_IndexConfigTimeClientStartTime, &sClientTimeStamp);
00300     if(err!=OMX_ErrorNone) {
00301      DEBUG(DEB_LEV_ERR,"Error %08x In OMX_SetConfig in func=%s \n",err,__func__);
00302     }
00303     tsem_down(pClockPort->pBufferSem); /* wait for state change notification */
00304 
00305     /* update the clock state and clock scale info into the fbdev private data */
00306     if(pClockPort->pBufferQueue->nelem > 0) {
00307       clockBuffer=dequeue(pClockPort->pBufferQueue);
00308       pMediaTime  = (OMX_TIME_MEDIATIMETYPE*)clockBuffer->pBuffer;
OMX_IndexConfigTimeClientStartTime, &sClientTimeStamp);
00300     if(err!=OMX_ErrorNone) {
00301      DEBUG(DEB_LEV_ERR,"Error %08x In OMX_SetConfig in func=%s \n",err,__func__);
00302     }
00303     tsem_down(pClockPort->pBufferSem); /* wait for state change notification */
00304 
00305     /* update the clock state and clock scale info into the fbdev private data */
00306     if(pClockPort->pBufferQueue->nelem > 0) {
00307       clockBuffer=dequeue(pClockPort->pBufferQueue);
00308       pMediaTime  = (OMX_TIME_MEDIATIMETYPE*)clockBuffer->pBuffer;
OMX_IndexConfigTimeClientStartTime, &sClientTimeStamp);
00300     if(err!=OMX_ErrorNone) {
00301      DEBUG(DEB_LEV_ERR,"Error %08x In OMX_SetConfig in func=%s \n",err,__func__);
00302     }
00303     tsem_down(pClockPort->pBufferSem); /* wait for state change notification */
00304 
00305     /* update the clock state and clock scale info into the fbdev private data */
00306     if(pClockPort->pBufferQueue->nelem > 0) {
00307       clockBuffer=dequeue(pClockPort->pBufferQueue);
00308       pMediaTime  = (OMX_TIME_MEDIATIMETYPE*)clockBuffer->pBuffer;
OMX_IndexConfigTimeClientStartTime, &sClientTimeStamp);
00300     if(err!=OMX_ErrorNone) {
00301      DEBUG(DEB_LEV_ERR,"Error %08x In OMX_SetConfig in func=%s \n",err,__func__);
00302     }
00303     tsem_down(pClockPort->pBufferSem); /* wait for state change notification */
00304 
00305     /* update the clock state and clock scale info into the fbdev private data */
00306     if(pClockPort->pBufferQueue->nelem > 0) {
00307       clockBuffer=dequeue(pClockPort->pBufferQueue);
00308       pMediaTime  = (OMX_TIME_MEDIATIMETYPE*)clockBuffer->pBuffer;
OMX_IndexConfigTimeClientStartTime, &sClientTimeStamp);
00300     if(err!=OMX_ErrorNone) {
00301      DEBUG(DEB_LEV_ERR,"Error %08x In OMX_SetConfig in func=%s \n",err,__func__);
00302     }
00303     tsem_down(pClockPort->pBufferSem); /* wait for state change notification */
00304 
00305     /* update the clock state and clock scale info into the fbdev private data */
00306     if(pClockPort->pBufferQueue->nelem > 0) {
00307       clockBuffer=dequeue(pClockPort->pBufferQueue);
00308       pMediaTime  = (OMX_TIME_MEDIATIMETYPE*)clockBuffer->pBuffer;
OMX_IndexConfigTimeClientStartTime, &sClientTimeStamp);
00300     if(err!=OMX_ErrorNone) {
00301      DEBUG(DEB_LEV_ERR,"Error %08x In OMX_SetConfig in func=%s \n",err,__func__);
00302     }
00303     tsem_down(pClockPort->pBufferSem); /* wait for state change notification */
00304 
00305     /* update the clock state and clock scale info into the fbdev private data */
00306     if(pClockPort->pBufferQueue->nelem > 0) {
00307       clockBuffer=dequeue(pClockPort->pBufferQueue);
00308       pMediaTime  = (OMX_TIME_MEDIATIMETYPE*)clockBuffer->pBuffer;
OMX_IndexConfigTimeClientStartTime, &sClientTimeStamp);
00300     if(err!=OMX_ErrorNone) {
00301      DEBUG(DEB_LEV_ERR,"Error %08x In OMX_SetConfig in func=%s \n",err,__func__);
00302     }
00303     tsem_down(pClockPort->pBufferSem); /* wait for state change notification */
00304 
00305     /* update the clock state and clock scale info into the fbdev private data */
00306     if(pClockPort->pBufferQueue->nelem > 0) {
00307       clockBuffer=dequeue(pClockPort->pBufferQueue);
00308       pMediaTime  = (OMX_TIME_MEDIATIMETYPE*)clockBuffer->pBuffer;
OMX_IndexConfigTimeClientStartTime, &sClientTimeStamp);
00300     if(err!=OMX_ErrorNone) {
00301      DEBUG(DEB_LEV_ERR,"Error %08x In OMX_SetConfig in func=%s \n",err,__func__);
00302     }
00303     tsem_down(pClockPort->pBufferSem); /* wait for state change notification */
00304 
00305     /* update the clock state and clock scale info into the fbdev private data */
00306     if(pClockPort->pBufferQueue->nelem > 0) {
00307       clockBuffer=dequeue(pClockPort->pBufferQueue);
00308       pMediaTime  = (OMX_TIME_MEDIATIMETYPE*)clockBuffer->pBuffer;
OMX_IndexConfigTimeClientStartTime, &sClientTimeStamp);
00300     if(err!=OMX_ErrorNone) {
00301      DEBUG(DEB_LEV_ERR,"Error %08x In OMX_SetConfig in func=%s \n",err,__func__);
00302     }
00303     tsem_down(pClockPort->pBufferSem); /* wait for state change notification */
00304 
00305     /* update the clock state and clock scale info into the fbdev private data */
00306     if(pClockPort->pBufferQueue->nelem > 0) {
00307       clockBuffer=dequeue(pClockPort->pBufferQueue);
00308       pMediaTime  = (OMX_TIME_MEDIATIMETYPE*)clockBuffer->pBuffer;
OMX_IndexConfigTimeClientStartTime, &sClientTimeStamp);
00300     if(err!=OMX_ErrorNone) {
00301      DEBUG(DEB_LEV_ERR,"Error %08x In OMX_SetConfig in func=%s \n",err,__func__);
00302     }
00303     tsem_down(pClockPort->pBufferSem); /* wait for state change notification */
00304 
00305     /* update the clock state and clock scale info into the fbdev private data */
00306     if(pClockPort->pBufferQueue->nelem > 0) {
00307       clockBuffer=dequeue(pClockPort->pBufferQueue);
00308       pMediaTime  = (OMX_TIME_MEDIATIMETYPE*)clockBuffer->pBuffer;
OMX_IndexConfigTimeClientStartTime, &sClientTimeStamp);
00300     if(err!=OMX_ErrorNone) {
00301      DEBUG(DEB_LEV_ERR,"Error %08x In OMX_SetConfig in func=%s \n",err,__func__);
00302     }
00303     tsem_down(pClockPort->pBufferSem); /* wait for state change notification */
00304 
00305     /* update the clock state and clock scale info into the fbdev private data */
00306     if(pClockPort->pBufferQueue->nelem > 0) {
00307       clockBuffer=dequeue(pClockPort->pBufferQueue);
00308       pMediaTime  = (OMX_TIME_MEDIATIMETYPE*)clockBuffer->pBuffer;
OMX_IndexConfigTimeClientStartTime, &sClientTimeStamp);
00300     if(err!=OMX_ErrorNone) {
00301      DEBUG(DEB_LEV_ERR,"Error %08x In OMX_SetConfig in func=%s \n",err,__func__);
00302     }
00303     tsem_down(pClockPort->pBufferSem); /* wait for state change notification */
00304 
00305     /* update the clock state and clock scale info into the fbdev private data */
00306     if(pClockPort->pBufferQueue->nelem > 0) {
00307       clockBuffer=dequeue(pClockPort->pBufferQueue);
00308       pMediaTime  = (OMX_TIME_MEDIATIMETYPE*)clockBuffer->pBuffer;
OMX_IndexConfigTimeClientStartTime, &sClientTimeStamp);
00300     if(err!=OMX_ErrorNone) {
00301      DEBUG(DEB_LEV_ERR,"Error %08x In OMX_SetConfig in func=%s \n",err,__func__);
00302     }
00303     tsem_down(pClockPort->pBufferSem); /* wait for state change notification */
00304 
00305     /* update the clock state and clock scale info into the fbdev private data */
00306     if(pClockPort->pBufferQueue->nelem > 0) {
00307       clockBuffer=dequeue(pClockPort->pBufferQueue);
00308       pMediaTime  = (OMX_TIME_MEDIATIMETYPE*)clockBuffer->pBuffer;
OMX_IndexConfigTimeClientStartTime, &sClientTimeStamp);
00300     if(err!=OMX_ErrorNone) {
00301      DEBUG(DEB_LEV_ERR,"Error %08x In OMX_SetConfig in func=%s \n",err,__func__);
00302     }
00303     tsem_down(pClockPort->pBufferSem); /* wait for state change notification */
00304 
00305     /* update the clock state and clock scale info into the fbdev private data */
00306     if(pClockPort->pBufferQueue->nelem > 0) {
00307       clockBuffer=dequeue(pClockPort->pBufferQueue);
00308       pMediaTime  = (OMX_TIME_MEDIATIMETYPE*)clockBuffer->pBuffer;
OMX_IndexConfigTimeClientStartTime, &sClientTimeStamp);
00300     if(err!=OMX_ErrorNone) {
00301      DEBUG(DEB_LEV_ERR,"Error %08x In OMX_SetConfig in func=%s \n",err,__func__);
00302     }
00303     tsem_down(pClockPort->pBufferSem); /* wait for state change notification */
00304 
00305     /* update the clock state and clock scale info into the fbdev private data */
00306     if(pClockPort->pBufferQueue->nelem > 0) {
00307       clockBuffer=dequeue(pClockPort->pBufferQueue);
00308       pMediaTime  = (OMX_TIME_MEDIATIMETYPE*)clockBuffer->pBuffer;
OMX_IndexConfigTimeClientStartTime, &sClientTimeStamp);
00300     if(err!=OMX_ErrorNone) {
00301      DEBUG(DEB_LEV_ERR,"Error %08x In OMX_SetConfig in func=%s \n",err,__func__);
00302     }
00303     tsem_down(pClockPort->pBufferSem); /* wait for state change notification */
00304 
00305     /* update the clock state and clock scale info into the fbdev private data */
00306     if(pClockPort->pBufferQueue->nelem > 0) {
00307       clockBuffer=dequeue(pClockPort->pBufferQueue);
00308       pMediaTime  = (OMX_TIME_MEDIATIMETYPE*)clockBuffer->pBuffer;
OMX_IndexConfigTimeClientStartTime, &sClientTimeStamp);
00300     if(err!=OMX_ErrorNone) {
00301      DEBUG(DEB_LEV_ERR,"Error %08x In OMX_SetConfig in func=%s \n",err,__func__);
00302     }
00303     tsem_down(pClockPort->pBufferSem); /* wait for state change notification */
00304 
00305     /* update the clock state and clock scale info into the fbdev private data */
00306     if(pClockPort->pBufferQueue->nelem > 0) {
00307       clockBuffer=dequeue(pClockPort->pBufferQueue);
00308       pMediaTime  = (OMX_TIME_MEDIATIMETYPE*)clockBuffer->pBuffer;
OMX_IndexConfigTimeClientStartTime, &sClientTimeStamp);
00300     if(err!=OMX_ErrorNone) {
00301      DEBUG(DEB_LEV_ERR,"Error %08x In OMX_SetConfig in func=%s \n",err,__func__);
00302     }
00303     tsem_down(pClockPort->pBufferSem); /* wait for state change notification */
00304 
00305     /* update the clock state and clock scale info into the fbdev private data */
00306     if(pClockPort->pBufferQueue->nelem > 0) {
00307       clockBuffer=dequeue(pClockPort->pBufferQueue);
00308       pMediaTime  = (OMX_TIME_MEDIATIMETYPE*)clockBuffer->pBuffer;
OMX_IndexConfigTimeClientStartTime, &sClientTimeStamp);
00300     if(err!=OMX_ErrorNone) {
00301      DEBUG(DEB_LEV_ERR,"Error %08x In OMX_SetConfig in func=%s \n",err,__func__);
00302     }
00303     tsem_down(pClockPort->pBufferSem); /* wait for state change notification */
00304 
00305     /* update the clock state and clock scale info into the fbdev private data */
00306     if(pClockPort->pBufferQueue->nelem > 0) {
00307       clockBuffer=dequeue(pClockPort->pBufferQueue);
00308       pMediaTime  = (OMX_TIME_MEDIATIMETYPE*)clockBuffer->pBuffer;
OMX_IndexConfigTimeClientStartTime, &sClientTimeStamp);
00300     if(err!=OMX_ErrorNone) {
00301      DEBUG(DEB_LEV_ERR,"Error %08x In OMX_SetConfig in func=%s \n",err,__func__);
00302     }
00303     tsem_down(pClockPort->pBufferSem); /* wait for state change notification */
00304 
00305     /* update the clock state and clock scale info into the fbdev private data */
00306     if(pClockPort->pBufferQueue->nelem > 0) {
00307       clockBuffer=dequeue(pClockPort->pBufferQueue);
00308       pMediaTime  = (OMX_TIME_MEDIATIMETYPE*)clockBuffer->pBuffer;
OMX_IndexConfigTimeClientStartTime, &sClientTimeStamp);
00300     if(err!=OMX_ErrorNone) {
00301      DEBUG(DEB_LEV_ERR,"Error %08x In OMX_SetConfig in func=%s \n",err,__func__);
00302     }
00303     tsem_down(pClockPort->pBufferSem); /* wait for state change notification */
00304 
00305     /* update the clock state and clock scale info into the fbdev private data */
00306     if(pClockPort->pBufferQueue->nelem > 0) {
00307       clockBuffer=dequeue(pClockPort->pBufferQueue);
00308       pMediaTime  = (OMX_TIME_MEDIATIMETYPE*)clockBuffer->pBuffer;
OMX_IndexConfigTimeClientStartTime, &sClientTimeStamp);
00300     if(err!=OMX_ErrorNone) {
00301      DEBUG(DEB_LEV_ERR,"Error %08x In OMX_SetConfig in func=%s \n",err,__func__);
00302     }
00303     tsem_down(pClockPort->pBufferSem); /* wait for state change notification */
00304 
00305     /* update the clock state and clock scale info into the fbdev private data */
00306     if(pClockPort->pBufferQueue->nelem > 0) {
00307       clockBuffer=dequeue(pClockPort->pBufferQueue);
00308       pMediaTime  = (OMX_TIME_MEDIATIMETYPE*)clockBuffer->pBuffer;
OMX_IndexConfigTimeClientStartTime, &sClientTimeStamp);
00300     if(err!=OMX_ErrorNone) {
00301      DEBUG(DEB_LEV_ERR,"Error %08x In OMX_SetConfig in func=%s \n",err,__func__);
00302     }
00303     tsem_down(pClockPort->pBufferSem); /* wait for state change notification */
00304 
00305     /* update the clock state and clock scale info into the fbdev private data */
00306     if(pClockPort->pBufferQueue->nelem > 0) {
00307       clockBuffer=dequeue(pClockPort->pBufferQueue);
00308       pMediaTime  = (OMX_TIME_MEDIATIMETYPE*)clockBuffer->pBuffer;
OMX_IndexConfigTimeClientStartTime, &sClientTimeStamp);
00300     if(err!=OMX_ErrorNone) {
00301      DEBUG(DEB_LEV_ERR,"Error %08x In OMX_SetConfig in func=%s \n",err,__func__);
00302     }
00303     tsem_down(pClockPort->pBufferSem); /* wait for state change notification */
00304 
00305     /* update the clock state and clock scale info into the fbdev private data */
00306     if(pClockPort->pBufferQueue->nelem > 0) {
00307       clockBuffer=dequeue(pClockPort->pBufferQueue);
00308       pMediaTime  = (OMX_TIME_MEDIATIMETYPE*)clockBuffer->pBuffer;
OMX_IndexConfigTimeClientStartTime, &sClientTimeStamp);
00300     if(err!=OMX_ErrorNone) {
00301      DEBUG(DEB_LEV_ERR,"Error %08x In OMX_SetConfig in func=%s \n",err,__func__);
00302     }
00303     tsem_down(pClockPort->pBufferSem); /* wait for state change notification */
00304 
00305     /* update the clock state and clock scale info into the fbdev private data */
00306     if(pClockPort->pBufferQueue->nelem > 0) {
00307       clockBuffer=dequeue(pClockPort->pBufferQueue);
00308       pMediaTime  = (OMX_TIME_MEDIATIMETYPE*)clockBuffer->pBuffer;
OMX_IndexConfigTimeClientStartTime, &sClientTimeStamp);
00300     if(err!=OMX_ErrorNone) {
00301      DEBUG(DEB_LEV_ERR,"Error %08x In OMX_SetConfig in func=%s \n",err,__func__);
00302     }
00303     tsem_down(pClockPort->pBufferSem); /* wait for state change notification */
00304 
00305     /* update the clock state and clock scale info into the fbdev private data */
00306     if(pClockPort->pBufferQueue->nelem > 0) {
00307       clockBuffer=dequeue(pClockPort->pBufferQueue);
00308       pMediaTime  = (OMX_TIME_MEDIATIMETYPE*)clockBuffer->pBuffer;
OMX_IndexConfigTimeClientStartTime, &sClientTimeStamp);
00300     if(err!=OMX_ErrorNone) {
00301      DEBUG(DEB_LEV_ERR,"Error %08x In OMX_SetConfig in func=%s \n",err,__func__);
00302     }
00303     tsem_down(pClockPort->pBufferSem); /* wait for state change notification */
00304 
00305     /* update the clock state and clock scale info into the fbdev private data */
00306     if(pClockPort->pBufferQueue->nelem > 0) {
00307       clockBuffer=dequeue(pClockPort->pBufferQueue);
00308       pMediaTime  = (OMX_TIME_MEDIATIMETYPE*)clockBuffer->pBuffer;
OMX_IndexConfigTimeClientStartTime, &sClientTimeStamp);
00300     if(err!=OMX_ErrorNone) {
00301      DEBUG(DEB_LEV_ERR,"Error %08x In OMX_SetConfig in func=%s \n",err,__func__);
00302     }
00303     tsem_down(pClockPort->pBufferSem); /* wait for state change notification */
00304 
00305     /* update the clock state and clock scale info into the fbdev private data */
00306     if(pClockPort->pBufferQueue->nelem > 0) {
00307       clockBuffer=dequeue(pClockPort->pBufferQueue);
00308       pMediaTime  = (OMX_TIME_MEDIATIMETYPE*)clockBuffer->pBuffer;
OMX_IndexConfigTimeClientStartTime, &sClientTimeStamp);
00300     if(err!=OMX_ErrorNone) {
00301      DEBUG(DEB_LEV_ERR,"Error %08x In OMX_SetConfig in func=%s \n",err,__func__);
00302     }
00303     tsem_down(pClockPort->pBufferSem); /* wait for state change notification */
00304 
00305     /* update the clock state and clock scale info into the fbdev private data */
00306     if(pClockPort->pBufferQueue->nelem > 0) {
00307       clockBuffer=dequeue(pClockPort->pBufferQueue);
00308       pMediaTime  = (OMX_TIME_MEDIATIMETYPE*)clockBuffer->pBuffer;
OMX_IndexConfigTimeClientStartTime, &sClientTimeStamp);
00300     if(err!=OMX_ErrorNone) {
00301      DEBUG(DEB_LEV_ERR,"Error %08x In OMX_SetConfig in func=%s \n",err,__func__);
00302     }
00303     tsem_down(pClockPort->pBufferSem); /* wait for state change notification */
00304 
00305     /* update the clock state and clock scale info into the fbdev private data */
00306     if(pClockPort->pBufferQueue->nelem > 0) {
00307       clockBuffer=dequeue(pClockPort->pBufferQueue);
00308       pMediaTime  = (OMX_TIME_MEDIATIMETYPE*)clockBuffer->pBuffer;
OMX_IndexConfigTimeClientStartTime, &sClientTimeStamp);
00300     if(err!=OMX_ErrorNone) {
00301      DEBUG(DEB_LEV_ERR,"Error %08x In OMX_SetConfig in func=%s \n",err,__func__);
00302     }
00303     tsem_down(pClockPort->pBufferSem); /* wait for state change notification */
00304 
00305     /* update the clock state and clock scale info into the fbdev private data */
00306     if(pClockPort->pBufferQueue->nelem > 0) {
00307       clockBuffer=dequeue(pClockPort->pBufferQueue);
00308       pMediaTime  = (OMX_TIME_MEDIATIMETYPE*)clockBuffer->pBuffer;
OMX_IndexConfigTimeClientStartTime, &sClientTimeStamp);
00300     if(err!=OMX_ErrorNone) {
00301      DEBUG(DEB_LEV_ERR,"Error %08x In OMX_SetConfig in func=%s \n",err,__func__);
00302     }
00303     tsem_down(pClockPort->pBufferSem); /* wait for state change notification */
00304 
00305     /* update the clock state and clock scale info into the fbdev private data */
00306     if(pClockPort->pBufferQueue->nelem > 0) {
00307       clockBuffer=dequeue(pClockPort->pBufferQueue);
00308       pMediaTime  = (OMX_TIME_MEDIATIMETYPE*)clockBuffer->pBuffer;
OMX_IndexConfigTimeClientStartTime, &sClientTimeStamp);
00300     if(err!=OMX_ErrorNone) {
00301      DEBUG(DEB_LEV_ERR,"Error %08x In OMX_SetConfig in func=%s \n",err,__func__);
00302     }
00303     tsem_down(pClockPort->pBufferSem); /* wait for state change notification */
00304 
00305     /* update the clock state and clock scale info into the fbdev private data */
00306     if(pClockPort->pBufferQueue->nelem > 0) {
00307       clockBuffer=dequeue(pClockPort->pBufferQueue);
00308       pMediaTime  = (OMX_TIME_MEDIATIMETYPE*)clockBuffer->pBuffer;
OMX_IndexConfigTimeClientStartTime, &sClientTimeStamp);
00300     if(err!=OMX_ErrorNone) {
00301      DEBUG(DEB_LEV_ERR,"Error %08x In OMX_SetConfig in func=%s \n",err,__func__);
00302     }
00303     tsem_down(pClockPort->pBufferSem); /* wait for state change notification */
00304 
00305     /* update the clock state and clock scale info into the fbdev private data */
00306     if(pClockPort->pBufferQueue->nelem > 0) {
00307       clockBuffer=dequeue(pClockPort->pBufferQueue);
00308       pMediaTime  = (OMX_TIME_MEDIATIMETYPE*)clockBuffer->pBuffer;
OMX_IndexConfigTimeClientStartTime, &sClientTimeStamp);
00300     if(err!=OMX_ErrorNone) {
00301      DEBUG(DEB_LEV_ERR,"Error %08x In OMX_SetConfig in func=%s \n",err,__func__);
00302     }
00303     tsem_down(pClockPort->pBufferSem); /* wait for state change notification */
00304 
00305     /* update the clock state and clock scale info into the fbdev private data */
00306     if(pClockPort->pBufferQueue->nelem > 0) {
00307       clockBuffer=dequeue(pClockPort->pBufferQueue);
00308       pMediaTime  = (OMX_TIME_MEDIATIMETYPE*)clockBuffer->pBuffer;
OMX_IndexConfigTimeClientStartTime, &sClientTimeStamp);
00300     if(err!=OMX_ErrorNone) {
00301      DEBUG(DEB_LEV_ERR,"Error %08x In OMX_SetConfig in func=%s \n",err,__func__);
00302     }
00303     tsem_down(pClockPort->pBufferSem); /* wait for state change notification */
00304 
00305     /* update the clock state and clock scale info into the fbdev private data */
00306     if(pClockPort->pBufferQueue->nelem > 0) {
00307       clockBuffer=dequeue(pClockPort->pBufferQueue);
00308       pMediaTime  = (OMX_TIME_MEDIATIMETYPE*)clockBuffer->pBuffer;
OMX_IndexConfigTimeClientStartTime, &sClientTimeStamp);
00300     if(err!=OMX_ErrorNone) {
00301      DEBUG(DEB_LEV_ERR,"Error %08x In OMX_SetConfig in func=%s \n",err,__func__);
00302     }
00303     tsem_down(pClockPort->pBufferSem); /* wait for state change notification */
00304 
00305     /* update the clock state and clock scale info into the fbdev private data */
00306     if(pClockPort->pBufferQueue->nelem > 0) {
00307       clockBuffer=dequeue(pClockPort->pBufferQueue);
00308       pMediaTime  = (OMX_TIME_MEDIATIMETYPE*)clockBuffer->pBuffer;
OMX_IndexConfigTimeClientStartTime, &sClientTimeStamp);
00300     if(err!=OMX_ErrorNone) {
00301      DEBUG(DEB_LEV_ERR,"Error %08x In OMX_SetConfig in func=%s \n",err,__func__);
00302     }
00303     tsem_down(pClockPort->pBufferSem); /* wait for state change notification */
00304 
00305     /* update the clock state and clock scale info into the fbdev private data */
00306     if(pClockPort->pBufferQueue->nelem > 0) {
00307       clockBuffer=dequeue(pClockPort->pBufferQueue);
00308       pMediaTime  = (OMX_TIME_MEDIATIMETYPE*)clockBuffer->pBuffer;
OMX_IndexConfigTimeClientStartTime, &sClientTimeStamp);
00300     if(err!=OMX_ErrorNone) {
00301      DEBUG(DEB_LEV_ERR,"Error %08x In OMX_SetConfig in func=%s \n",err,__func__);
00302     }
00303     tsem_down(pClockPort->pBufferSem); /* wait for state change notification */
00304 
00305     /* update the clock state and clock scale info into the fbdev private data */
00306     if(pClockPort->pBufferQueue->nelem > 0) {
00307       clockBuffer=dequeue(pClockPort->pBufferQueue);
00308       pMediaTime  = (OMX_TIME_MEDIATIMETYPE*)clockBuffer->pBuffer;
OMX_IndexConfigTimeClientStartTime, &sClientTimeStamp);
00300     if(err!=OMX_ErrorNone) {
00301      DEBUG(DEB_LEV_ERR,"Error %08x In OMX_SetConfig in func=%s \n",err,__func__);
00302     }
00303     tsem_down(pClockPort->pBufferSem); /* wait for state change notification */
00304 
00305     /* update the clock state and clock scale info into the fbdev private data */
00306     if(pClockPort->pBufferQueue->nelem > 0) {
00307       clockBuffer=dequeue(pClockPort->pBufferQueue);
00308       pMediaTime  = (OMX_TIME_MEDIATIMETYPE*)clockBuffer->pBuffer;
OMX_IndexConfigTimeClientStartTime, &sClientTimeStamp);
00300     if(err!=OMX_ErrorNone) {
00301      DEBUG(DEB_LEV_ERR,"Error %08x In OMX_SetConfig in func=%s \n",err,__func__);
00302     }
00303     tsem_down(pClockPort->pBufferSem); /* wait for state change notification */
00304 
00305     /* update the clock state and clock scale info into the fbdev private data */
00306     if(pClockPort->pBufferQueue->nelem > 0) {
00307       clockBuffer=dequeue(pClockPort->pBufferQueue);
00308       pMediaTime  = (OMX_TIME_MEDIATIMETYPE*)clockBuffer->pBuffer;
OMX_IndexConfigTimeClientStartTime, &sClientTimeStamp);
00300     if(err!=OMX_ErrorNone) {
00301      DEBUG(DEB_LEV_ERR,"Error %08x In OMX_SetConfig in func=%s \n",err,__func__);
00302     }
00303     tsem_down(pClockPort->pBufferSem); /* wait for state change notification */
00304 
00305     /* update the clock state and clock scale info into the fbdev private data */
00306     if(pClockPort->pBufferQueue->nelem > 0) {
00307       clockBuffer=dequeue(pClockPort->pBufferQueue);
00308       pMediaTime  = (OMX_TIME_MEDIATIMETYPE*)clockBuffer->pBuffer;
OMX_IndexConfigTimeClientStartTime, &sClientTimeStamp);
00300     if(err!=OMX_ErrorNone) {
00301      DEBUG(DEB_LEV_ERR,"Error %08x In OMX_SetConfig in func=%s \n",err,__func__);
00302     }
00303     tsem_down(pClockPort->pBufferSem); /* wait for state change notification */
00304 
00305     /* update the clock state and clock scale info into the fbdev private data */
00306     if(pClockPort->pBufferQueue->nelem > 0) {
00307       clockBuffer=dequeue(pClockPort->pBufferQueue);
00308       pMediaTime  = (OMX_TIME_MEDIATIMETYPE*)clockBuffer->pBuffer;
OMX_IndexConfigTimeClientStartTime, &sClientTimeStamp);
00300     if(err!=OMX_ErrorNone) {
00301      DEBUG(DEB_LEV_ERR,"Error %08x In OMX_SetConfig in func=%s \n",err,__func__);
00302