Reputation: 106
I have created an opencv module on java for kurento based on a tested program i did, it's recognized and loaded in kms correctly and now i'm trying to test it. My idea was using the Magic Mirror example and substitute the call of the faceoverlayfilter with my plugin call so i included it in the pom.xml file dependencies and made this changes in the MagicMirrorHandler.java:
import org.kurento.module.fotoacceso3.*;
//import org.kurento.client.FaceOverlayFilter;
...
// // Media logic
// FaceOverlayFilter faceOverlayFilter = new FaceOverlayFilter.Builder(pipeline).build();
//
// String appServerUrl = System.getProperty("app.server.url",
// MagicMirrorApp.DEFAULT_APP_SERVER_URL);
// faceOverlayFilter.setOverlayedImage(appServerUrl + "/img/mario-wings.png", -0.35F, -1.2F,
// 1.6F, 1.6F);
//
// webRtcEndpoint.connect(faceOverlayFilter);
// faceOverlayFilter.connect(webRtcEndpoint);
fotoacceso3 fotoacceso3 = new fotoacceso3.Builder(pipeline).build();
String appServerUrl = System.getProperty("app.server.url",
MagicMirrorApp.DEFAULT_APP_SERVER_URL);
// faceOverlayFilter.setOverlayedImage(appServerUrl + "/img/mario-wings.png", -0.35F, -1.2F,
// 1.6F, 1.6F);
webRtcEndpoint.connect(fotoacceso3);
fotoacceso3.connect(webRtcEndpoint);
When i run the code it doesn't gives error and shows the two videos but the module doesn't do anything. I have very little experience with Java, what can i do to check where is the problem?
Upvotes: 0
Views: 196
Reputation: 106
The problem was that, although i didn't used capital letters when i created my plugin, when the Java code code was generated the functions were created with capital letters, so to call the plugin i have to make this change in my code from this:
fotoacceso3 fotoacceso3 = new fotoacceso3.Builder(pipeline).build();
To this:
Fotoacceso3 fotoacceso3 = new Fotoacceso3.Builder(pipeline).build();
Upvotes: 0