如何检测捕获设备的设备名称? [英] How to detect the device name for a capture device?

查看:147
本文介绍了如何检测捕获设备的设备名称?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在写一个GStreamer应用程序(GStreamer在Windows下使用DirectShow)捕获计算机的麦克风和摄像机。它工作正常,但要求我手动指定设备名称。我想让我的程序自动检测这些。

I am writing a GStreamer application (GStreamer uses DirectShow under the hood on Windows) that captures a computer's microphone and videocamera. It works fine, but requires me to specify the device names manually. I would like to have my program detect these automatically. Does anyone know how to do that?

推荐答案

如果GStreamer没有枚举设备的功能,但DirectShow

It would surprise me if GStreamer doesn't have capabilities to enumerate devices, but DirectShow definitely has.

请参阅有关使用系统设备枚举器,并使用正确的 CLSID_AudioInputDeviceCategory 和 CLSID_VideoInputDeviceCategory %29.aspx =nofollow 。

See the article on using the system device enumerator and use it with the correct filter categories - in your case CLSID_AudioInputDeviceCategory and CLSID_VideoInputDeviceCategory.

这篇关于如何检测捕获设备的设备名称?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆