Examples of Structure


Examples of org.gstreamer.Structure

     *
     * @return a string
     */
    @Override
    public String toString() {
        Structure s = getStructure();
        String event = s.getString("event");
        if (event.startsWith("key-")) {
            return String.format("%s: [key=%s]",
                    event, s.getString("key"));
        } else if (event.startsWith("mouse-")) {
            return String.format("%s: [x=%f, y=%f button=%x]",
                    event,
                    s.getDouble("pointer_x"), s.getDouble("pointer_y"),
                    s.getInteger("button"));
        } else {
            return String.format("%s",
                s.getString("event"));
        }
    }
View Full Code Here

Examples of org.gstreamer.Structure

    public static NavigationEvent createKeyReleaseEvent(String key) {
        return createKeyEvent("key-release", key);
    }
    private static final class MouseEvent extends NavigationEvent {
        public MouseEvent(String event, double x, double y, int button) {
            super(new Structure("application/x-gst-navigation",
                "event", GType.STRING, event,
                "button", GType.INT, button,
                "pointer_x", GType.DOUBLE, x,
                "pointer_y", GType.DOUBLE, y));
        }
View Full Code Here

Examples of org.gstreamer.Structure

         *
         * @return a string
         */
        @Override
        public String toString() {
            Structure s = getStructure();
            return String.format("%s: [x=%f, y=%f button=%x]",
                    s.getString("event"),
                    s.getDouble("pointer_x"), s.getDouble("pointer_y"),
                    s.getInteger("button"));
        }
View Full Code Here

Examples of org.gstreamer.Structure

                    s.getInteger("button"));
        }
    }
    private static final class KeyEvent extends NavigationEvent {
        public KeyEvent(String event, String key) {
            super(new Structure("application/x-gst-navigation",
                "event", GType.STRING, event,
                "key", GType.STRING, key));
        }
View Full Code Here

Examples of org.gstreamer.Structure

         *
         * @return a string
         */
        @Override
        public String toString() {
            Structure s = getStructure();
            return String.format("%s: [key=%s]",
                    s.getString("event"), s.getString("key"));
        }
View Full Code Here

Examples of org.gstreamer.Structure

                if (pad.isLinked()) {
                    return;
                }
                /* check media type */
                Caps caps = pad.getCaps();
                Structure struct = caps.getStructure(0);
                if (struct.getName().startsWith("audio/")) {
                    System.out.println("Linking audio pad: " + struct.getName());
                    pad.link(audioBin.getStaticPad("sink"));
                } else if (struct.getName().startsWith("video/")) {
                    System.out.println("Linking video pad: " + struct.getName());
                    pad.link(videoComponent.getElement().getStaticPad("sink"));
                   
                    // Make the video frame visible
                    SwingUtilities.invokeLater(new Runnable() {
                        public void run() {
                            frame.setVisible(true);
                        }
                    });
                } else {
                    System.out.println("Unknown pad [" + struct.getName() + "]");
                }
            }
        });
        Bus bus = pipe.getBus();
       
View Full Code Here

Examples of org.gstreamer.Structure

                    return;
                }
 
                /* check media type */
                Caps caps = pad.getCaps();
                Structure struct = caps.getStructure(0);
                if (struct.getName().startsWith("audio/")) {
                    System.out.println("Got audio pad");
                    /* link'n'play */
                    pad.link(audioPad)
                }
               
View Full Code Here

Examples of org.gstreamer.Structure

                    return;
                }
 
                /* check media type */
                Caps caps = pad.getCaps();
                Structure struct = caps.getStructure(0);
                if (struct.getName().startsWith("audio/")) {
                    System.out.println("Got audio pad");
                    /* link'n'play */
                    pad.link(audioPad)
                }
               
View Full Code Here

Examples of org.gstreamer.Structure

                //
                if (!Platform.isWindows()) {
                    bus.setSyncHandler(new BusSyncHandler() {

                        public BusSyncReply syncMessage(Message msg) {
                            Structure s = msg.getStructure();
                            if (s == null || !s.hasName("prepare-xwindow-id")) {
                                return BusSyncReply.PASS;
                            }
                            XOverlay.wrap(videoSink).setWindowHandle(canvas);
                            return BusSyncReply.DROP;
                        }
View Full Code Here

Examples of org.mizartools.dli.Structure

      itemType = ItemType.aggr;
      break;
    case L :
      Prefices prefices = Adapter.getPrefices(abstractSignature, constructor.getTypList());
      Fields fields = Adapter.getFields(abstractSignature, constructor.getFields());
      itemDefinition = new Structure(locusList, prefices, fields);
      itemType = ItemType.struct;
      break;
    case U :
      type = Adapter.getType(abstractSignature, constructor.getTypList().getFirst());
      itemDefinition = new Selector(locusList, type);
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.