PrabuKumar's WinCE Blog

September 24, 2008

WinCE 6.0 DirectShow Camera Driver Higher Resolution support

Filed under: WinCE 6.0 — Prabu Kumar @ 12:34 am
Tags: , , ,

I have been working on the Wince 6.0 DirectShow Camera driver for quite a long time. I have taken NULL PDD driver from PUBLIC code and changed the source to support our custom sensor board. Our camera sensor can support a still resolution of 1600×1200.

With the help of one sample application I am able to see the preview and I am able to capture the still,but supports still resolution up to 640×480.But for a long time with our driver I am not able to get the still of 1600×1200.

Once I increase the resolution of the Still in the driver to 1600×1200,the application fails to run even preview is also not coming.

For debugging this issue I was breaking my head by changing lot of configuration setting in the DirectShow Camera driver. Using debug version build I found the reason for the failure is due to lack of the program memory. The development board which I used for testing contains only 64 MB of SDRAM.

So I tested in different development board which contains 128MB of SDRAM. After giving enough program memory my application starts capturing still of resolution 1600×1200(2MP).But I don’t know the reason why this application is taking too much amount of memory (around 90MB) for running simple Preview and Still pins. As I am not familiar with DirectShow Application development I am investigating on it, I will try to find the reason and will post it in future.




  1. hello do you find the solution about this problem?
    I have same issue when I use 700×600 resolution it use 20MB memory.
    I am not sure it is normal or not.
    My video filter input is YUV2.
    If use RGB it will not happend, but my camera module only support YUV2.

    If you have some solution please tell me, thank for your reply ^_^

    Comment by shinyochen — June 26, 2009 @ 3:13 pm

  2. If you don’t have enough memory then you need to convert your Input to the Directshow as RGB,when YUV2 data is given to the Directshow it will try to add color space converter filter in the STILL graph,which will require huge memory.

    Comment by prabukumar — June 26, 2009 @ 10:46 pm

  3. Very thank for your reply!!
    In some special reason we only have YUV2 input.(Our moudle doesn’t have rgb output , only way is software convert by myself, but it is too slow).
    In my case we only need to use capture filter.
    Do you think it has any chance can decrease some memory? Or if I want to use YUV2 input (only need preview and capture function) this memory request is necessary.

    P.S. my case is module(camera interface) YUV2(700×600) => Video capture(DirectShow) => need preview and capture video file(Doesn’t need still image) now will locate close 30MB memory…

    Base on ce6 NULL camera driver, application base on CAMERAAPP & FRAMEWORK.
    Does it has any possibility the camera application’s bug waste these memory?

    Thank again!

    Comment by shinyochen — June 27, 2009 @ 9:15 am

  4. I try again even input is RGB is still happen locate huge memory.
    Is it normally?
    700 x 600 will use close 30MB.

    Comment by shinyochen — June 29, 2009 @ 8:21 am

  5. If the input to the DShow is RGB then the application won’t take much memory.But when you are trying to record video then Buffering filter will try to use the remaining program memory for buffering the video.You can adjust this buffering length in the application.

    Comment by prabukumar — June 30, 2009 @ 7:54 am

  6. Do you know how to adjust the buffering length?

    It seem like auto locate 2xMB memory when video encoder enable on start capture video.

    But I don’t know how to adjust it, it look like depend on source resolution.


    Comment by shinyochen — July 2, 2009 @ 11:26 am

  7. Hi Prabhu,
    I started working with wince recently. Now, I’m looking into camera driver. I too developed the camera PDD layer by referring the NULL driver in PUBLIC. How to test this driver?Can you suggest me the sample application and the process to use this application. I tried to download these, but I’m confused with the DS filters and the other sources.

    Comment by yvlakshmi — December 2, 2009 @ 10:56 am

  8. You can find the sample application source in the following location


    Using this application you can capture still and video.

    Comment by prabukumar — December 2, 2009 @ 11:10 pm

  9. Hi Prabhu,
    I got this application, when I tried this by addding as a subproject, I’m getting error:unresolved external symbol InitCommonControls referenced in function WinMain. How to resolve this?? Its urgent.

    Comment by yvlakshmi — December 3, 2009 @ 9:37 am

  10. Hi Prabhu!
    I have some problems. I use CAMERAAPP application ($(WINCEROOT)\PRIVATE\TEST\ MULTIMEDIA\DIRECTX\DSHOW\CAMERA\CAMERAAPP), and get resolution up to 170×144.
    I use microsoft camera driver for windows ce 6.0.
    Why I can’t change this resolution from register? And why it so small?

    Comment by dzlicvin — February 4, 2010 @ 2:02 pm

  11. Hi,
    Check out the following blog for the switching of the resolution


    Comment by Prabu Kumar — March 15, 2010 @ 12:53 pm

  12. Thanks for your reply and example!

    It is a good method
    (, but I got the next problem:

    HRESULT hr = g_DShowCaptureGraph.GetNumberOfCapabilities(nStream,&iCount, &iSize);
    if (iSize == sizeof(VIDEO_STREAM_CONFIG_CAPS)) //I get iSize == 52 and sizeof(VIDEO_STREAM_CONFIG_CAPS)==128

    //And this code don’t work!

    Why these sizes differents?
    Thanks you!

    Comment by dzlicvin — May 10, 2010 @ 4:04 pm

  13. […] The busiest day of the year was July 14th with 61 views. The most popular post that day was WinCE 6.0 DirectShow Camera Driver Higher Resolution support. […]

    Pingback by 2010 in review « PrabuKumar’s Blog — January 31, 2011 @ 4:49 pm

  14. Hi prabhu,

    have been listening about you a lot.

    I am working on compulab’s CM T3530 eval board with omap 3530 processor. It supports wince 6.0 and linux too.

    My basic objective is that i want to develop an applciation that could record and xtream the video from a usb camera attached to the board.

    my first problem is that how shall i make usb camera work on cm t3530. When i attach the usb cam, it asks for the driver. I have downloaded a package from microsoft site that enables to run web cam in wince 6.0 9 as mentioned in teh site). But wince doesn’t recognize the format of the package and doesn’t install anything.

    caould you please help in this development project. I don’t know where and how to start.


    Comment by Anmol Rana — July 12, 2011 @ 4:14 pm

  15. Check out this blog post to get the USB camera working in Windows CE 6.0.Also make sure your webcam supports YUV or MJPEG output formats.

    Comment by Prabu Kumar — July 13, 2011 @ 4:09 pm

  16. Dear prabhu,

    I am trying to run playcap application in my compulab’s cm-t3530 – ompa 3530 -win ce6.0 eval board.

    When i complie the application in vs2008 it runs fine and captures the video from a logitech usb cam.

    when i complie it on vs2005 for cm-t35sdk, it give error that unknown identifier capturegraphbuilder2 in the cocreateinstance

    If i cange it to capturegraphbuilder it is compiled successfully. But when i deploy it, it gives error “failed to get interfaces” which is wriiten in the code at the failure to build the capture graph builder.


    Comment by Anmol Rana — July 25, 2011 @ 11:49 am

  17. hi prabhu,

    when i run the cameradshowapp on my arm wince 6.0 kit, there is lot of flickering. Also the caprtured video is showing a green screen when played in media player. It saves in .asf format.


    Comment by Anmol Rana — January 6, 2012 @ 10:10 am

RSS feed for comments on this post. TrackBack URI

Leave a Reply

Please log in using one of these methods to post your comment: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Blog at

%d bloggers like this: