Jump to content
  • Advertisement
Sign in to follow this  

Mirror screen in a video capture application using DirectShow

This topic is 5188 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi, I was wondering if anyone might know how I can make my video capture screen mirrored from right to left. I am using Directshow and my application consists of a series of filters that provides svideo as an input source and renders it to the screen via VMR9. I am currently fiddling with SetOutputRect function which takes a streamid and a rectangle. I am unsure what the streamid is or how it is obtained. I tried hardcoding it to 0 but nothing happens to my video capture screen. Has anyone have any idea how I can mirror my screen. Any help is very much appreciated. Hoongming

Share this post

Link to post
Share on other sites
dwStreamId is the ID of the connection to the VMR9 filter.
To see better what is happening open graphedt.exe that shoud be in "DX_Extras_Path\DirectShow\Utilities\graphedt.exe", then add the Video Mixing Renderer 9 to the graph, after that render a video file (don't use drag&drop as it will clean the graph).

Now you see that the video you just rendered connected to the first pin of the VMR9 filter, this means that the stream ID of the video you just rendered is 0.

So, assuming that in your app you only have one video stream connected to the VMR9 filter, this video stream ID should be 0 (unless you are connecting the pins manually, which in this case you should know what stream ID (Pin number) you are connecting your video stream to).

As for mirroring the video, I've never done it before, but try this:

VMR9NormalizedRect rc;
rc.left = 1.0f;
rc.right = 0.0f;
rc.top = 0.0f;
rc.bottom = 1.0f;

pVMRMixerControl->SetOutputRect( 0, &rc );

Share this post

Link to post
Share on other sites
Sign in to follow this  

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!