Package org.gstreamer

Examples of org.gstreamer.Bin$ELEMENT_REMOVED


        Element decodeQueue = ElementFactory.make("queue", "Decode Queue");
        pipe.addMany(src, decodeQueue, decodeBin);
        Element.linkMany(src, decodeQueue, decodeBin);

        /* create audio output */
        final Bin audioBin = new Bin("Audio Bin");

        Element conv = ElementFactory.make("audioconvert", "Audio Convert");
        Element resample = ElementFactory.make("audioresample", "Audio Resample");
        Element sink = ElementFactory.make("autoaudiosink", "sink");
        audioBin.addMany(conv, resample, sink);
        Element.linkMany(conv, resample, sink);
        audioBin.addPad(new GhostPad("sink", conv.getStaticPad("sink")));
        pipe.add(audioBin);
       
        decodeBin.connect(new DecodeBin2.NEW_DECODED_PAD() {
            public void newDecodedPad(DecodeBin2 elem, Pad pad, boolean last) {
               
                /* only link once */
                if (pad.isLinked()) {
                    return;
                }
                /* check media type */
                Caps caps = pad.getCaps();
                Structure struct = caps.getStructure(0);
                if (struct.getName().startsWith("audio/")) {
                    System.out.println("Linking audio pad: " + struct.getName());
                    pad.link(audioBin.getStaticPad("sink"));
                } else if (struct.getName().startsWith("video/")) {
                    System.out.println("Linking video pad: " + struct.getName());
                    pad.link(videoComponent.getElement().getStaticPad("sink"));
                   
                    // Make the video frame visible
View Full Code Here


        Pipeline pipe = new Pipeline("main pipeline");
        pipe.addMany(src, decodeBin);
        src.link(decodeBin);
       
        /* create audio output */
        final Bin audioBin = new Bin("Audio Bin");
       
        Element conv = ElementFactory.make("audioconvert", "Audio Convert");
        Element sink = ElementFactory.make("autoaudiosink", "sink");
        audioBin.addMany(conv, sink);
        Element.linkMany(conv, sink);       
        audioBin.addPad(new GhostPad("sink", conv.getStaticPad("sink")));
       
        pipe.add(audioBin);

        decodeBin.connect(new DecodeBin2.NEW_DECODED_PAD() {
            public void newDecodedPad(DecodeBin2 elem, Pad pad, boolean last) {
                  /* only link once */
                Pad audioPad = audioBin.getStaticPad("sink");
                if (pad.isLinked()) {
                    return;
                }
 
                /* check media type */
 
View Full Code Here

        Pipeline pipe = new Pipeline("main pipeline");
        pipe.addMany(src, decodeBin);
        src.link(decodeBin);
       
        /* create audio output */
        final Bin audioBin = new Bin("Audio Bin");
       
        Element conv = ElementFactory.make("audioconvert", "Audio Convert");
        Element sink = ElementFactory.make("autoaudiosink", "sink");
        audioBin.addMany(conv, sink);
        Element.linkMany(conv, sink);       
        audioBin.addPad(new GhostPad("sink", conv.getStaticPad("sink")));
       
        pipe.add(audioBin);

        decodeBin.connect(new DecodeBin2.NEW_DECODED_PAD() {
            public void newDecodedPad(DecodeBin2 elem, Pad pad, boolean last) {
                System.out.println("newDecodedPad");
                  /* only link once */
                Pad audioPad = audioBin.getStaticPad("sink");
                if (pad.isLinked()) {
                    return;
                }
 
                /* check media type */
 
View Full Code Here

TOP

Related Classes of org.gstreamer.Bin$ELEMENT_REMOVED

Copyright © 2018 www.massapicom. 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.