0

enter image description here

I'm trying to zoom into the area of the DirectShow window between Marker A and Marker B(It's a RangeBar) which represent the width of the video window. I've tried using SetWindowPosition but all that does is move the video window around.

I'm new to DirectShow, please help !

Thanks !

CharlesBryan
  • 181
  • 1
  • 16

1 Answers1

2

You can use the IVMRMixerControl interface of the renderer to zoom in to a part of the video.

You need to switch the filter to "mixing-mode" (before you connect the filter) by calling IVMRFilterConfig::SetNumberOfStreams (2). Connect the Renderer. Now you can set the rect you want to show with a call to IVMRMixerControl::SetOutputRect. You need to provide the rectange you want see with normalized values. This means, if you want to zoom in you will set {-0.5, -0.5, 1.5, 1.5} and if you want to zoom back you will set {0, 0, 1, 1}.

CPlusSharp
  • 881
  • 5
  • 15
  • Thank you so much ! I spent a week trying to figure it out. Also this [example](http://social.msdn.microsoft.com/Forums/en-US/windowsdirectshowdevelopment/thread/b54bfa3d-bfd9-4159-a178-1c921ae20f0d) helped me too. – CharlesBryan Jun 13 '12 at 13:24