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 org.gstreamer.Caps

            return ref.get() == null;
        }

        @Test public void testReference() throws Exception {
            Object ref = new Object();
            Caps target = new Caps("video/x-raw-rgb");
            ReferenceManager.addKeepAliveReference(ref, target);
            WeakReference<Object> targetRef = new WeakReference<Object>(target);
            target = null;
            assertFalse("target collected prematurely", waitGC(targetRef));
            ref = null;
    View Full Code Here

    Examples of org.gstreamer.Caps

            assertTrue("target not collected when ref is collected", waitGC(targetRef));
        }
        @Test public void testMultipleReferences() throws Exception {
            Object ref1 = new Object();
            Object ref2 = new Object();
            Caps target = new Caps("video/x-raw-rgb");
            ReferenceManager.addKeepAliveReference(ref1, target);
            ReferenceManager.addKeepAliveReference(ref2, target);
            WeakReference<Object> targetRef = new WeakReference<Object>(target);
            target = null;
            assertFalse("target collected prematurely", waitGC(targetRef));
    View Full Code Here

    Examples of org.gstreamer.Caps

            final Element fakesrc = ElementFactory.make("videotestsrc", "source");
            System.out.println("Creating capsfilter");
            final Element flt = ElementFactory.make("capsfilter", "flt");
           
            System.out.println("Creating caps");
            Caps fltcaps = new Caps("video/x-raw-yuv, width=" + width + ", height=" + height +
                    ", bpp=32, depth=24, framerate=30/1");
            System.out.println("Setting caps");
            flt.setCaps(fltcaps);
            final Element navtest = ElementFactory.make("navigationtest", "navtest");
            SwingUtilities.invokeLater(new Runnable() {
    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.