Examples of Pipeline


Examples of org.gstreamer.Pipeline

    public TypeFindTest() {
    }
    public static void main(String[] args) {
        args = Gst.init("TypeFind Test", args);
        /* create elements */
        Pipeline pipeline = new Pipeline("my_pipeline");
        Element source = ElementFactory.make("filesrc", "source");
        source.set("location", args[0]);
        TypeFind typefind = new TypeFind("typefinder");
       
        /* you would normally check that the elements were created properly */
       
        /* put together a pipeline */
        pipeline.addMany(source, typefind);
        Element.linkMany(source, typefind);
       
        /* listen for types found */
        typefind.connect(new TypeFind.HAVE_TYPE() {

            public void typeFound(Element elem, int probability, Caps caps) {
                System.out.printf("New type found: probability=%d caps=%s\n",
                        probability, caps.toString());
            }
        });
       
        /* start the pipeline */
        pipeline.play();
       
        Gst.main();
    }
View Full Code Here

Examples of org.gstreamer.Pipeline

/**
* Test consequtive Gst.main/Gst.quit call sequences
*/
public class DoubleQuit {
    private static Pipeline makePipe() {
        Pipeline pipe = new Pipeline("AudioPanorama");

        Element src = ElementFactory.make("audiotestsrc", "src");
        src.set("wave", 2);
        Element convert = ElementFactory.make("audioconvert", "convert");
        Element sink = ElementFactory.make("fakesink", "sink");
        pipe.addMany(src, convert, sink);
        Element.linkMany(src, convert, sink);
        return pipe;
    }
View Full Code Here

Examples of org.gstreamer.Pipeline

        // line flags it is interested in.
        //
        args = Gst.init("DoubleQuit", args);
       
        for (int i = 0; i < 2; ++i) {
            Pipeline pipe = makePipe();
            Gst.getScheduledExecutorService().schedule(new Runnable() {

                public void run() {
                    Gst.quit();
                }
            }, 1, TimeUnit.SECONDS);
            // Start the pipeline playing
            pipe.play();
            System.out.println("Running main loop " + i);
            Gst.main();
            // Clean up (gstreamer requires elements to be in State.NULL before disposal)
            pipe.stop();
        }
    }
View Full Code Here

Examples of org.gstreamer.Pipeline

                    };
                    player.setPreferredSize(new Dimension(400, 250));
                    player.setControlsVisible(true);
                    player.setOpaque(false);
                    player.setOpacity(alpha);
                    Pipeline pipe = player.getMediaPlayer().getPipeline();
                    if (pipe instanceof PlayBin2) {
                        ((PlayBin2) pipe).setAudioSink(ElementFactory.make("fakesink", "audio"));
                    }
                   
                    frame.setOpaque(false);
View Full Code Here

Examples of org.jboss.aerogear.android.Pipeline

        };

        PipeConfig config = new PipeConfig(url, MultipartRequestBuilderTest.MultiPartData.class);
        config.setRequestBuilder(new MultipartRequestBuilder<MultipartRequestBuilderTest.MultiPartData>());

        Pipeline pipeline = new Pipeline(url);
        Pipe<MultipartRequestBuilderTest.MultiPartData> restPipe = pipeline.pipe(MultipartRequestBuilderTest.MultiPartData.class, config);
        org.junit.Assert.assertEquals(MultipartRequestBuilder.class, restPipe.getRequestBuilder().getClass());

        Object restRunner = UnitTestUtils.getPrivateField(restPipe, "restRunner");
        UnitTestUtils.setPrivateField(restRunner, "httpProviderFactory", new Provider<HttpProvider>() {
            @Override
View Full Code Here

Examples of org.jnode.shell.io.Pipeline

    private CommandIO getOutPipeIO(String name) throws IOException {
        if (parent != null) {
            return parent.getOutPipeIO(name);
        } else {
            Pipeline pipe = pipes.get(name);
            if (pipe == null) {
                pipe = new Pipeline();
                pipes.put(name, pipe);
            }
            return new CommandOutput(pipe.createSource());
        }
    }
View Full Code Here

Examples of org.mule.api.construct.Pipeline

            muleContext.start();

            MuleArtifact artifact = null;
            if (embedInFlow)
            {
                Pipeline pipeline = muleContext.getRegistry().lookupObject(flowName);
                if (pipeline.getMessageSource() == null)
                {
                    if (pipeline.getMessageProcessors() != null && pipeline.getMessageProcessors().size() > 0)
                    {
                        artifact = new DefaultMuleArtifact(pipeline.getMessageProcessors().get(0));
                    }
                    else
                    {
                        throw new IllegalArgumentException("artifact is null");
                    }
                }
                else
                {
                    artifact = new DefaultMuleArtifact(pipeline.getMessageSource());
                }
            }
            else
            {
                artifact = new DefaultMuleArtifact(muleContext.getRegistry().lookupObject(element.getAttribute("name")));
View Full Code Here

Examples of org.openstreetmap.osmosis.core.pipeline.common.Pipeline

   *            The command line arguments.
   */
  public static void run(String[] args) {
    CommandLineParser commandLineParser;
    TaskRegistrar taskRegistrar;
    Pipeline pipeline;
    long startTime;
    long finishTime;
   
    startTime = System.currentTimeMillis();
   
    configureLoggingConsole();
   
    commandLineParser = new CommandLineParser();
   
    // Parse the command line arguments into a consumable form.
    commandLineParser.parse(args);
   
    // Configure the new logging level.
    configureLoggingLevel(commandLineParser.getLogLevelIndex());
   
    LOG.info("Osmosis Version " + OsmosisConstants.VERSION);
    taskRegistrar = new TaskRegistrar();
    taskRegistrar.initialize(commandLineParser.getPlugins());
   
    pipeline = new Pipeline(taskRegistrar.getFactoryRegister());
   
    LOG.info("Preparing pipeline.");
    pipeline.prepare(commandLineParser.getTaskInfoList());
   
    LOG.info("Launching pipeline execution.");
    pipeline.execute();
   
    LOG.info("Pipeline executing, waiting for completion.");
    pipeline.waitForCompletion();
   
    LOG.info("Pipeline complete.");
   
    finishTime = System.currentTimeMillis();
   
View Full Code Here

Examples of org.openxri.pipeline.Pipeline

      private static final long serialVersionUID = 6099999471694144186L;

      @Override
      protected void populateItem(ListItem item) {
       
        Pipeline pipeline = (Pipeline) item.getModelObject();
       
        item.add(new PipelinePanel("pipeline", pipeline));
      }
    });
  }
View Full Code Here

Examples of org.xadoop.xquerymr.Pipeline

      } catch (Exception e) {
      }
    }

    // conf file
    Pipeline pipeline = null;
    HadoopConfFile confFileObj = null;
    if (xqueryengine.equals("zorba")) {
      pipeline = new Pipeline(querytext, XadoopConstants.PIPELINE_MAPPREFIX);
      XQueryMRZorbaConfFile confFileObjTmp = new XQueryMRZorbaConfFile(config);
      confFileObjTmp.setPipeline(pipeline.toString());
      System.out.println(pipeline.toString());
      confFileObjTmp.setQueryFile("/" + FILENAME_QUERY);
      confFileObj = confFileObjTmp;
    } else if (xqueryengine.equals("saxon")){
      pipeline = new Pipeline(querytext, XadoopConstants.SAXON_PIPELINE_MAPPREFIX);
      XQueryMRSaxonConfFile confFileObjTmp = new XQueryMRSaxonConfFile(config);
      confFileObjTmp.setPipeline(pipeline.toString());
      confFileObjTmp.setProlog("/" + FILENAME_QUERY);
     
      confFileObjTmp.setStreamEnabled(streamingEnabled);
     
      confFileObj = confFileObjTmp;
    } else {
      pipeline = new Pipeline(querytext, XadoopConstants.XQUERYMR_PIPELINE_MAPPREFIX);
      XQueryMRConfFile confFileObjTmp = new XQueryMRConfFile();
      confFileObjTmp.setPipeline(pipeline.toString());
      confFileObjTmp.setProlog("/" + FILENAME_QUERY);
      confFileObj = confFileObjTmp;
    }
   
    int numMapTasks = numTasksMap;
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.