Examples of Caps

@author Portet to jme3 by user starcom "Paul Kashofer Austria" @see ImageGraphics
  • com.ngt.jopenmetaverse.shared.sim.events.Caps
  • org.gstreamer.Caps
    Structure describing sets of media formats

    Caps (capabilities) are lightweight objects describing media types. They are composed of an array of {@link Structure}.

    Caps are exposed on {@link PadTemplate} to describe all possible types agiven pad can handle. They are also stored in the {@link Registry} along witha description of the {@link Element}.

    Caps are exposed on the element pads using the {@link Pad#getCaps} method. This method describes the possible types that the pad can handle or produce at runtime.

    Caps are also attached to buffers to describe the content of the data pointed to by the buffer with {@link Buffer#setCaps}. Caps attached to a {@link Buffer} allow for format negotiation upstream and downstream.

    A Caps can be constructed with the following code fragment:

    Caps caps = Caps.fromString("video/x-raw-rgb, bpp=32, depth=24, width=640, height=480");

    A Caps is fixed when it has no properties with ranges or lists. Use {@link #isFixed} to test for fixed caps. Only fixed caps can beset on a {@link Pad} or {@link Buffer}.

    Various methods exist to work with the media types such as subtracting or intersecting. @see Structure


  • Examples of com.jme3.renderer.Caps

            this.vertName = vertexShader;
            this.fragName = fragmentShader;
            this.vertLanguage = vertLanguage;
            this.fragLanguage = fragLanguage;

            Caps vertCap = Caps.valueOf(vertLanguage);
            requiredCaps.add(vertCap);
            Caps fragCap = Caps.valueOf(fragLanguage);
            requiredCaps.add(fragCap);

            usesShaders = true;
        }
    View Full Code Here

    Examples of com.ngt.jopenmetaverse.shared.sim.events.Caps

        if (Client.settings.ENABLE_CAPS)
        {
          // Connect to the new CAPS system
          if (!Utils.isNullOrEmpty(seedcaps))
            Caps = new Caps(this, seedcaps);
          else
            JLogger.error("Setting up a sim without a valid capabilities server!");
        }

      }
    View Full Code Here

    Examples of com.ngt.jopenmetaverse.shared.sim.events.Caps

        public void RequestUploadBakedTexture(final byte[] textureData, final MethodDelegate<Void,
            BakedTextureUploadedCallbackArgs> callback) throws Exception
        {
            URI url = null;

            Caps caps = Client.network.getCurrentSim().Caps;
            if (caps != null)
                url = caps.CapabilityURI("UploadBakedTexture");

            if (url != null)
            {
    //            // Fetch the uploader capability
                CapsHttpClient request = new CapsHttpClient(url);
    View Full Code Here

    Examples of org.gstreamer.Caps

            // 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

    Examples of org.gstreamer.Caps

        class AppSinkNewBufferListener implements AppSink.NEW_BUFFER {
            public void newBuffer(AppSink elem)
            {
                Buffer buffer = sink.pullBuffer();

                Caps caps = buffer.getCaps();
                Structure struct = caps.getStructure(0);

                int width = struct.getInteger("width");
                int height = struct.getInteger("height");
                if (width < 1 || height < 1) {
                    return;
    View Full Code Here

    Examples of org.gstreamer.Caps

            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)
            {
    View Full Code Here

    Examples of org.gstreamer.Caps

        class AppSinkNewBufferListener implements AppSink.NEW_BUFFER {
            public void newBuffer(AppSink elem)
            {
                Buffer buffer = sink.pullBuffer();

                Caps caps = buffer.getCaps();
                int n = buffer.getSize();
               
                if (n < 1) {
                    return;
                }
    View Full Code Here

    Examples of org.gstreamer.Caps

          //
          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

    Examples of org.gstreamer.Caps

            doHandoff(buffer, pad, true);
          }       
         
          private void doHandoff(Buffer buffer, Pad pad, boolean isPrerollFrame) {

                Caps caps = buffer.getCaps();
                Structure struct = caps.getStructure(0);

                int width = struct.getInteger("width");
                int height = struct.getInteger("height");
                if (width < 1 || height < 1) {
                    return;
    View Full Code Here

    Examples of org.gstreamer.Caps

            // 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
    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.