Welcome to MSDN Blogs Sign in | Join | Help

Timed Camera Capture - Update

Regards the Timed Camera Capture sample I posted last month, lots of you came across a bug in my code that slipped through my rigorous testing. I did a little code tidy up before I posted the ZIP and inadvertently removed an important line from the graph setup steps. Of course I tested it thoroughly before posting but its never a good thing to test your own code!

Anyway I have updated the ZIP file and posted over the top of the old ZIP. Here is the link: http://marcusperryman.members.winisp.net/BlogStuff/TimedCamera.zip

The error was in CGraphManager::CreateCaptureGraphInternal() where the filter graph is initially built. To make sure you have the right ZIP its 46.7kb (reported by explorer download window).

We apologies for the inconvenience.

Marcus

 

Published Tuesday, May 23, 2006 3:13 PM by marcpe

Comments

# re: Timed Camera Capture - Update

Actually I have a question.  How do you set the resolution of the captured image?
Thursday, June 08, 2006 3:31 PM by zechs888

# re: Timed Camera Capture - Update

Unfortunately you cant set the resolution directly. You can suggest the quality but its ultimately upto the capture device to decide what its going to send you.

Marcus
Wednesday, June 14, 2006 12:07 PM by marcpe

# re: Timed Camera Capture - Update

hi, i'd like to modify cameracapture.dll to add a preview capture, do u know how can i do?
Monday, June 19, 2006 3:39 AM by thodac

# re: Timed Camera Capture - Update

That's a little more tricky. I presume you want a 'video' preview - so the user can see the live feed from the camera - and then a still capture, right?
To achieve this you need to setup a video feed and stream the data to your preview window. When your user triggers a capture you need to stop the video feed and setup a still feed, then trigger a capture.
To setup the preview window should be a simple case of linkning the preview filter into the graph, but from my investigations it looks like there is no default preview filters installed. So you will need to create and use your own custom filter to achieve this.
I will have a go at this and post my finding when I get some time.

Marcus
Monday, June 19, 2006 3:56 AM by marcpe

# re: Timed Camera Capture - Update

Hello Marcus

Not a programmer, so excuse my lack of experience should the answer to my questions be an easy one. ;)

Does your 'code', once compiled and ready to be installed require a certain brand/type of PPC? Or will it work on any WM5?

Will the image size be controlled by the settings set in the device?

Having the feed as described above ('video' preview) is important to me - so I can see what the camera is about capture. Was a solution found/designed?

Do you contract out your skills?

Thanks

Jim
Sunday, August 06, 2006 7:50 AM by Jim P

# re: Timed Camera Capture - Update

Thank you for article.
I have another question about resolution. How suggest the quality?
Wednesday, August 09, 2006 11:20 AM by Pak

# re: Timed Camera Capture - Update


Hi,

Many thanks for a great article.

I have the same question - how do you suggest the quality? ive got as far as


IAMStreamConfig *pConfig = NULL;
CHK(m_pCaptureGraphBuilder->FindInterface(
   &PIN_CATEGORY_PREVIEW,
   &MEDIATYPE_Video,
   m_pVideoCaptureFilter,
   IID_IAMStreamConfig,
   (void**)&pConfig
));


AM_MEDIA_TYPE *pType = NULL;

pConfig->GetFormat(&pType);
pType->
pConfig->SetFormat(PType);
pConfig->Release();

but im not sure how to go about using pType to set the quality.

thanks
George
Thursday, August 31, 2006 1:52 PM by George Styles

# re: Timed Camera Capture - Update


Hi,

Many thanks for a great article.

I have the same question - how do you suggest the quality? ive got as far as


IAMStreamConfig *pConfig = NULL;
CHK(m_pCaptureGraphBuilder->FindInterface(
   &PIN_CATEGORY_PREVIEW,
   &MEDIATYPE_Video,
   m_pVideoCaptureFilter,
   IID_IAMStreamConfig,
   (void**)&pConfig
));


AM_MEDIA_TYPE *pType = NULL;

pConfig->GetFormat(&pType);
pType->
pConfig->SetFormat(PType);
pConfig->Release();

but im not sure how to go about using pType to set the quality.

thanks
George
Thursday, August 31, 2006 1:54 PM by George Styles

# re: Timed Camera Capture - Update

Any help on using IAMStreamConfig to enumerate the possible resolutions and select a higher one? I can't seem to get any code to work properly to do that.

Tuesday, December 12, 2006 11:00 AM by Ryan Galgon

# re: Timed Camera Capture - Update

For everyone asking about changing the resolution look at the source code for the WiMoBot (in the WiMo Native DLL to be specific) it shows how to enumerate the resolutions and change them.

A question though, I noticed the code for taking the picture is a reworking of the CameraCapture code, is it possible to do this with video capture as well? I have tried adding in the missing components from the SDK Cameracapture sample and importing them and calling those functions directly but cannot get it to work. Help would be greatly appreciated.

Tuesday, January 02, 2007 2:22 PM by rgalgon
New Comments to this post are disabled
 
Page view tracker