通过编程访问DirectShow中的视频设备 [英] access to the video devices in directshow by programming

查看:155
本文介绍了通过编程访问DirectShow中的视频设备的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好,我正在编写DirectShow并编写了enumvideodevices函数,以枚举连接到计算机的所有视频设备,但不幸的是,它指向第一个设备,但是我需要使用第二个设备,我该怎么办?

Hi, i am programming directshow and wrote enumvideodevices function to enumerate all video devices that are connected to the computer but unfortunately it points to the first device but i need to work with the second device, what should i do?

推荐答案

最好是发布一些代码来向我们展示您当前如何获得第一台视频设备.尽管有一个项目可以使DirectShow在.Net中工作.在此页面上查看问题8(我可以同时使用多个视频设备吗?"),该页面显示如何与额外的视频设备一起使用,至少要使用该库(如果您正在寻找的话,可以下载其代码并查看它们如何实现对DirectShow的调用).
It would be best if you posted some code to show us how you''re currently getting the first video device. Although there is a project to get DirectShow working in .Net. Look at question 8 ("can I work with multiple video devices at the same time?") on this page, which shows how you would work with extra video devices, at least using that library (if that''s what you''re looking for, you could download their code and see how they implement that call to DirectShow).


是的,有一个函数或代码行可以计算连接到计算机的所有摄像机.我使用了它,当然也更改了它以与我的项目一起使用.但它有一个问题,那就是每次您使用此代码时,它将最后一个视频设备绑定到该程序.尽管它具有某些功能,但它是我能找到的最好的!!
如果您愿意,我可以在这里发布.
yes there is a function or lines of code to calculate all camera which are connected to the computer. i used it and of course changed it to work with my project. but it has a problem and it is that each time you use this code it binds the last video device to the program. although it suffers from some capability but it the best that i could find!!!.

if you want i can post it here.


这篇关于通过编程访问DirectShow中的视频设备的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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