none
guess filter graph of an application RRS feed

  • Question

  • Hey guys !

    I'm currently coding an application on Windows Mobile devices that is getting the camera video stream & displaying it on the screen (using DirectShow, of course).

    I'm using "Intelligent Connect", so that the filter graph is built automatically. I've been working on various devices in the past from various manufacturers, & my code has always been working correctly.

    Unfortunately, I just received a device on which the resulting displayed stream ends up in a weird combination of colors & orientation. I didn't manage to correct the stream.

    Every Windows Mobile device has a camera.exe application that gives the user access to basic camera functions (zoom, take a picture, take a video, etc...). I looked at the one on my device (which is running perfectly, very smoothly, with the right color), & found it's using quartz.dll, so DirectShow. So I guess they found a right combination of filters to be able to display a clean stream on the screen.

    My code found the list of registered filters, but I didn't find any way to correct my problem. So would there be any way for me to guess which filter graph the camera.exe application is running to get this perfect video stream on the screen ?

    Thanks for your help, I'm completely available if you need further information about my case.


    :-)
    Wednesday, January 28, 2009 6:04 PM

All replies

  • I see several ways you can troubleshoot the issue with the problematic device. First of all is that you can find more about the graph you have created with intelligent connect for this device. I mean full topology and media types. You mentioned that you have a number of other environments where the application works properly so you can compare the graphs to see if there is any difference. Quite possible the problem is specific to certain FOURCC and, for example, if so you can pre-configure the device to prefer a different pixel format.

    Second is looking at camera.exe's filter graph. I am not sure if WinCE has its GraphEdit and can put graphs on ROT available for remote connections. Even if so, there is no guarantee that camera.exe makes its own graph available this way. However if you are familiar with COM, you can try to cheat a bit a wrap standard filter graph COM object with your own one and spy on the topology by enumerating all filters at the moment the graph goes into paused state.



    http://alax.info/blog/tag/directshow
    Wednesday, January 28, 2009 6:21 PM
  • As an alternative method for finding the problem, does the AmCap sample that comes with the regular Windows SDK work on WM?  Or is there a similar capture sample that comes with the WM SDK?
    My dshow site is http://tmhare.mvps.org
    Wednesday, January 28, 2009 7:01 PM
    Moderator
  • Hi guys, thanks for your answers, & sorry for the late reply. 
    @Roman Ryltsov:
    I already did code a little sample snippet that gives me a few informations about the filter graph (filters, pins, media formats, & so on...). Using Intelligent Connect, the original format is indeed unknown to me, but there is a filter that converts it to know territory (RGB565). Though, the conversion seems to be bugging, which is why I'd like to understand what is the filter graph of the camera.exe application so I can copy it in order to not having this bug anymore.
    WinCE does not have any GraphEdit application as far as I know.
    can put graphs on ROT available for remote connections
    Well I don't really know either, but I doubt it.
    However if you are familiar with COM
    ouch, not really, but I can still try
    you can try to cheat a bit a wrap standard filter graph COM object with your own one and spy on the topology by enumerating all filters at the moment the graph goes into paused state.
    I didn't really understand what you mean. Do you mean I should code an exe, & try to make it run while the camera.exe is running, & make it enumerate all available filters ? I don't really know when does the camera.exe go in pause state, I think it automatically shuts down completely when it is not in fullscreen anymore (which shouldn't be a problem, I can write a windowless exe).

    @The March Hare:
    I'm afraid there is no real DirectShow Windows Mobile SDK. There might be a DirectShow Windows CE SDK, but I'm not aware of it. I'm going to download the regular Win32 DirectShow SDK, & see if it is not too difficult to port the AmCap sample application to Windows Mobile.

    :-)
    Wednesday, February 18, 2009 6:39 PM
  • Le Sage said:

    @The March Hare:
    I'm afraid there is no real DirectShow Windows Mobile SDK. There might be a DirectShow Windows CE SDK, but I'm not aware of it. I'm going to download the regular Win32 DirectShow SDK, & see if it is not too difficult to port the AmCap sample application to Windows Mobile.

    :-)


    Of course there is a real DirectShow Windows Mobile SDK, but it's not where do you expect it to be. Normally one would think that it's in Windows Mobile SDK like for the regular Windows SDK, but it's not! The location is... Platform Builder.

    You should get the 120 days Platform Builder for Windows Mobile 5.0 from here, then install all the monthly updates from here. You only need to install the ARM 4IV platform. I've tested with Windows Mobile 5.0, it should also work with 6.0.

    The Windows Mobile version of BaseClasses is a bit tweaked and you need to patch it in order to cope with Visual Studio 2005 and up (just a small issue). You might have to modify the include paths in Visual Studio for Windows Mobile platform, the regular Windows Mobile SDK can conflict with the SDK from Platfrom Builder.

    Note: you need at least Visual Studio 2005 Standard Edition or Visual Studio 2008 Professional Edition in order to build Windows Mobile programs, just for the record.

    Cheers!

    Thursday, February 19, 2009 10:21 AM
  • All right, I already had downloaded a long time ago the PlatformBuilder for WinCE 5.0, & yep there are a few samples files in C:\WINCE500\PUBLIC\DIRECTX\SDK\SAMPLES\DSHOW.
    Note: you need at least Visual Studio 2005 Standard Edition or Visual Studio 2008 Professional Edition in order to build Windows Mobile programs, just for the record.
    Thanks a lot, I've been developping (in C#) for WM since 2000.
    I'll have a look at these samples, but as for now it doesn't solve my original problem : what is the graph used by camera.exe to get this perfect stream ?
    The March Hare talked about an AmCap sample, it's apparently not provided with the WinCe DirectShow SDK.

    :-)
    Monday, February 23, 2009 11:01 AM
  • You can take the partial code from Roman Ryltsov's excellent DirectShow Filter Graph Spy and build yourself a Windows Mobile version.
    Then take the the code from GraphStudio and build a minimal version for Windows Mobile.

    From what I can see, IRunningObjectTable is supported on Windows Mobile Version 5.0 and later. CoGetTreatAsClass is as well supported from Windows Mobile Version 5.0 and later.

    It's a bit of work, but it should work :)

    Monday, February 23, 2009 1:58 PM