google-nativeclient

Module Load Progress Events in NaCl with manifest_version = 2 and no inline javascript

做~自己de王妃 提交于 2019-12-24 15:23:57
问题 I upgraded my manifest_version to "2" as per this document, and then was suprised to see chrome burping up errors like: Refused to execute inline script because it violates the following Content Security Policy directive While it is clear why they would do this, I am now unclear how i should be managing Module load progress events. Even if i ratchet it to the latest (dev) pepper release, the documentation is still recommending an inline script (which obviously doesn't work). I am a bit

Parallel port access using Google native Client (NaCl)

北城以北 提交于 2019-12-24 02:30:47
问题 I am trying to write a Chrome app that would support printing to old printers connected to the computer via the parallel port. I found out that Chrome apps can not use any kind of NPAPI plugins so those are out of the question. The remaining option seems to be NaCl or PPAPI plugin. But does PPAPI or pepper or NaCl (I am not very familiar with any of them and am probably using them in the wrong context) support access to the parallel port? Can a PPAPI plugin be written, which supports parallel

avformat_open_input return value, error code on NaCl Module

十年热恋 提交于 2019-12-23 10:03:43
问题 I'm trying to port FFmpeg into my NaCl module. So far, my module linked ffmpeg and SDL libraries. It already can play YUV format video which is directed load into memory and copy into YUVOverlay buffer (it's very easy). Now, I want to use ffmpeg to decode video, but when I call the function avformat_open_input it returns -5 when input is URL string , such as rtmp:// or mmsh:// ; it returns -1052488119 when input is file name , such as /saved/tmp (I mount the file system - html5fs). There are

HTTP POST request with Google's C++ Native Client

柔情痞子 提交于 2019-12-22 10:52:03
问题 How would one perform a HTTP POST request with Google's C++ Native Client? 回答1: This question was asked a long time ago, but just in case anyone else is wondering the same thing: You can use pp::URLRequstInfo::SetMethod to do a POST request. And you can add data to the post using pp::URLRequestInfo::AppendDataToBody, pp::URLRequestInfo::AppendFileRangeToBody or pp::URLRequestInfo::AppendFileToBody. See an example of using URLLoader class here: https://developers.google.com/native-client

Google Native Client, sending binary data from NACL to the frontend

微笑、不失礼 提交于 2019-12-22 04:19:08
问题 How do I send binary data, e.g. mp3/mp4 data back to the frontend ? I know there are two ways of doing it: utilizing the sandbox filesystem provided by NACL and get the url at the frontend; passing the data through the PostMessage() using VarArrayBuffer . It would be great if someone could give me a simple example of how to pass the binary data through PostMessage() . There is a Pong example for NACl FileSystem API but I 'm kind of confused on how to retrieve the file location as url so that

Can't get NaCl C++ module to load file from within packaged app

牧云@^-^@ 提交于 2019-12-21 16:56:51
问题 I have a chrome packaged app that also includes a PNaCl/NaCl C++ module, as well as some data files which the NaCl module needs to read in. However, I am not able to get it to read in the files. I set it up according to all the documentation and official examples that I could find, as well as the answer to: How to include a data file in a chrome app for a native client module to read The nacl_io demo that comes with the SDK is able to do this, but it is in C, not C++. I came up with a simple

Native Client application vs shared libraries (e.g.security) updates?

微笑、不失礼 提交于 2019-12-13 18:54:16
问题 In traditional model, when program does dynamic linking of shared library, than - as one of side effects - it, usually does not have to care about updates, as when new version (let's say with security or performance fix) comes, it's updated (by some kind of package manager on some Uhix or sth equivalent on Windows), and application can benefit on next run from new version. In such process, application maintainer does not have to perform any steps, in order for his/her users to benefit from

how to use CORS mechanism in native client

爱⌒轻易说出口 提交于 2019-12-13 03:16:54
问题 For example,I hava a pnacl myapp.pexe , And my website is www.A.com . and myapp.pexe and www.A.com are on the same server. However, the website www.B.com need to access the myapp.pexe. And i got a error, Native Client: access to manifest url was denied . Using CORS can slove this problem? If using CORS can slove this problem, how to do ? 回答1: This answer is not Native Client specific. Accessing Native Client resources from another origin uses the standard CORS mechanism. To answer your

How to use ported library in NaCl module?

谁都会走 提交于 2019-12-13 00:34:11
问题 I want to use openssl library in my NaCl module. Luckily it is ported already as in https://code.google.com/p/naclports/. However, its kind of pity but I don't know how to add the library to the toolchain. I did as instructed in the Readme file: ...nacl_sdk/pepper_33/naclports/src$ python build_tools/naclports.py install openssl Already installed 'openssl' [x86_64/newlib] And then I tried to compile this simple C code, and the compiler complaint some errors which are because of linking

FFmpeg NaCl module avformat_open_input (on rtsp stream) returns -5: I/O error

試著忘記壹切 提交于 2019-12-12 19:23:36
问题 I want to create an RTSP player in Chrome PNaCl. I have successfully built the ffmpeg naclport including the following networking flags in the build.sh file for the ffmpeg NaCl port. --enable network --enable-protocols --enable-demuxer=rtsp --enable-demux=rtp --enable-demuxer=sdp --enable-decoder=h264 Furthermore, I have successfully coded and the linked the ffmpeg NaCl port in my own PNaCl module. I have included the following network permissions in the manifest.json file: "permissions": [ {