Render camera preview in Chrome using Native Client SDK

允我心安 提交于 2019-12-12 04:57:33

问题


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?


回答1:


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



来源:https://stackoverflow.com/questions/25746675/render-camera-preview-in-chrome-using-native-client-sdk

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!