Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: directshow WinCe
Hi everybody.
 
I have a Windows CE 6 powered device with a camera.
A test application from Microsoft CameraDShowApp.exe works partly, it does capture the video and pictures from the camera but doesn't display live video correctly.
 
I've tried to use a SampleGrabber implementation (downloaded from one article on this site) and it has shown to me that it is possible to change resolution of the output stream from the camera - a callback function registered in SampleGrabber received amount of bytes in the data array corresponding to the selected resolution.
 
So I have a suspicion that I need to set the same resolution for both video capturing filter and video rendering filter.
 
The question is - how to do it for the last one ?
The standard video renderer for Windows CE doesn't support IAMStreamConfig interface and has no pins supporting it.
 
Can anybody help me with an advice ?
 
Thanks in advance,
Alex
Posted 24-Apr-12 23:30pm
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

No need to set resolution for VideoRenderer.
 
Configure your capture device using IAMStreamconfig interface is enough.
 
1.First add your filter to the Filter graph and then using capturegraphbuilder object to query interface IAMStreamconfig.
 
2.using GetFormat(AM_MEDIA_TYPE ) from IAMStreamconfig u can receive camera MediaType
 
3.Assign obtained mediatype to VideoInfoheader and set its bmiheader.biwidth and bmiHeader.biHeight to ur wish..
 
4. Then add your renderer to filter graph and connect both capturefilter and renderer and run the graph..
  Permalink  
Comments
premprakash999 at 23-Oct-12 6:05am
   
Hi aasikRAja,
 
Can u please give us a sample project for this. I have tried the above listed steps but failed.
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 2

Hi aasikRAja,
 
Can u please give us a sample project for this. I have tried the above listed steps but failed.
  Permalink  

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 Mika Wendelius 161
1 Abhinav S 115
2 Kornfeld Eliyahu Peter 100
3 Suvendu Shekhar Giri 100
4 Peter Leow 100
0 Sergey Alexandrovich Kryukov 8,513
1 OriginalGriff 6,526
2 Peter Leow 3,657
3 Zoltán Zörgő 3,426
4 Richard MacCutchan 2,417


Advertise | Privacy | Mobile
Web02 | 2.8.150123.1 | Last Updated 23 Oct 2012
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100