如何在其他计算机上运行 DirectShow.net 应用程序
我有一个 C# DirectShow.Net 应用程序,我想测试它在发布模式下在其他计算机上运行。我如何才能确保我的程序能够在不包含 Windows sdk 及其可用的过滤器的其他计算机上运行?
我必须包含 dirctshow dll 等,但是我可以对过滤器本身做什么?
更新: 我有虚拟机来运行它,但此外,我如何确保计算机上存在某个 directx 过滤器,如果不在,则获取 dll 并通过代码将其注册到计算机上?
编辑: 注册 DLL 后,我运行我的程序。它没有运行,所以我抓住 graphstudio 并将程序的图表附加到 graphstudio ,并且没有连接任何过滤器,当我尝试手动连接它们时,它们拒绝连接。
Edit2:
Can you post more details about the scenario you are having problems with?
我正在运行我的应用程序,该应用程序可以在我的 Virtualbox VM 上的 Windows 7 32 位计算机上运行。 virtualbox 不允许我访问我的 USB 设备以进行流传输,因此我注释掉了依赖于它的代码。当我运行它时,过滤器不会连接。我做了一些测试,并尝试在没有源的情况下重新创建图表,它们不会连接在一起,因此这实际上可能是问题所在。
OS version?
目前我正在运行 32 位 XP virtualbox VM,
which filters you are using?
由于某些奇怪的原因,我使用的
Source -> Smart tee (capture) -> GMFBridgeSinkFilter
Smart tee (preview) -> AVI Decompressor -> Video REnderer
GMFBridgeSource -> ffdshow video encoder -> avi mux -> File writer
(w)riter 必须是小写。开发机器有 (w)riter 和 (W)riter
Which filters do you have there that you are not using?
您的意思是我放入代码中但未连接到的操作系统或过滤器上的标准是什么?
You could also try with the original GraphEdit instead of GraphStudio, and you could debug your application remotely and see where it is failing exactly.
Graphedit 仅包含在完整的 Windows sdk 中,在我所在的位置下载这是一个痛苦。
I have a C# DirectShow.Net application and i want to test it running on other computers in release mode. How can i go about making sure my program will run on other machines that don't incorporate the windows sdk and the filters it avails?
I will have to include the dirctshow dlls and such but what can i do about the filters themselves?
Update:
I have virtual machines to run it on, but moreover how can i make sure a certain directx filter is on a computer and if it isnt, grab the dll and register it to the computer from code?
Edit:
After i have the DLLs registered i run my program. It doesnt run, so i grab graphstudio and i attach my program's graphs to graphstudio and none of the filters are connected and when i try to manually connect them they refuse to connect.
Edit2:
Can you post more details about the scenario you are having problems with?
I am running my application which works on my windows 7 32bit machine on my Virtualbox VM. the virtualbox wont allow me access to my usb device for streaming purposes so i commented out the code that depends on it. when i run it, the filters wont connect. I did some testing and tried to recreate the graphs without the source and they wont connect together so that may actually be the problem.
OS version?
At the moment i am running the 32bit XP virtualbox VM
which filters you are using?
I am using
Source -> Smart tee (capture) -> GMFBridgeSinkFilter
Smart tee (preview) -> AVI Decompressor -> Video REnderer
GMFBridgeSource -> ffdshow video encoder -> avi mux -> File writer
(w)riter has to be lowercase for some odd reason. dev machine has (w)riter and (W)riter
Which filters do you have there that you are not using?
Do you mean which are standard on the OS or filters i put in the code and am not connecting to?
You could also try with the original GraphEdit instead of GraphStudio, and you could debug your application remotely and see where it is failing exactly.
Graphedit only comes in the full windows sdk which is a pain to download where im at.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
以下是您可以执行的一些验证的列表:
干净地测试您的应用程序
系统,也许使用一些
虚拟化软件。如果您需要
支持Win XP,就不错了
也想在那里测试一下,因为
有一些 DirectShow 过滤器
仅在 Win Vista 中可用
以及稍后。
它们可能由 Windows 提供。
那些不是的,您必须提供
它们并将它们注册到目标中
系统在安装过程中
您的申请流程。我会
在这种情况下建议创建一个
视觉安装项目
工作室并附上您的所有
依赖 dll 在那里。对于手册
安装你可以复制你的
过滤到您的应用程序的文件夹
并使用 regsvr32 注册它们
命令行中的filtername.ax。
关心的是与 64 位的兼容性
Windows 版本,因为您无法
使用为 32 位本机构建的过滤器
来自 64 位应用程序的模式。如果
您的应用程序是在
.net,它是使用
AnyCPU
构建的模式下,.net JIT 将创建 64 位
其中的代码和您的 32 位 dll
将无法加载。所以如果你是
我推荐使用 32 位 dll
使用以下命令构建您的 .net 应用程序
CPU 类型 = X86。您可以设置此模式
在你的项目配置中
视觉工作室。
创建后,您可能还需要安装
Visual c++ 可再发行文件。
这当然是
问题,您无法创建图表
没有源过滤器和
目的地过滤器。源过滤器
一般会决定内容
格式、压缩、色彩空间等,
等等为了测试这个
与您的虚拟系统的应用程序
需要提供对您的直接访问
虚拟化操作系统内的 USB 端口
并安装适合您的驱动程序
在那里捕获设备,就像在真实的环境中一样
系统。否则 DirectShow 将不会
检测您的设备。
Here is a list of a few verifications that you could do:
to test your application in a clean
system, maybe using some
virtualization software. If you need
to support Win XP, it will be a good
idea to test it there too, since
there are a few DirectShow filters
that are only available in Win Vista
and later.
them might be provided by Windows.
Those that are not, you must provide
them and register them in the target
system during the installation
process of your application. I would
recommend in this case creating an
installation project from visual
studio and attach all your
dependencies dlls there. For a manual
installation you can copy your
filters to your application's folder
and register them using
regsvr32
from command line.filtername.ax
care of is compatibility with 64 bits
versions of Windows, since you cannot
use filters built for 32bit native
mode from a 64 bit applications. If
your application was developped in
.net and it was built using
AnyCPU
mode, the .net JIT will create 64 bit
code from it and your 32 bit dlls
will fail to load. So if you are
using 32 bits dlls I would recommend
building your .net application with
CPU Type = X86. You can set this mode
in your project configuration in
Visual Studio.
created, you may also need to install
Visual c++ redistributable files.
That is certainly a
problem, you cannot create a graph
without a source filter AND a
destination filter. The source filter
will in general determine the content
format, compression, color space etc,
etc. In order to test this
application with a virtual system you
need to provide direct access to your
USB ports inside the virtualized OS
and install the drivers for your
capture devices there, as in a real
system. Otherwise DirectShow will not
detect your device(s).