DirectShow.NET - 网络摄像头解析属性页面

时间:2022-03-01 15:59:59

I'm using DirectShow.Net to access my webcam. I want to display a property page for my webcam to set video capture resolution and FPS rate. I try this by using a sample demo code from DirectShow.NET samples - DxPropPages. Here is the code. However second tab in property window is disabled.

我正在使用DirectShow.Net访问我的网络摄像头。我想显示网络摄像头的属性页面,以设置视频捕获分辨率和FPS速率。我通过使用DirectShow.NET示例中的示例演示代码--DxPropPages来尝试此操作。这是代码。但是属性窗口中的第二个选项卡被禁用。

I need this tab to be enabled so user can set a caputre resolution. How I can achieve that? I'm new to DirecShow and don't really know what to change is this demo code.

我需要启用此选项卡,以便用户可以设置caputre分辨率。我怎么能做到这一点?我是DirecShow的新手,并且真的不知道要改变什么是这个演示代码。

PS I wanted to post some screenshots to show you what I mean, but I can't since I'm new user.

PS我想发布一些截图来告诉你我的意思,但我不能,因为我是新用户。

1 个解决方案

#1


You can control the resolution using the IAMStreamConfig interface. This way you can show your own UI and persist the setting. I don't have a specific sample in mind but I know the the net filled with code using it.
All other properties you see in the property pages can also be control (If the web cam supports it), Take a look at this MSDN page for video capture Interfaces all of them supported by DirectShow.NET.

您可以使用IAMStreamConfig接口控制分辨率。这样您就可以显示自己的UI并保留设置。我没有考虑具体的样本,但我知道网上填充了使用它的代码。您在属性页中看到的所有其他属性也可以是控件(如果网络摄像头支持它),请查看此MSDN页面以获取DirectShow.NET支持的所有视频捕获接口。

#1


You can control the resolution using the IAMStreamConfig interface. This way you can show your own UI and persist the setting. I don't have a specific sample in mind but I know the the net filled with code using it.
All other properties you see in the property pages can also be control (If the web cam supports it), Take a look at this MSDN page for video capture Interfaces all of them supported by DirectShow.NET.

您可以使用IAMStreamConfig接口控制分辨率。这样您就可以显示自己的UI并保留设置。我没有考虑具体的样本,但我知道网上填充了使用它的代码。您在属性页中看到的所有其他属性也可以是控件(如果网络摄像头支持它),请查看此MSDN页面以获取DirectShow.NET支持的所有视频捕获接口。