GStreamer and JAVA

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

GStreamer and JAVA

Nicolas Castillejos
Hi,

I'm trying to make a java application that reads a ".m4v" file in a
JFrame using the SimpleVideoComponent class from the gstreamer examples.
But my problem is that I can only watch the first picture of the video,
however the sound is working great.

look at my code :

EventQueue.invokeLater(new Runnable() {

             @Override
             public void run() {
                 vc = new SimpleVideoComponent();
                 bin = new PlayBin("VideoPlayer");

                 bin.setInputFile(new File("./test.m4v"));

                 f.add(vc);
                 vc.setPreferredSize(new Dimension(320, 240));

                 bin.setVideoSink(vc.getElement());
                 bin.play();

                 f.pack();
                 f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
                 f.setVisible(true);

             }
         });

When i comment this line : bin.setVideoSink(vc.getElement());
the video is playing great in an other frame called "internal frame"
but when I want to play in my own frame inside the SimpleVideoComponent
it shows only the first picture.

The method newBuffer() in the AppSinkListener of the
SimpleVideoComponent class is called only once.
And I don't know why...

Do you have an idea to help me resolve this ?

Thank you,

Nicolas
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: GStreamer and JAVA

Nicolas Castillejos
Hi,

is it possible to set a parameter value of internal element of the
playbin pipeline ?

For example I'm reading a rtsp stream with Playbin.
I know that playbin , internally will use rtspsrc in is internal pipeline.
I would like to set parameter of the rtspsrc element ?

If I could access this element by parsing the playbin hierarchy I would
not ask the question,
but it's not possible, you can only see GstPlaybin Element... and not
what is inside.

Do you know a way  to do this ?

Thank you,

Nicolas Castillejos



_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: GStreamer and JAVA

Sebastian Dröge-3
On Di, 2016-05-31 at 15:27 +0200, Nicolas Castillejos wrote:
> Hi,
>
> is it possible to set a parameter value of internal element of the 
> playbin pipeline ?
>
> For example I'm reading a rtsp stream with Playbin.
> I know that playbin , internally will use rtspsrc in is internal pipeline.
> I would like to set parameter of the rtspsrc element ?

Use the source-setup signal on playbin. You will get the rtspsrc there
and can set any properties you want on it then before it is actually
started.

> If I could access this element by parsing the playbin hierarchy I would 
> not ask the question,
> but it's not possible, you can only see GstPlaybin Element... and not 
> what is inside.

You can use the GstBin API to look at all elements that are inside the
playbin for the general case, and since 1.9/1.10 there is also the
deep-element-added signal that will allow you to listen for elements
being added.

--
Sebastian Dröge, Centricular Ltd · http://www.centricular.com

_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel

signature.asc (968 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: GStreamer and JAVA

shrutis
In reply to this post by Nicolas Castillejos
 If anyone is interested in learning Java then, you can enroll in one of the best Java classes in Mumbai which is provided by a very renowned institute, SevenMentor. It is considered one of the best training providers in Pune.