CoderMind

Hello!
I searched for a forum dedicated to windows mobile directshow development but couldn't find any... Is there a forum for that

So here is my question:
I am working on a project with a htc touch phone (windows mobile 6) where I need to have a video preview and I should grab frames from the preview window.
Everything goes well until I grab a picture from the video stream :
-> the video stream gets blocked on 1 image
->but the capture graph continues to run since I can continue taking photo and save in a file which has the latest picture taken.

I have a function to take the picture and in it I call :
VideoControl->SetMode(pStillPin,VideoControlFlag_Trigger)

and the video preview gets blocked...
Does anyone have any idea please

Thanks in advance for your answers



Re: DirectShow Development FrameGrabbing on Windows Mobile blocks video Preview

Michel Roujansky

I suspect that the VideoControl, because of its simplicity of use, does not allow you to do two things at the same time (previewing live video and capturing still images).

Also you have to verify that your video device can feed both the preview pin and the still capture pin at the same time. If this is the case, then you have to build a proper DS graph yourself (I mean in your aplication) to do both tasks at the same time.






Re: DirectShow Development FrameGrabbing on Windows Mobile blocks video Preview

winch

Hi CoderMind,

Maybe you can help me cause I'm also trying to use a sample grabber (such as the one in the DirectX SDK samples) on Windows Mobile 5.0 but I have been unsuccessful in compiling it for now. I'm trying to compile the sample from the DirectX SDK but apparently the header qedit.h is not available for WM5. How did you make it with your own sample grabber Could you post your code for the grabber Or do you have any hints for compiling the one in the DirectX SDK

Thanks in advance for your help!




Re: DirectShow Development FrameGrabbing on Windows Mobile blocks video Preview

CoderMind

Hello!
First of all thanks very much for you reply!
I've tried on other pocket pc and smartphones and it works, but on the new HTC Touch phone it's impossible to have preview a live video and capture still images, because the preview live video gets "freezed" while taking photos is still possible.

I think you're right, the problem comes from the device. But how can I verify if my device can feed both pins at the same time
I mean, is there a function to check that I am sorry, I am not sure what you mean about building a proper DS graph to correct that problem in order to do both task at the same time.

Is this not enough

For previewing live video :

CaptureGraphBuilder->RenderStream(&PIN_CATEGORY_PREVIEW,
&MEDIATYPE_Video,
VideoCaptureFilter,
NULL,
NULL );

For capturing still images :

CaptureGraphBuilder->RenderStream( &PIN_CATEGORY_STILL,
&MEDIATYPE_Video,
pVideoCaptureFilter,
NULL,
pImageSinkFilter );


Thanks again for your reply, I really appreciated it!





Re: DirectShow Development FrameGrabbing on Windows Mobile blocks video Preview

CoderMind

For winch :

Why to look at the directx sdk samples
There's a great DirectShow sample in the windows mobile 5 sdk :
yourfolder\Program Files\Windows CE Tools\wce500\Windows Mobile 5.0 Pocket PC SDK\Samples\CPP\Win32\Cameracapture

launch the CameraCapture .sln with visual studio 2005 and try to read the code. You can adapt that sample for your own use.
As you can see, there is no sample grabber filter for windows embedded. Strange that your facing difficulty on compiling the sample
So either do as the sample or... code your own filter (very difficult)...

To build the sample, be sure you have added in Project -> CameraCapture Properties -> Configuration Properties -> Linker -> Properties :

dmoguids.lib
strmiids.lib
strmbase.lib
uuid.lib

I hope this could help. check your project and solutions directories and settings. have you selected the proper platform





Re: DirectShow Development FrameGrabbing on Windows Mobile blocks video Preview

winch

Thanks for you reply CoderMind,

I had no problem compiling the CameraCapture sample, but I didn't retain this example as it does not enable previewing for still image capture. As I am a newbie in DirectShow programming, I thought it would be really tough to change the CameraCapture sample to add previewing before performing a still image capture. But as you made it it should not be as tough as I expected ;-) I will work on that. Any hints for adding previewing in the CameraCapture sample would be very welcome...

Thanks a lot for your help CoderMind!