Examples of Pointer


Examples of com.sun.jna.Pointer

        /* if there's pending, decoded audio, grab it */
        if ((ret = VORBIS.vorbis_synthesis_pcmout(vd, pcm)) > 0)
        {

          final Pointer ppChannels = pcm.getValue();
          final Pointer[] pChannels = ppChannels.getPointerArray(0, vi.channels);

          final float[][] floatArrays = new float[pChannels.length][];
          for (int k = 0; k < pChannels.length; ++k)
          {
            floatArrays[k] = pChannels[k].getFloatArray(0, ret);
View Full Code Here

Examples of com.sun.jna.Pointer

     * Retrieves the current channel from the tuner.
     *
     * @return the current channel of the tuner
     */
    public TunerChannel getChannel() {
        Pointer ptr = GSTTUNER_API.gst_tuner_get_channel(this);
        if (ptr == null) {
            return null;
        }
        return new TunerChannel(this, ptr, false, true);
    }
View Full Code Here

Examples of com.sun.jna.Pointer

     * @param name the name of the channel to find
     *
     * @return the <tt>TunerChannel</tt> if found, else null
     */
    public TunerChannel getChannelByName(String name) {
        Pointer ptr = GSTTUNER_API.gst_tuner_find_channel_by_name(this, name);
        if (ptr == null) {
            return null;
        }
        return new TunerChannel(this, ptr, false, true);
    }
View Full Code Here

Examples of com.sun.jna.Pointer

        String[] toStringArray() {
            //
            // Unpack the native arguments back into a String array
            //
            List<String> args = new ArrayList<String>();
            Pointer argv = argvRef.getValue();
            for (int i = 1; i < argcRef.getValue(); i++) {
                Pointer arg = argv.getPointer(i * Pointer.SIZE);
                if (arg != null) {
                    args.add(arg.getString(0, false));
                }
            }
            return args.toArray(new String[args.size()]);
        }  
View Full Code Here

Examples of com.sun.jna.Pointer

    public Buffer(int size) {
        this(initializer(allocBuffer(size)));
    }
   
    private static Pointer allocBuffer(int size) {
        Pointer ptr = gst.ptr_gst_buffer_new_and_alloc(size);
        if (ptr == null) {
            throw new OutOfMemoryError("Could not allocate Buffer of size "+ size);
        }
        return ptr;
    }
View Full Code Here

Examples of com.sun.jna.Pointer

     * @return A {@link java.nio.ByteBuffer} that can access this Buffer's data.
     */
    public synchronized ByteBuffer getByteBuffer() {
        if (byteBuffer == null) {
            int size = getSize();
            Pointer data = (Pointer) struct.readField("data");
            if (data != null && size > 0) {
                byteBuffer = data.getByteBuffer(0, size);
            }
        }
        return byteBuffer;
    }
View Full Code Here

Examples of com.sun.jna.Pointer

      bus.connect(new Bus.MESSAGE() {
      public void busMessage(Bus bus, Message message) {
        if (message.getSource().getNativeAddress().equals(getNativeAddress())) {
          final Structure structure = message.getStructure();
          if (structure != null && "have-ns-view".equals(structure.getName())) {
            final Pointer nsview = (Pointer) structure.getValue("nsview");
            fireNewVideoComponent(nsview);
          }
        }
      }
    });
View Full Code Here

Examples of com.sun.jna.Pointer

    public List<Property> getProperties() {
        return propertiesList(GSTPROPERTYPROBE_API.gst_property_probe_get_properties(this), true, true);
    }

    public Property getProperty(String name) {
        Pointer ptr = GSTPROPERTYPROBE_API.gst_property_probe_get_property(this, name);
        if (ptr == null) {
            return null;
        }
        Property p = new Property(ptr, false, false);
        return p;
View Full Code Here

Examples of com.sun.jna.Pointer

     * Saves an existing pipeline to a XML file.
     *
     * @param element the element to save
     */
    public void saveElement(Element element) {
        Pointer fp = LibC.INSTANCE.fopen(file.getAbsolutePath(), "w");
        if (fp == null) {
            throw new GstException("Could not open " + file
                    + " [errno=" + Native.getLastError() + "]");
        }
        gst.gst_xml_write_file(element, fp);
View Full Code Here

Examples of com.sun.jna.Pointer

     * @param name the name to assign to the created Element
     * @return A new {@link Element}
     */
    public Element create(String name) {
        logger.entering("ElementFactory", "create", name);
        Pointer elem = gst.ptr_gst_element_factory_create(this, name);
        logger.log(DEBUG, "gst_element_factory_create returned: " + elem);
        if (elem == null) {
            throw new IllegalArgumentException("Cannot create GstElement");
        }
        return elementFor(elem, getName());
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.