Examples of FakeSink


Examples of org.gstreamer.elements.FakeSink

        // Instead of using a playbin, it would be possible to use a pipe
        // a typefind element and a demux and wire them up manually.
        //
        final PlayBin2 pipe = new PlayBin2(progname);
        pipe.setInputFile(new File(args[0]));
        FakeSink audio = (FakeSink) ElementFactory.make("fakesink", "audio-sink");
        FakeSink video = (FakeSink) ElementFactory.make("fakesink", "video-sink");
        pipe.setAudioSink(audio);
        pipe.setVideoSink(video);
       
        pipe.getBus().connect(new Bus.TAG() {
            public void tagsFound(GstObject source, TagList tagList) {
                for (String tag : tagList.getTagNames()) {
                    System.out.println("Found tag " + tag + " = "
                            + tagList.getValue(tag, 0));
                }
            }
        });
       
        //
        // In theory, an ASYNC_DONE from the pipeline corresponds with the demux
        // completing parsing the media file
        //
        pipe.getBus().connect(new Bus.ASYNC_DONE() {
            public void asyncDone(GstObject source) {
                pipe.stop();
                done.countDown();
            }
        });
        audio.set("signal-handoffs", true);
        video.set("signal-handoffs", true);
       
        //
        // As soon as data starts to flow, it means all tags have been found
        //
        BaseSink.HANDOFF handoff = new BaseSink.HANDOFF() {
            public void handoff(BaseSink sink, Buffer buffer, Pad pad) {
                pipe.stop();
                done.countDown();
            }
        };
        audio.connect(handoff);
        video.connect(handoff);
       
        // Start the pipeline playing
        pipe.pause();
        try {
            done.await();
View Full Code Here

Examples of streamer.debug.FakeSink

        Element bitmap = new ServerBitmapUpdate("bitmap") {
            {
                verbose = true;
            }
        };
        FakeSink fakeSink = new FakeSink("sink") {
            {
                verbose = true;
            }
        };
        Pipeline pipeline = new PipelineImpl("test");
View Full Code Here

Examples of streamer.debug.FakeSink

        RdpState rdpState = new RdpState();
        ScreenDescription screenDescription = new ScreenDescription();

        MockSource source = new MockSource("source", ByteBuffer.convertByteArraysToByteBuffers(packet));
        Element demandActive = new ServerDemandActivePDU("demand_active", screenDescription, rdpState);
        Element sink = new FakeSink("sink");

        Pipeline pipeline = new PipelineImpl("test");
        pipeline.add(source, demandActive, sink);
        pipeline.link("source", "demand_active", "sink");
        pipeline.runMainLoop("source", STDOUT, false, false);
View Full Code Here

Examples of streamer.debug.FakeSink

                incommingBufLength = 3;
                delay = 100;
            }
        };

        Element sink = new FakeSink("sink") {
            {
                verbose = true;
            }
        };
View Full Code Here

Examples of streamer.debug.FakeSink

        InputStreamSource source = new InputStreamSource("source") {
            {
                verbose = true;
            }
        };
        Element fakeSink = new FakeSink("sink") {
            {
                verbose = true;
            }
        };

        Link link = new SyncLink() {
            {
                verbose = true;
            }
        };

        source.setLink(STDOUT, link, Direction.OUT);
        fakeSink.setLink(STDIN, link, Direction.IN);

        source.setInputStream(is);

        link.sendEvent(Event.STREAM_START, Direction.OUT);
        link.run();
View Full Code Here

Examples of streamer.debug.FakeSink

        Pipeline pipeline = new PipelineImpl("test");
        pipeline.add(source1);
        pipeline.add(source2);
        pipeline.add(new Queue("queue"));
        pipeline.add(new FakeSink("sink"));

        // Main flow
        pipeline.link("source1", "in1< queue");
        pipeline.link("source2", "in2< queue");
        pipeline.link("queue", "sink");
View Full Code Here

Examples of streamer.debug.FakeSink

                        // Respond to challenge with AUTH_OK
                        new byte[] {0, 0, 0, RfbConstants.VNC_AUTH_OK});
            }
        };

        Element mainSink = new FakeSink("mainSink");
        final Vnc33Authentication auth = new Vnc33Authentication("auth", password);
        Element initSink = new MockSink("initSink") {
            {
                // Expect encoded password
                bufs = new ByteBuffer[] {auth.encodePassword(new ByteBuffer(new byte[] {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}), password)};
View Full Code Here

Examples of streamer.debug.FakeSink

                        // Respond to challenge with AUTH_OK
                        new byte[] {0, 0, 0, RfbConstants.VNC_AUTH_OK});
            }
        };

        Element mainSink = new FakeSink("mainSink");
        final Vnc_3_3_Authentication auth = new Vnc_3_3_Authentication("auth", password);
        Element initSink = new MockSink("initSink") {
            {
                // Expect encoded password
                bufs = new ByteBuffer[] {auth.encodePassword(new ByteBuffer(new byte[] {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}), password)};
View Full Code Here

Examples of streamer.debug.FakeSink

        Pipeline pipeline = new PipelineImpl("test");
        pipeline.add(source1);
        pipeline.add(source2);
        pipeline.add(new Queue("queue"));
        pipeline.add(new FakeSink("sink"));

        // Main flow
        pipeline.link("source1", "in1< queue");
        pipeline.link("source2", "in2< queue");
        pipeline.link("queue", "sink");
View Full Code Here

Examples of streamer.debug.FakeSink

                this.incommingBufLength = 3;
                this.delay = 100;
            }
        };

        Element sink = new FakeSink("sink") {
            {
                this.verbose = true;
            }
        };
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.