ProtocolException in getChildren()

三世轮回 提交于 2020-01-03 06:49:08

问题


When I try to call getChildren() on the mediapipeline which has my custom module endpoint running in it I'm getting this exception:

org.kurento.client.internal.server.ProtocolException: Exception creating Java Class for mycustomfilter.MyCustomFilter

This is the code which triggers it:

List<MediaObject> mediaObjects = pipelines.get(i).getChildren();

Do I have to cast the List<MediaObject> to some other data type?


回答1:


When you create a custom media element for KMS, you can also create the client API for Java and JavaScript (see doc here). In your case, you need to create the Java client for your filter, as follows:

cmake .. -DGENERATE_JAVA_CLIENT_PROJECT=TRUE

The resulting Java classes (package mycustomfilter.MyCustomFilter in your example) should be in the classpath of the project which calls to getChildren() (internally it calls to Class.forName, see code here).




回答2:


Could you try this?

List<MediaObject> mediaObjects = new ArrayList<MediaObject>(Arrays.asList(pipelines.get(i).getChildren()));


来源:https://stackoverflow.com/questions/41919022/protocolexception-in-getchildren

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