Package org.gstreamer.elements

Examples of org.gstreamer.elements.AppSrc.connect()


                frame.add(panel, BorderLayout.CENTER);
                Element videosink = panel.getElement();
                pipeline.addMany(appsrc, srcfilter, videorate, ratefilter, videosink);
                Element.linkMany(appsrc, srcfilter, videorate, ratefilter, videosink);
                appsrc.set("emit-signals", true);
                appsrc.connect(new AppSrc.NEED_DATA() {
                    byte color = 0;
                    byte[] data = new byte[width * height * 2];
                    public void needData(AppSrc elem, int size) {
                        System.out.println("NEED_DATA: Element=" + elem.getNativeAddress()
                                + " size=" + size);
View Full Code Here


                        Buffer buffer = new Buffer(data.length);
                        buffer.getByteBuffer().put(data);
                appsrc.pushBuffer(buffer);
                    }
                });
                appsrc.connect(new AppSrc.ENOUGH_DATA() {
          public void enoughData(AppSrc elem) {
            System.out.println("NEED_DATA: Element=" + elem.getNativeAddress());
          }
        });
                frame.setSize(640, 480);
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.