问题
What I Did:
I downloaded the updated opencv_plugin-sample from the https://github.com/Kurento/kms-opencv-plugin-sample.
Run the cmakelist using the cmake-gui and generated the so using
sudo make install
The so is generated in the path
usr/local/lib/x86_64-linux-gnu/kurento/modules
From the js folderin the kms-opencv-plugin-sample,i run the command
cmake .. -DGENERATE_JS_CLIENT_PROJECT=TRUE
To generate the "kurento-module-opencvpluginsample.min.js", "kurento-module-opencvpluginsample.map" file i installed grunt in the js folder,using the command
npm install grunt grunt-browserify grunt-contrib-clean grunt-jsdoc grunt-npm2bower-sync minifyify
A dist folder is generated which contain the file("kurento-module-opencvpluginsample.min.js", "kurento-module-opencvpluginsample.map","kurento-module-opencvpluginsample.js")
I created a folder for kms-opencv-client and copied all the files from the kurento-crowddetector folder from the link https://github.com/Kurento/kurento-tutorial-js
In the kms-opencv-client ,inside bower-component,I replaced the kurento-crowddetector-module with the opencv-plugin-sample-module which contains the js generated from step:6
Also changed the js path in the index.html and also replaced the module name in index.js
I started the Kurento media server and and also http server
When i loaded the page from the browser
http://10.10.1.3:8080/index.html?ws_uri=ws://10.10.1.3:8888/kurento#
When i click the start button,the following error occurs
SyntaxError: Module 'opencvpluginsample' is not installed in the Kurento Media Server
Did i miss anything in the opencv-plugin instalation process
回答1:
The problem is that js client is trying to check all modules that you require and it seems that this module is not installed correctly in kurento mediaserver.
You say that you generated the .so file, but you also need to let mediaeserver load it. For this, you have three options:
- Install it at /usr/lib/x86_64-linux-gnu/kurento/modules/
- Edit /etc/default/kurento and add KURENTO_MODULES_PATH variable to indicate the directory where your so file is loaded
- Indicate the installation directory to cmake correctly by executing:
cmake .. -DCMAKE_INSTALL_PREFIX=/usr && make && sudo make install
Once this is done, the kms logs should show that the module is being loaded.
来源:https://stackoverflow.com/questions/36005376/module-opencvpluginsample-is-not-installed-in-the-kurento-media-server