Victor du Mesnil du Buisson
2018-06-12 11:47:40 UTC
I'm trying to create a node interface for a c++ media player. Upon decoding
of a frame, there is an event which allows me to access the frame data,
which I'm trying to funnel into node. But I can't seem to figure out how to
get that kind of functionality to work with the functions available in the
node api <https://nodejs.org/api/n-api.html>. My approach, for the time
being, is to figure out a push mechanism to get the data from c++ to
javascript where all i need is to initialize a callback in javascript,
since it seems more elegant. If that fails I could create a polling loop in
js to check if there is new frame data, but it seems less efficient.
I've tried with napi_create_async_work
<https://nodejs.org/api/n-api.html#n_api_napi_create_async_work>, by
creating a lambda function in the execute parameter function, which would
allow me to call napi_make_callback
<https://nodejs.org/api/n-api.html#n_api_napi_make_callback> for every
frame callback, but then I get the following error :
Fatal error in HandleScope::HandleScopeEntering the V8 API without proper locking in place
I'm likely approaching this incorrectly, its the first time I use n-api.
Any help is welcome, thank you!
--
Job board: http://jobs.nodejs.org/
New group rules: https://gist.github.com/othiym23/9886289#file-moderation-policy-md
Old group rules: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
---
You received this message because you are subscribed to the Google Groups "nodejs" group.
To unsubscribe from this group and stop receiving emails from it, send an email to nodejs+***@googlegroups.com.
To post to this group, send email to ***@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/nodejs/c38a453a-8ed2-46a2-b4a1-660d8587b649%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
of a frame, there is an event which allows me to access the frame data,
which I'm trying to funnel into node. But I can't seem to figure out how to
get that kind of functionality to work with the functions available in the
node api <https://nodejs.org/api/n-api.html>. My approach, for the time
being, is to figure out a push mechanism to get the data from c++ to
javascript where all i need is to initialize a callback in javascript,
since it seems more elegant. If that fails I could create a polling loop in
js to check if there is new frame data, but it seems less efficient.
I've tried with napi_create_async_work
<https://nodejs.org/api/n-api.html#n_api_napi_create_async_work>, by
creating a lambda function in the execute parameter function, which would
allow me to call napi_make_callback
<https://nodejs.org/api/n-api.html#n_api_napi_make_callback> for every
frame callback, but then I get the following error :
Fatal error in HandleScope::HandleScopeEntering the V8 API without proper locking in place
I'm likely approaching this incorrectly, its the first time I use n-api.
Any help is welcome, thank you!
--
Job board: http://jobs.nodejs.org/
New group rules: https://gist.github.com/othiym23/9886289#file-moderation-policy-md
Old group rules: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
---
You received this message because you are subscribed to the Google Groups "nodejs" group.
To unsubscribe from this group and stop receiving emails from it, send an email to nodejs+***@googlegroups.com.
To post to this group, send email to ***@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/nodejs/c38a453a-8ed2-46a2-b4a1-660d8587b649%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.