PrabuKumar's WinCE Blog

July 30, 2012

OMAP35x\DM37x VRFB and Video Capture in WEC7

Filed under: WinCE 7 — Prabu Kumar @ 4:14 pm
Tags: , , , , , , ,

With OMAP35x/DM37x EVM ,we will face issue of image corruption while rendering the camera output to the screen because of presence of Virtual Rotate Frame Buffer(VRFB). But if we want to use  both VRFB and Camera preview to work together in WinCE 6.0 ,we can set the renderer of the DShow  camera application to use the GDI mode instead of the DirectDraw renderer.The code used in WinCE 6.0,

 

IAMVideoRendererMode::SetMode(DWORD dwMode)

 

Where dwMode   -   AM_VIDEO_RENDERER_MODE_DDRAW (or)  AM_VIDEO_RENDERER_MODE_GDI

 

 

 

But in the WEC7,there is a change in the DShow renderer (i.e., Video Mixing Renderer(VMR)),which does not support the IAMVideoRendererMode interface or method which we used in WinCE 6.0 to switch the GDI mode.

 

In this blog ,I will show how to fix this issue. But it will have a disadvantage of very low frame rate in the rendering because of not using the hardware overlay.

 

In VMR we can control the renderer preferences using the IVMRFilterConfig::SetRenderingPrefs() method.

 

For this issue here is the fix, we can force the VMR to use the RenderPrefs_ForceOffscreen instead of Overlays, which is more or less the same functionality as used in the WinCE 6.0.

 

IVMRFilterConfig    *pVMRConfig;

 

hr = m_pVMRRenderer.QueryInterface(&pVMRConfig );

if(FAILED(hr) || pVMRConfig == NULL)

{

            FAIL(TEXT("Retrieving the IID_IVMRFilterConfig failed."));

}

 

 

hr = pVMRConfig->SetRenderingPrefs( RenderPrefs_ForceOffscreen| RenderPrefs_AllowOffscreen );

if ( FAILED(hr) )

{

FAIL( TEXT("%S: ERROR %d@%S – failed to set the rendering prefs. (0x%08x)" ), __FUNCTION__, __LINE__, __FILE__, hr );

}

 

 

 

 

Advertisements

June 16, 2012

MIPI camera(CSI2) working with OMAP35x/37x on WinCE 6.0

Filed under: WinCE 6.0 — Prabu Kumar @ 11:18 pm
Tags: , , , , ,

Since MIPI camera interface(CSI2) is not officially supported by TI on the OMAP35x/37x processors ,we had a little bit a struggle in getting the same working. We developed a DirectShow Camera driver on WinCE 6.0 to get the MIPI camera working in TI OMAP35x/37x EVM kit.

Check out this blog post for images of the same.

http://www.e-consystems.com/blog/camera/?p=782

December 23, 2010

Working with display controller using DDraw APIs in WinCE / Windows Mobile

I had seen few questions in the wince newsgroups about drawing text or drawing any bitmap over the camera video stream output render.I had thought of sharing my experience for this requirement.So I wrote this article with sample demo application and I hope this will help the community who are searching for a solution.

http://www.e-consystems.com/WindowsCE-Ddraw-api.asp

And also take a look at the application source of the sample which is described in the article.I had also created a project for this sample application in Codeplex server.If you have any comments or issues with this application please post it in this blog comments or in codeplex project discussion page,I will try to fix it.

http://ddrawwince.codeplex.com/

Blog at WordPress.com.