I have write a DirectShow video transform filter, which is inserted between a video decoder and a video render filter. It will add a photo frame around the input picture. So the output picutre's size and aspect ratio is different from the input one.
Unfortunately, I found the video render would maintain the original aspect ratio and so the displayed picture with a photo frame was stretched. In GraphEdit, I found the video render filter with a check box named "Maintain Aspect Ratio". Uncheck it and the out picture will not be stretched. That's what I want. But I don't know how to do it in my code. I had query the interface IVideoWindow but found it wasn't able to set the aspect ratio. So I ask for help here.
Thanks.
Thank you, Jeremiah Morrill. Yes, IVMRAspectRatioControl7/9 is what I want. But it seems, to get the interface, I must get the filter Video Mixing Renderer Filter 7/9 firstly. I want to set the aspect ratio on the "Video Renderer" filter instead of "Video Mixing Renderer Filter 9".
I don't need to chage format dynamicly. My filter graph is
Source -> Demux -> Decoder -> MyFilter -> VideoRenderer
No matter the Decoder output's resolution, MyFilter's output resolution is always same as the desktop screen. I found, if I use intelligence connection, I will encounter the problem I have described. But if I connect MyFilter to VideoRenderer manually, the video resolution is correct, i.e., same as the screen.