如果检测摄像头捕获在Flash [英] Detect if camera is capturing in Flash

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

问题描述

我在使用Camera.getCamera()在Flash AS3麻烦。如果有多个照相机驱动程序,它不一定挑正确的。如果默认是正确的,该程序能正常工作;但是,如果另一个驱动程序中选择作为默认然后在网络摄像头指示灯不亮,没有视频捕捉。 我可以循环使用凸轮和选择的任意一个。我不这样做,但是,知道如何确定所选择的相机是正确的。它不是返回null。我考虑过使用camera.currentFPS,但目前还不清楚这时候得到更新。我真的很挣扎动态,以确定哪些相机会做的伎俩!

I'm having trouble with Camera.getCamera() in Flash AS3. If there are multiple camera drivers, it does not necessarily pick the correct one. If the default is the correct, the program works fine; however, if another driver is selected as the default then LED on the webcam does not come on and no video is captured. I can cycle through the available cams and select an arbitrary one. I don't, however, know how to determine if the selected camera is correct. It is not returning null. I considered using camera.currentFPS, but it's not clear when this gets updated. I'm really struggling to determine dynamically which camera will do the trick!

推荐答案

看看这个博客文章 ,也可能是使用的你想要做的事情。

Check out this blog post, it could be of use for what you're trying to do.

我的记住我使用这个类前一阵子,因为有问题的应用程序,我正在检测的Mac正确的网络摄像头。从来没有经历过这种问题适用于Windows或Linux,但。

I remeber I used this class a while ago, because there were problems detecting the right webcam in Macs in an app I was working on. Never experienced this problem for Windows or Linux, though.

我是一个相当紧迫的话,所以我并没有真正研究不多的主题。我记得这个code有一些问题,一些内置的摄像头在运行Windows的笔记本电脑。最后我只检查 flash.system.Capabilities.os 来检测客户端是否是Mac还是不行。对于苹果机,我用code在这个班,因为是。对于一切,我只是检测到相机的正规途径(即获取默认的摄像头)。它正常工作在我们所有的测试,因为时间很短,这能够解决这一问题。

I was on a rather tight deadline then, so I didn't really investigate much about the subject. I remember this code had some problems with some built-in cameras in laptops running Windows. I ended up just checking flash.system.Capabilities.os to detect whether the client was a Mac or not. For Macs, I used the code in this class, as is. For everything else, I just detected the camera the "regular way" (i.e., getting the default camera). It worked fine in all our tests, and since time was short, that settled it.

说实话,虽然我不知道,如果它涵盖了某个角落的情况。您可能要检查,但希望这会给你至少有一些指针 - 如果没有一个解决方案

To be honest, though, I'm not sure if it covers some corner cases. You might want to check that, but hopefully, this will give you at least some pointers -- if not a solution.

希望这有助于。

这篇关于如果检测摄像头捕获在Flash的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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