adityashimoga / gstreamer-java

Automatically exported from code.google.com/p/gstreamer-java
0 stars 0 forks source link

ClassCastException: BaseSrc cannot be cast to AppSrc #78

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
I create the pipeline:
pipeline = Pipeline.launch("appsrc name=appsrc ! mpeg4videoparse ! ffdec_mpeg4 
! textoverlay name=text ! ffmpegcolorspace ! capsfilter name=outfilter");
Then I try to set some properties to appsrc element:

AppSrc appSrc = (AppSrc)pipeline.getElementByName("appsrc");

This leads to ClassCastException:
Exception in thread "main" java.lang.ClassCastException: 
org.gstreamer.elements.BaseSrc cannot be cast to org.gstreamer.elements.AppSrc

But accordingly to the pipeline description the appSrc object must be of class 
AppSrc.

Software:
gstreamer-java 1.4
gstreamer 0.10.34
Ubuntu 10.04.

Original issue reported on code.google.com by xxxi...@rambler.ru on 29 Jun 2011 at 8:49

GoogleCodeExporter commented 9 years ago
what's the appsrc? if you create it in this way then it'd have to installed to 
the system. so it's not mapped to the java AppSrc.
if you create a java AppSrc and link it to the other elements then this case 
should have to work.

Original comment by lfar...@lfarkas.org on 29 Jun 2011 at 8:58