使用Native Client SDK在Chrome中渲染相机预览 [英] Render camera preview in Chrome using Native Client SDK

查看:218
本文介绍了使用Native Client SDK在Chrome中渲染相机预览的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用网络摄像头(显示预览和写入文件)在Chrome中书写 ppapi插件。我用 pepper_35 安装了NaCl sdk。
在/ examples / api / folder: media_stream_audio media_stream_video 中有可用的示例。



音频示例工作正常 - 请求访问麦克风并显示某种预览。



media_stream_video示例必须显示网络相机视频预览,但是当我在本地网络服务器上加载示例时(使用 make serve 命令),会显示红色矩形, Chrome要求使用网络摄像头。当我点击允许 - 网络摄像头指示灯,铬显示网页使用网络摄像头,我看到相机设置图标。



我在Windows 8.1,Windows 7和Mac OS X上使用五个不同的网络摄像头进行了检查,

解决方案



可能有人遇到过同样的问题吗? / div>

安装pepper_37(dev)版本的NaCl SDK解决了这个问题。看起来它是目前不稳定的版本,但它的工作原理。


I'm trying to write ppapi plugin for Chrome which will use webcam (show preview and write file). I have installed NaCl sdk with pepper_35. There available examples in /examples/api/ folder: media_stream_audio and media_stream_video.

The audio example works fine - requests access to microphone and shows some kind of preview.

The "media_stream_video" example must show web-camera video preview, but when I load example on the local web server (with make serve command), there appears red rect, and Chrome asks for the web camera access. When I click "allow" - webcam indicator lights-up, chrome show that web page uses the web camera, and I see the camera settings icon. But the preview doesn't work, there still red rectangle instead.

I checked this on Windows 8.1, Windows 7 and Mac OS X, with five different webcams, and have no idea what can be wrong.

Maybe someone already encountered with the same problem?

解决方案

Installing the pepper_37(dev) version of NaCl SDK solved the problem. Looks like it is unstable version currently, but it works.

这篇关于使用Native Client SDK在Chrome中渲染相机预览的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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