如何使用DirectShow

如何使用DirectShow

本文介绍了如何使用DirectShow API省略对按钮/区域的捕获?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用推送源桌面过滤器来捕获应用程序中的屏幕。
正在进行录制时,我隐藏了我的应用程序。屏幕上仅显示用于停止录制的按钮。
该按钮也会被过滤器记录。在播放保存的录音期间,按钮与屏幕的其余部分一起可见。

I am using "Push Source Desktop" filter for capturing screen in my application.I hide my application while recording is going on. Only a button for stopping the recording is visible on screen.The button also gets recorded by the filter. During playback of the saved recording the button is visible along with rest of the screen region.

有什么办法可以防止按钮被录音?

Is there any way I can prevent the button from getting recorded ?

我的目的是录制不带按钮的屏幕。我无法隐藏停止记录应用程序所需的按钮。
我试图更改按钮的alpha分量并使之半透明。但是,过滤器仍然可以捕获半透明按钮。

My aim is to record the screen without the button. I cannot hide the button as it required for stopping the recording of my application.I have tried to alter the alpha component of my button and make it semi-transparent. But still the filter captures the semi-transparent button.

如何获取按钮的背景区域而忽略按钮本身的捕获?

How can I get the background region of the button and ignore the capturing of the button itself?

推荐答案

问题实际上与DirectShow无关。长话短说,DirectShow在您使用DirectShow API和软件项目的外形尺寸发送已存在的图像时启动。

The problem has actually nothing to do with DirectShow. Long story short, DirectShow starts when you send the image you already have using DirectShow API and form factor of your software item.

您的问题是如何在桌面上显示某些内容,并从同一桌面上抓取内容(不包括呈现给用户的部分)。我认为您可以在不做过多细节的情况下准确地实现它,但是很多时候,您可以做这样的技巧:您知道UI元素的位置,因此可以根据窗口Z-来确定其下方的内容订购(另一个应用程序窗口或桌面等)。您可以要求该窗口重新绘制到DC中,然后将这些部分合并到作为DirectShow源向下游发送的视频中。

Your question is how to display something on the desktop and grab from the same desktop excluding the part you present to user. I don't think you can implement it accurately without going in too many details, but quite so often you can do a trick like this: you know the position of your UI element so you can identify what's below it in terms of window Z-order (another application window or desktop etc). You can ask this window to repaint into your DC, and then combine the parts into the video you send downstream as a DirectShow source.

这篇关于如何使用DirectShow API省略对按钮/区域的捕获?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-04 22:53