How to pass extra parameter in to kms plugin

我只是一个虾纸丫 提交于 2019-12-22 12:22:22

问题


What i do:

1.I generated so for the kms-opencv-plugin-sample(using link https://github.com/Kurento/kms-opencv-plugin-sample.)

2.To call the opencv-plugin from client-js,i modified crowddetector-client-js "https://github.com/Kurento/kurento-tutorial-js/tree/master/kurento-crowddetecto‌​r"(renamed the folder name to kurento-module-opencvpluginsample).

3.Modification i have done:

   1.Updated the opencv js file path in the index.html 
   2.Replaced the "kurento-module-crowddetector" to "kurento-module-opencvpluginsample"(with the newly generated JS files) 
   3.Modified the module name in the index.js 
   4.Removed the old reference to crowddetector.

4.I started the "KurentoMediaServer" and then "http-server",load the page in browser

  http://10.10.1.3:8080/index.html?ws_uri=ws://10.10.1.3:8888/kurento#

5.It works successsfully.

6.Also i tried with replace the opencv face detection code with the default given code in opencv-plugin-sample,It also works.

What i need to know:

1.What i need to do,if i want to add extra arguments in the process()?

2.What i have to do if i want to add another method in the cpp?


回答1:


Process method cannot be be modified, you need to have object attributes modified by properties or methods in kmd.json file. This way an API is created that can be accessed from remote clients.

Just modify kmd.json, this will generate the basic stub in c++. Solve compilation issues and then use this properties according to your needs.

See how this method works in example filter. The same can be also done with properties instead of methods.



来源:https://stackoverflow.com/questions/36015747/how-to-pass-extra-parameter-in-to-kms-plugin

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