Click here to get back home

DirectShow camera format change

 HomeNewsGroups | Search | About
 microsoft.public.smartphone.developer    Post an article   get this group's latest topics as an RSS feed add this group's latest topics to your My MSN content add this group's latest topics to your My Yahoo content
Subject Author Date
DirectShow camera format change Phred 05-28-2007
Get Chitika Premium
Posted by Phred on May 28, 2007, 6:52 pm
Please log in for more thread options
I've created a custom render filter to capture camera frames via
DoRenderSample, all is working well but I've run into a small glitch.

I've initialized directshow, set the media type to YV12 and then
called RenderStream to get the filter graph all connected. After
calling IMediaControl->Run, I can capture YV12 frames via the
DoRenderSample of my CBaseVideoRenderer derived class.

However I'm running into a problem. If I stop the graph from running
via IMediaControl->Stop, call
IAMStreamConfig->SetFormat to set a UYVY format and different
resolution and then call IMediaControl->Start, I am no longer able to
recieve frames from DoRenderSample. If I switch resolutions between
different YV12 formats, it works out fine but not when I switch color
formats too.

Any ideas?


Posted by Gary Daniels [MS] on June 5, 2007, 9:25 pm
Please log in for more thread options
My only guess would be that the format renegotiation is causing a disconnect
between the video capture filter and your filter. Try manually disconnecting
your filter from the video capture filter before setting the new format and
then reconnect and see if the reconnect succeeds. It's possible that when
the set format does the reconnect internally the error code from the
reconnect isn't getting back to you because of some quirk of the graph
layout. This has been tested to work with both the video renderer and still
image sink connected to the video capture filter.

Gary Daniels
Windows CE Multimedia and Graphics

This posting is provided "AS IS" with no warranties, and confers no rights.
You assume all risk for your use.

> I've created a custom render filter to capture camera frames via
> DoRenderSample, all is working well but I've run into a small glitch.
>
> I've initialized directshow, set the media type to YV12 and then
> called RenderStream to get the filter graph all connected. After
> calling IMediaControl->Run, I can capture YV12 frames via the
> DoRenderSample of my CBaseVideoRenderer derived class.
>
> However I'm running into a problem. If I stop the graph from running
> via IMediaControl->Stop, call
> IAMStreamConfig->SetFormat to set a UYVY format and different
> resolution and then call IMediaControl->Start, I am no longer able to
> recieve frames from DoRenderSample. If I switch resolutions between
> different YV12 formats, it works out fine but not when I switch color
> formats too.
>
> Any ideas?
>



Similar ThreadsPosted
What video file format and codec are supported for Windows Mobile DirectShow September 2, 2008, 6:01 am
Can we use directshow to develop camera on smartphone 2005? June 22, 2005, 3:21 am
Camera DirectSHow custom render filter July 14, 2006, 3:53 am
How to change the gray-shaded video that emulates the camera on windows mobile 6.0 emulator June 11, 2008, 4:49 am
Camera on WM6: camera capture, motion sensing, and so on October 29, 2008, 1:52 pm
drawing raw format (RGB/YUV) to Pocket PC January 18, 2006, 10:43 am
The format of the DM notification message? July 7, 2008, 10:47 pm
The format of the DM notification message? July 7, 2008, 11:02 pm
The format of the DM notification message? July 8, 2008, 3:16 am
The format of the DM notification message? July 8, 2008, 3:43 am

Our other projects:

Art Dolls, Fairies and Mermaids - Sunnyfaces.net

Roy's Linux, Programming and Search Engines messages

1-Script XML SitemapXML Sitemap