} break;
}
}
-
+int imcount=0;// this is debug code and should not go into release
unsigned int OsdOpenVG::handleTask(OpenVGCommand& command)
{
switch (command.task){
return 0;
} break;
- case OVGdestroyImageRef: {
- //Log::getInstance()->log("OSD", Log::DEBUG, "TVMedia Draw Image Destroy %x",command.param1);
+ case OVGdestroyImageRef: {imcount--;
+ Log::getInstance()->log("OSD", Log::DEBUG, "TVMedia Draw Image Destroy %x %d",command.param1,imcount);
vgDestroyImage((VGImage)command.param1);
return 0;
} break;
vgDestroyPaint((VGPaint)command.param1);
return 0;
} break;
- case OVGcreateImagePalette: {
+ case OVGcreateImagePalette: {imcount++;
VGImage input=vgCreateImage(VG_A_8,command.param1, command.param2,
VG_IMAGE_QUALITY_NONANTIALIASED|
VG_IMAGE_QUALITY_FASTER|VG_IMAGE_QUALITY_BETTER);
return handle;
} break;
- case OVGcreateMonoBitmap: {
+ case OVGcreateMonoBitmap: {imcount++;
VGImage handle=vgCreateImage(VG_A_1,command.param1, command.param2,
VG_IMAGE_QUALITY_FASTER);
//Log::getInstance()->log("OSD", Log::DEBUG, "Draw create mono %d %d %x %d",command.param1,command.param2,vgGetError(),handle);
//Log::getInstance()->log("OSD", Log::DEBUG, "Draw create file %d %d %x %d",command.param1,command.param2,vgGetError(),handle);
return handle;
} break;*/
- case OVGcreateImageMemory: {
+ case OVGcreateImageMemory: {imcount++;
PictureInfo *info = (PictureInfo*) command.data;
VGImage handle;
- //Log::getInstance()->log("OSD", Log::DEBUG, "TVMedia OVGcreateImageMemory");
+ Log::getInstance()->log("OSD", Log::DEBUG, "TVMedia OVGcreateImageMemory %d",imcount);
handle=vgCreateImage(VG_sABGR_8888,info->width,info->height,VG_IMAGE_QUALITY_BETTER);
vgImageSubData(handle,info->image,info->width*4,
VG_sABGR_8888,0,0,info->width,info->height);
delete info;
} break;
- case OVGcreateEGLImage: {
+ case OVGcreateEGLImage: {imcount++;
PictureInfo *info = (PictureInfo*) command.data;
VGImage handle;
handle=vgCreateImage(VG_sABGR_8888,info->width,info->height,VG_IMAGE_QUALITY_BETTER);
- //Log::getInstance()->log("OSD", Log::DEBUG, "TVMedia OVGcreateEGLImage %d %d %x",info->width,info->height, handle);
+ Log::getInstance()->log("OSD", Log::DEBUG, "TVMedia OVGcreateEGLImage %d %d %x %d",info->width,info->height, handle,imcount);
info->handle = handle;
info->reference = eglCreateImageKHR(egl_display, egl_context, EGL_VG_PARENT_IMAGE_KHR, (EGLClientBuffer)handle, NULL);
void VideoOMX::checkForStalledBuffers()
{
//Log::getInstance()->log("Video", Log::DEBUG, "Check stalled");
+ clock_mutex.Lock();
omx_event_mutex.Lock();
list<VPE_OMX_EVENT>::iterator itty=omx_events.begin();
while (itty!=omx_events.end()) {
stall_conf.nVersion.nVersion=OMX_VERSION;
stall_conf.nPortIndex=omx_codec_output_port;
stall_conf.nDelay=200000;
- clock_mutex.Lock();
+
error=OMX_GetConfig(omx_vid_dec,OMX_IndexConfigBufferStall,&stall_conf);
if (error!=OMX_ErrorNone){
Log::getInstance()->log("Video", Log::DEBUG, "Get OMX_IndexConfigBufferStall failed %x", error);
omx_event_mutex.Unlock();
return ;
}
- clock_mutex.Unlock();
if (stall_conf.bStalled==OMX_TRUE) {
omx_vid_stalled=true;
Log::getInstance()->log("Video", Log::DEBUG, "Video decoder stalled! %d", stall_conf.nDelay);
itty++;
}
omx_event_mutex.Unlock();
+ clock_mutex.Unlock();
}