I\'m brand new to DirectShow and am working on adding a video stream to my application. I\'ve looked into many solutions out there (TouchLess, DirectShow.net, etc.) and end
You put it into right place - after it's already in the graph by AddFilter, but yet before its output pin is connected. If you have successful HRESULT, then you could be expecting changed format, but there might be exceptions, such as for example this media type was not accepted by downstream filter and they started negotiating from the start.
You're not showing your ConfigureSampleGrabber here, so it might be the case that this media type you want is not accepted by sample grabber making filter graph to try alternate media types and/or intermediate filters (such as decoders).
There are a few things you can actually do.
For troubleshooting you might want to:
To force the media type, you might want to use IFilterGraph::ConnectDirect with the configured pin, it's immediate neighbor downstream pin and media type of your interest.
Hope this helps.
Steve, you should not rebuild the camera (from moniker) in SetCaptureFormat
but use the g_pIBaseFilterCam
.