Package org.gstreamer

Examples of org.gstreamer.Element$PAD_REMOVED


        sink.connect(new AppSinkNewBufferListener());
       
        //
        // Convert the input into 32bit RGB so it can be fed directly to a BufferedImage
        //
        Element conv = ElementFactory.make("ffmpegcolorspace", "ColorConverter");
        Element videofilter = ElementFactory.make("capsfilter", "ColorFilter");
        StringBuilder caps = new StringBuilder("video/x-raw-rgb, bpp=32, depth=24, endianness=(int)4321, ");
        // JNA creates ByteBuffer using native byte order, set masks according to that.
        if (ByteOrder.nativeOrder() == ByteOrder.LITTLE_ENDIAN)
          caps.append("red_mask=(int)0xFF00, green_mask=(int)0xFF0000, blue_mask=(int)0xFF000000");
        else
          caps.append("red_mask=(int)0xFF0000, green_mask=(int)0xFF00, blue_mask=(int)0xFF");
        videofilter.setCaps(new Caps(caps.toString()));
        addMany(conv, videofilter, sink);
        Element.linkMany(conv, videofilter, sink);

        //
        // Link the ghost pads on the bin to the sink pad on the convertor
View Full Code Here


    public RGBDataAppSink(String name, Pipeline pipeline, Listener listener) {
        super(initializer(gst.ptr_gst_bin_new(name)));
        this.listener = listener;

        Element element = pipeline.getElementByName(name);
        if (element != null) {           
            // TODO: Fix. This doesn't work. getElementByName() returns a BaseSink which
            // cannot be casted to AppSink.
            sink = (AppSink) element;
            sink.set("emit-signals", true);
View Full Code Here

        source.connect(enoughDataListener);

        bufferDispatcher = new BufferDispatcher();
        executor = Gst.getScheduledExecutorService();

        Element formatConverter = ElementFactory.make("ffmpegcolorspace", "formatConverter");
        Element formatFilter = ElementFactory.make("capsfilter", "formatFilter");
        Caps capsFormat = Caps.fromString("video/x-raw-yuv,format=(fourcc)I420,width=" + width + ",height=" + height);
        formatFilter.setCaps(capsFormat);

        Element encoder = ElementFactory.make(encoderStr, "encoder");
        if (encoderPropertyNames != null && encoderPropertyData != null)
        {
            // Setting encoder properties.
            int n0 = encoderPropertyNames.length;
            int n1 = encoderPropertyData.length;
            int n = n0 < n1 ? n0 : n1;
            for (int i = 0; i < n; i++) encoder.set(encoderPropertyNames[i], encoderPropertyData[i]);
        }

        Element muxer = ElementFactory.make(muxerStr, "muxer");

        Element sink = ElementFactory.make("filesink", "sink");
        sink.set("location", file.toString());

        addMany(source, formatConverter, formatFilter, encoder, muxer, sink);
        Element.linkMany(source, formatConverter, formatFilter, encoder, muxer, sink);

        sendingData = false;
View Full Code Here

        sink.connect(new AppSinkNewBufferListener());
       
        //
        // Adding identity element
        //
        Element conv = ElementFactory.make("identity", "Data");       
        addMany(conv, sink);
        Element.linkMany(conv, sink);

        //
        // Link the ghost pads on the bin to the sink pad on the convertor
        //
        addPad(new GhostPad("sink", conv.getStaticPad("sink")));       
    }
View Full Code Here

    public ByteDataAppSink(String name, Pipeline pipeline, Listener listener) {
        super(initializer(gst.ptr_gst_bin_new(name)));
        this.listener = listener;

        Element element = pipeline.getElementByName(name);
        if (element != null) {               
            // TODO: Fix. This doesn't work. getElementByName() returns a BaseSink which
            // cannot be casted to AppSink.
            sink = (AppSink) element;
            sink.set("emit-signals", true);
View Full Code Here

    public BufferDataSink(String name, Pipeline pipeline, Listener listener) {
        super(initializer(gst.ptr_gst_bin_new(name)));
        this.listener = listener;

        Element element = pipeline.getElementByName(name);
        if (element != null) {   
         
            // TODO: Fix. This doesn't work as it should. getElementByName() returns a
            // BaseSink which cannot be casted to FakeSink.
            sink = (BaseSink) element;
View Full Code Here

      sink.connect((BaseSink.PREROLL_HANDOFF) new SinkNewBufferListener());
     
      //
      // Convert the input into 32bit RGB so it can be fed directly to a BufferedImage
      //
      Element conv = ElementFactory.make("ffmpegcolorspace", "ColorConverter");
      Element videofilter = ElementFactory.make("capsfilter", "ColorFilter");
      StringBuilder caps = new StringBuilder("video/x-raw-rgb, bpp=32, depth=24, endianness=(int)4321, ");
      caps.append(mask);
      videofilter.setCaps(new Caps(caps.toString()));
      addMany(conv, videofilter, sink);
      Element.linkMany(conv, videofilter, sink);

      //
      // Link the ghost pads on the bin to the sink pad on the convertor
View Full Code Here

        videosink.connect((BaseSink.PREROLL_HANDOFF) new VideoHandoffListener());
       
        //
        // Convert the input into 32bit RGB so it can be fed directly to a BufferedImage
        //
        Element conv = ElementFactory.make("ffmpegcolorspace", "ColorConverter");
        Element videofilter = ElementFactory.make("capsfilter", "ColorFilter");
        StringBuilder caps = new StringBuilder("video/x-raw-rgb, bpp=32, depth=24, endianness=(int)4321, ");
        // JNA creates ByteBuffer using native byte order, set masks according to that.
        if (ByteOrder.nativeOrder() == ByteOrder.LITTLE_ENDIAN)
          caps.append("red_mask=(int)0xFF00, green_mask=(int)0xFF0000, blue_mask=(int)0xFF000000");
        else
          caps.append("red_mask=(int)0xFF0000, green_mask=(int)0xFF00, blue_mask=(int)0xFF");
        videofilter.setCaps(new Caps(caps.toString()));
        addMany(conv, videofilter, videosink);
        Element.linkMany(conv, videofilter, videosink);
       
        //
        // Link the ghost pads on the bin to the sink pad on the convertor
View Full Code Here

    public RGBDataSink(String name, Pipeline pipeline, Listener listener) {
        super(initializer(gst.ptr_gst_bin_new(name)));
        this.listener = listener;

        Element element = pipeline.getElementByName(name);
        if (element != null) {
           
            // TODO: Fix. This doesn't work as it should. getElementByName() returns a
            // BaseSink which cannot be casted to FakeSink.
            videosink = (BaseSink) element;
View Full Code Here

    public BufferDataAppSink(String name, Pipeline pipeline, Listener listener) {
        super(initializer(gst.ptr_gst_bin_new(name)));
        this.listener = listener;

        Element element = pipeline.getElementByName(name);
        if (element != null) {           
            // TODO: Fix. This doesn't work. getElementByName() returns a BaseSink which
            // cannot be casted to AppSink.
            sink = (AppSink) element;
            sink.set("emit-signals", true);
View Full Code Here

TOP

Related Classes of org.gstreamer.Element$PAD_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.