Making a Java InputStream Video Player

Nicolas Castillejos djos06 at gmail.com
Fri Jul 1 14:55:05 UTC 2016


Ok I've found a solution !

But I don't know why I have to do this to get it work, if you could 
explain me, it would be great !
This is the modification I've made to get it Work :

1) setLive(true) on the AppSrc
2) Listen Bus messages : when the Video Bin Element State goes to 
GST_STATE_PAUSED , I do a "pipe.pause();" then "pipe.play();"

And the video start !!

For me it looks like a hack ... why do I have to do this ?


Le 01/07/2016 à 14:07, Nicolas Castillejos a écrit :
> Hi,
>
> I'm trying to make a Java Video Player that can load a source from a 
> Java InputStream.
> To do this, I'm using the gstreamer-java bindings.
> My technique is to make an AppSrc that I put at the start of the 
> pipeline, then I feed the buffer of the AppSrc with the bytes I read 
> on the Java InputStream.
>
> My problem is that I can only see the first picture of the video I try 
> to read ( it's a .m4v file that I use for my tests).
> I really don't know what is the problem.
>
> You can find a zip at this address : 
> http://nicolas.castillejos.free.fr/InputStreamJavaPlayer.zip
>
> It contains :
>
> - the java source code of my InputStreamJavaPlayer that contains a 
> simple main() method to test it.
> - a .m4v file that I use for my test.
> - the Debug log file
> - the Graph (.png file) of my pipeline.
>
> If somebody could look at it and maybe test it , to see if there is a 
> problem in my pipeline construction or something, I would be very 
> grateful.
>
> Thank you,
>
> Nicolas Castillejos
>
> *Versions Info :*
>
> GStreamer Version : 1.6.4
> Java Binding : latest version (26 April) on 
> https://github.com/gstreamer-java/gst1-java-core
> Java Version : 1.8.0_60




More information about the gstreamer-devel mailing list