问题
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